Skip to main content
All Tokios API requests are sent to https://api.tokios.com with your sk-tok-... key as a Bearer token. Tokios exposes the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages surfaces, plus model listing and token counting.
Base URL
Try it live — test any registered model in the console Playground with no code. It runs against your signed-in session, so you don’t even need an API key to experiment.

Authentication

Every request requires these headers:
The model field in each request is the public deployment name you registered (e.g. gemma-tunnel), not your local model id.

Usage examples

POST/v1/chat/completionsOpenAI dialect
Common request shapes against /v1/chat/completions. Replace sk-tok-YOUR_KEY and gemma-tunnel with your own. Streaming and tool calling depend on the underlying model supporting them.

POST/v1/chat/completionsOpenAI dialect

POST /v1/chat/completions

Works with supported OpenAI SDKs. Send a list of messages and receive a completion from your registered model.

Request body

string
required
The public deployment name (e.g. "gemma-tunnel").
array
required
Array of message objects. Each has a role ("system", "user", or "assistant") and content. Content may be a string or an array of content blocks (text, tool calls, images) — Tokios passes the structure through.
boolean
default:"false"
Stream the response using server-sent events.
number
Sampling temperature. Higher values produce more random output.
integer
Maximum number of tokens to generate.
Example request
Response · 200
POST/v1/messagesAnthropic dialect

POST /v1/messages

Works with supported Anthropic SDKs. Send a messages array and receive a response in Anthropic’s format. Tokios translates this to Chat Completions for your model and back.

Request body

string
required
The public deployment name.
array
required
Array of message objects with a role ("user" or "assistant") and content (a string or an array of content blocks).
integer
required
Maximum number of tokens to generate.
string
System prompt to prepend to the conversation.
boolean
default:"false"
Stream the response using server-sent events.
Example request
Response · 200
POST/v1/messages/count_tokensAnthropic dialect

POST /v1/messages/count_tokens

Works with supported Anthropic SDKs. Send the same body shape as /v1/messages and receive the input token count without running a completion.
Example request
Response · 200
POST/v1/responsesOpenAI dialect

POST /v1/responses

Works with supported OpenAI SDKs using the newer Responses format (used by OpenAI Codex). Tokios translates it to Chat Completions for your model.

Request body

string
required
The public deployment name.
string | array
required
The input text, or an array of input items, to generate a response for.
boolean
default:"false"
Stream the response using server-sent events.
Example request
GET/v1/modelsOpenAI dialect

GET /v1/models

Lists the model deployments your API key can use. Works with supported OpenAI SDKs using the standard list shape.
Example request
Response · 200
Claude Code’s model picker only lists claude* ids, so it won’t show your Tokios models. Pass the model explicitly with claude --model gemma-tunnel — see the Claude Code guide.

Error codes

A 503 means the connector for that deployment isn’t currently connected (or is at its concurrency cap). Start the connector and confirm it shows online in the console before retrying.