Skip to navigation

OpenAI-compatible chat completions

Drop-in for OpenAI clients with model: "decision-machine-1". Two modes: response_format: { type: "json_schema" } extracts the schema from the user messages and returns the JSON as the assistant content; tools picks a tool and fills its arguments (function calling). Plain chat is rejected with 400. stream: true returns one chunk then [DONE].

Authentication

AuthorizationBearer

A milliseconds API key, test_sk-{namespace}-{entropy} or prod_sk-{namespace}-{entropy}. Every /v1 route requires it.

Request

This endpoint expects an object.
modelstringRequired
messageslist of objectsRequired
response_formatobjectOptional
toolslist of objectsOptional
tool_choiceenum or objectOptional
streambooleanOptional

Response

Completion
idstring
object"chat.completion"
createdinteger-9007199254740991-9007199254740991
modelstring
choiceslist of objects
usageobject

Errors

400
Bad Request Error