Base URL: https://api.doodbrain.com/v1
Do not embed secret API keys in browser JavaScript. Call the API from your backend.
Authorization: Bearer db_live_...
curl https://api.doodbrain.com/v1/models \
-H "Authorization: Bearer $DOODBRAIN_API_KEY"
curl https://api.doodbrain.com/v1/chat/completions \
-H "Authorization: Bearer $DOODBRAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doodbrain-auto",
"messages": [{"role":"user","content":"Türkiye'\''nin başkenti nedir?"}]
}'
from openai import OpenAI
client = OpenAI(
api_key="DOODBRAIN_API_KEY",
base_url="https://api.doodbrain.com/v1",
)
r = client.chat.completions.create(
model="doodbrain-auto",
messages=[{"role":"user","content":"Hello"}],
)
print(r.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.DOODBRAIN_API_KEY,
baseURL: "https://api.doodbrain.com/v1",
});
const r = await client.chat.completions.create({
model: "doodbrain-auto",
messages: [{ role: "user", content: "Hello" }],
});
$ch = curl_init("https://api.doodbrain.com/v1/chat/completions");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("DOODBRAIN_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"model" => "doodbrain-auto",
"messages" => [["role"=>"user","content"=>"Hello"]],
]),
CURLOPT_RETURNTRANSFER => true,
]);
echo curl_exec($ch);
doodbrain-auto — recommended routerdoodbrain-free — local free pathImage/Video generation endpoints are not available (hardware required).
POST /v1/brains/{id}/chat
# or model: "brain:<uuid>" with scope brains:invoke
{"error":{"message":"...","type":"...","code":"..."}}
401 invalid key · 403 insufficient scope · 429 rate limit · 400 invalid request · 503 overloaded