Inference
Chat Completions
OpenAI-compatible messages, streaming and tools
Use Chat Completions for message-oriented workloads and existing OpenAI client compatibility.
Create a completion
Provide either an approved direct model or policy alias. Policy aliases preserve application portability while Router applies workspace eligibility and health.
curl https://api.octoryn.dev/v1/chat/completions \
-H "Authorization: Bearer $OCTORYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"policy/frontier","messages":[{"role":"user","content":"Summarise the incident."}]}'Streaming
Set stream=true and consume chat.completion.chunk events until [DONE]. Preserve finish_reason and tool-call deltas; cancellation and incomplete output are application-visible states.
Tools
Send JSON Schema function definitions only on routes that declare tool support. Validate arguments and authorize actions in the product before executing any side effect.
Fallback semantics
Router retries classified transient failures before output begins. Once a stream has emitted content, hidden replay can duplicate output or actions, so the application decides whether a visible retry is safe.
