docs / sdk

Chat Completions compatibility

DemonRoute speaks the Chat Completions wire format. The Python and Node SDKs most people already have work if you override base_url / baseURL to https://api.demonroute.com/v1.

You send Chat Completions JSON. You receive Chat Completions JSON. Image models use /v1/images/generations.

Streaming is SSE. Do not put a 30s HTTP timeout in front of us — reasoning models will die mid-thought. Client timeout 180s, read timeout none or 10 min.

Streaming

node · stream
const stream = await client.chat.completions.create({
  model: "deepseek-v4.1-flash",
  stream: true,
  messages: [{ role: "user", content: "Think slowly." }],
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Headers we honor

  • Authorization: Bearer sk-dr-…
  • HTTP-Referer and X-Title — logged, not required.