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_.
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
| Field | Values |
|---|---|
model | oriel-2.0, fable-2.5, canto-2.0 or auto |
mode | Effort: light, medium, high, high-plus or ultra |
product | ai (default), code for file-building replies, or images |
messages | The conversation so far, oldest first. Each is { "role": "user" | "assistant", "content": "…" }. User messages can add "images": ["data:image/png;base64,…"]. |
stream | true 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:
| Type | Meaning |
|---|---|
delta | The next piece of the answer, in text |
reasoning | The next piece of the model's reasoning |
error | Something went wrong; see message |
done | The 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
| Status | Meaning |
|---|---|
401 | Missing, invalid or revoked key |
403 | Your plan doesn't include the API |
429 | Rate limit or usage limit reached. The message says when it resets. |
503 | The model is busy. Try again shortly. |
Error bodies look like { "error": { "message": "…" } }.