Count message tokens
Counts the input tokens of a Messages request without running the model. Free: never billed, and it works even when the balance is zero. It counts toward rate limits.
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.
anthropic-version?stringAccepted for Anthropic SDK compatibility (a date such as 2023-06-01). Only well-formed values are honoured.
anthropic-beta?stringAccepted for Anthropic SDK compatibility (comma-separated feature names). Only well-formed values are honoured.
application/json- body
model*stringmessages*array<>1 <= itemssystem?string|array<>tools?array<|>Client tools: tools with no type or with type: "custom" (name, description, input_schema). The web search tool (type: "web_search_20250305", at most 5 searches per request, billed per search) is also kept. Tools with any other type (code execution, bash, text editor, computer use) and mcp_servers are removed from the request without an error.
tool_choice?thinking?Thinking is on or off. disabled turns it off on both models. budget_tokens does not cap it.
output_config?Accepted and ignored: thinking has no levels.
The input token count.
application/json- response
input_tokens*integer0 <= valuecurl -X POST 'https://api.interodin.com/v1/messages/count_tokens' \ -H 'Content-Type: application/json' \ -d '{ "model": "odin-v1", "messages": [ { "role": "user", "content": "How many tokens is this?" } ]}'{ "input_tokens": 0}Create chat completion POST
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]`.
Create message POST
Anthropic Messages format. Accepts `x-api-key` or `Authorization: Bearer` (`x-api-key` wins if both are sent), query strings such as `?beta=true`, and the `anthropic-version` / `anthropic-beta` headers.