DianoeticDocs

Developers

API

Call Oriel, Fable and Canto from your own apps with an API key.

The API gives your apps the same models as the chat. It's included with Thinker and Thinker Max.

Get a key

Open Dianoetic, go to Settings → API and choose Create key. You'll see the key once, so copy it somewhere safe. Keys start with dn_.

Keep keys secret. Use them from a server, never in a web page or an app you ship to other people. If a key leaks, revoke it in Settings.

Send a message

curl https://dianoetic.tech/v1/chat \
  -H "Authorization: Bearer $DIANOETIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "oriel-2.0",
    "mode": "high",
    "stream": false,
    "messages": [{ "role": "user", "content": "Explain recursion in one paragraph." }]
  }'

The reply:

{ "model": "oriel-2.0", "product": "ai", "mode": "high", "output": "Recursion is…" }

JavaScript example

const res = await fetch("https://dianoetic.tech/v1/chat", {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.DIANOETIC_API_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    model: "auto",
    stream: false,
    messages: [{ role: "user", content: "Give me three names for a cat." }],
  }),
});
const { output } = await res.json();
console.log(output);

Request fields

FieldValues
modeloriel-2.0, fable-2.5, canto-2.0 or auto
modeEffort: light, medium, high, high-plus or ultra
productai (default), code for file-building replies, or images
messagesThe conversation so far, oldest first. Each is { "role": "user" | "assistant", "content": "…" }. User messages can add "images": ["data:image/png;base64,…"].
streamtrue for server-sent events

Streaming

With "stream": true, the response is a stream of server-sent events. Each line starts with data: followed by JSON with a type:

TypeMeaning
deltaThe next piece of the answer, in text
reasoningThe next piece of the model's reasoning
errorSomething went wrong; see message
doneThe answer is complete

Create images

curl https://dianoetic.tech/v1/images/generate \
  -H "Authorization: Bearer $DIANOETIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "A cozy cabin in the snow at dusk", "quality": "fast", "aspect": "square" }'

Returns { "image": "data:image/jpeg;base64,…" }. Quality is fast or detailed. Aspect is square, portrait or landscape.

Check your usage

curl https://dianoetic.tech/v1/usage \
  -H "Authorization: Bearer $DIANOETIC_API_KEY"

Credits and limits

API calls use the same credits as the app and count toward your plan's 5-hour and weekly limits, then your extra credits. Requests are rate-limited to about 20 a minute.

Errors

StatusMeaning
401Missing, invalid or revoked key
403Your plan doesn't include the API
429Rate limit or usage limit reached. The message says when it resets.
503The model is busy. Try again shortly.

Error bodies look like { "error": { "message": "…" } }.