API reference

Request fields and endpoints for generation, model discovery, token counts, and usage limits.

Use https://api.zokasta.com as the gateway URL. Send application/json for POST requests. Set stream to true on a generation request for server-sent events.

POST /v1/chat/completions

Send model and a messages array. Use max_completion_tokens to bound the reply.

POST /v1/responses

Send model and input. You can include instructions and use max_output_tokens to bound the reply.

POST /v1/messages

Send a Claude model ID, max_tokens, and a messages array with user or assistant roles. Put system instructions in the top-level system field.

POST /v1/messages/count_tokens

Send the Messages input fields, including model and messages, to get input_tokens without generating a reply.

GET /v1/models

Returns model IDs available to the API key. Use /v1/models/claude or /v1/models/openai to filter by protocol.

GET /v1/limits

Returns the latest available snapshot of account limits and credits for a workspace API key. Other requests can change the balance after the snapshot was taken.