Create chat completion
Generates the next assistant message. With stream: true the reply is sent as server-sent events: each data: line is a ChatCompletionChunk, the last chunk carries usage, and the stream ends with data: [DONE].
AuthorizationBearer <token>Your API key: Authorization: Bearer io-sk-…. If a request also sends x-api-key, x-api-key wins.
x-interodin-session-id?stringOptional prompt-cache routing hint, honoured on every generation endpoint (including count_tokens). Send the same opaque value (for example a conversation id, at most 128 characters recommended) on every request of one conversation. Never put prompts, personal data or secrets in it.
application/json- body
model*stringModel id, for example odin-v1.
messages*array<>1 <= itemsstream?booleanStream the reply as server-sent events.
falsestream_options?max_tokens?integerClamped to the model maximum. 0 or less returns 400.
1 <= valuemax_completion_tokens?integerAlias of max_tokens. 0 or less returns 400.
1 <= valuetemperature?number0 <= value <= 2top_p?number0 <= value <= 1stop?string|array<string>seed?integerpresence_penalty?number-2 <= value <= 2frequency_penalty?number-2 <= value <= 2tools?array<|||>Function tools and custom tools. Any other tool type is removed from the request without an error, as are web_search_options and a tool_choice that names a removed tool.
store?booleanIgnored: nothing is stored. Always sent as false.
metadata?Ignored and not forwarded.
tool_choice?||parallel_tool_calls?booleanresponse_format?reasoning_effort?stringReasoning is on or off, with no levels. none turns it off on Odin Flash; it does not on Odin v1. The other values are accepted and change nothing.
"none""minimal""low""medium""high""xhigh""max"include_reasoning?booleanSet false to omit reasoning from the reply. Reasoning tokens are still billed as output.
prompt_cache_key?stringPrompt-cache routing hint. Same value for every request of one conversation. Forwarded only as a hash specific to your organization; not stored. A string of at most 1024 characters is accepted, null removes the field and any other value returns 400 invalid_request.
length <= 1024user?stringYour end-user id. Forwarded only as a hash specific to your organization; not stored. A string of at most 1024 characters is accepted, null removes the field and any other value returns 400 invalid_request.
length <= 1024safety_identifier?stringA stable identifier for the end user, for abuse detection. Forwarded only as a hash specific to your organization; not stored. A string of at most 1024 characters is accepted, null removes the field and any other value returns 400 invalid_request.
length <= 1024A chat completion, or an event stream when stream is true.
- response
id*stringobject*stringcreated*integermodel*PublicModelIdA public InterOdin model id, for example odin-v1.
^odin-[a-z0-9.-]+$choices*array<>usage?curl -X POST 'https://api.interodin.com/v1/chat/completions' \ -H 'Content-Type: application/json' \ -d '{ "model": "odin-v1", "messages": [ { "role": "user", "content": "Say hello in Romanian." } ]}'{ "id": "string", "object": "chat.completion", "created": 0, "model": "odin-v1", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "string", "reasoning": "string", "refusal": "string", "tool_calls": [ { "id": "string", "type": "function", "function": { "name": "string", "arguments": "string" } } ] }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 } }}