Skip to main content
The Pareto application programming interface (API) uses JavaScript Object Notation (JSON). Streaming responses use server-sent events. The Authorization header carries the API key. The word Bearer tells the API to use the next value as the key.

List models

GET /models This endpoint does not require an API key. The response contains a data list of public model IDs. Chat requests require an active API key with access to the selected model. Use z-ai/glm-5.3-flash for this offer. Pareto also accepts the alias glm-5.3-flash. For Kimi K3.1 Pro, use moonshotai/kimi-k3.1-pro. The model catalog does not grant access to a model. Use an ID exactly as listed.

Model prices

Each model in the data list has a pricing object. The object uses the OpenRouter format. Each value is a decimal string in USD per token.
  • prompt: the input price.
  • completion: the output price.
  • input_cache_read: the cached input price.
To get USD per 1 million tokens, multiply the value by 1,000,000. Without an API key, the values agree with the token prices. With an API key, the values are the prices for the account of that key. These prices can be different if the account has a special price agreement. Routers can read pricing to update their prices automatically. Read the list again at a regular interval to get price changes.

Model limits

Each model has a context window of 1,048,576 tokens. The context window contains the prompt and the output. The prompt limit leaves space for the full output limit. GLM 5.3 Flash returns HTTP 400 with context_length_exceeded for a longer prompt. DeepSeek V4.1 Flash returns it only for a prompt longer than the context window. See Troubleshooting. Cached tokens count toward the prompt limit. See Prompt caching.

Model precision

Quantization can vary by deployment. Pareto does not guarantee a fixed precision. See why we do not disclose our serving system details.

Create a chat completion

POST /chat/completions Use z-ai/glm-5.3-flash as the model ID. The request body must contain:
  • model: the model ID.
  • messages: the input messages.
  • stream: true. Pareto serves streamed requests only.
The response is a server-sent event stream. See Streaming to read it.

Request parameters

Send only the parameters in this table. Support for optional parameters can differ by deployment. The API can reject unsupported values or combinations. Pareto serves this model on its own GPUs. Parameters outside the table are not supported. Include the conversation history in messages. See How Pareto works for serving and capacity behavior. Pareto offers zero data retention (ZDR) and does not keep request content after a request finishes, whatever store is set to. See the Zero Data Retention Policy and Privacy Policy.

Streaming

Every response arrives as events while it is generated. Read text from choices[0].delta.content. Tool calls arrive in choices[0].delta.tool_calls. With stream_options: {"include_usage": true}, the last JSON event contains usage and an empty choices list. usage does not show the charge. See Balance and usage for charges. A successful stream ends with data: [DONE].

Tool calls

With parallel_tool_calls set to false, a successful response contains zero or one tool call: GLM-5.3-Flash returns the first call the model writes. If a response still contains more tool calls, the request fails. For a stream, earlier events can arrive before the error. Read the function name and arguments from tool_calls. Send the tool result in a new request with role tool and the matching tool_call_id. Include the assistant tool call in messages.

Create a response

POST /responses The Responses API uses the same models, key, limits, and prices as chat completions. The request body must contain:
  • model: the model ID.
  • input: a string, or a list of input items.
  • stream: true. Pareto serves streamed requests only.
Pareto does not store responses. Send the full conversation in input with each request:
  • message items with the roles user, assistant, system, and developer. Content parts can be input_text, output_text, and input_image.
  • function_call and function_call_output items. Match them with call_id.
  • reasoning items from earlier responses.
These parameters are supported: instructions, tools (function and namespace tools), tool_choice, parallel_tool_calls, max_output_tokens, reasoning.effort, text.format, temperature, top_p, prompt_cache_key, and metadata. store is accepted. Pareto does not keep a response, whatever store is set to. These parameters return HTTP 400: previous_response_id, conversation, prompt, background: true, and item_reference items. Pareto ignores hosted tools such as web_search. The Pareto-Ignored-Parameters response header names each ignored parameter. The stream uses the Responses event types, from response.created to response.completed. Each event has a sequence_number. The model’s reasoning arrives as a reasoning item before the answer. With reasoning.summary, it arrives as the summary. The last event carries usage. A response that reaches max_output_tokens ends with response.incomplete. A failure ends with response.failed.

Messages

POST /messages The Anthropic Messages API uses the same models, key, limits, and prices as chat completions. Send your key in x-api-key or as a bearer token in Authorization. The request body must contain:
  • model: the model ID.
  • max_tokens: the output limit.
  • messages: the conversation.
  • stream: true. Pareto serves streamed requests only.
Messages can contain text, tool_use, tool_result, and thinking blocks. System messages are accepted in system and in messages. Pareto does not support prefill. If the last user or assistant message is from the assistant, the request returns HTTP 400. These parameters are supported: system, tools, thinking, output_config.effort, stop_sequences, and stream. Pareto caches prompts automatically, so cache_control is accepted and has no other effect. The model’s reasoning arrives as a thinking block before the answer. With thinking.display set to omitted, the block’s signature carries the reasoning. Send the block back unchanged in the next request. usage.input_tokens counts the prompt tokens that are not cached. usage.cache_read_input_tokens counts the cached tokens. The message_delta event carries the usage. If the output stops at one of the stop_sequences, the message_delta event sets stop_reason to stop_sequence and stop_sequence to that sequence. Errors use the Anthropic error format.