Quotaflow
llms.txtOpenAPIDashboard
OpenAI-compatible

Chat Completions

When to use this page

Use this page if your existing client still calls /chat/completions. This is the preferred OpenAI-compatible surface for third-party chat agents and apps that send messages, tools, and Chat Completions streaming chunks. Keys enabled for Claude-compatible, Gemini-compatible, GLM text, or Kimi text models can use those model ids here while receiving Chat Completions-shaped output.

Muse

Muse Wonder and Spark use this endpoint for keys with Muse access. See the Muse API quickstart for model discovery, copyable requests, output budgets, and protocol-specific limits.

Endpoint

POST https://api.quotaflow.ai/openai/v1/chat/completions

Request

{
  "model": "gpt-5.5",
  "messages": [
    { "role": "user", "content": "Return only the word ready." }
  ],
  "stream": false,
  "max_completion_tokens": 64,
  "verbosity": "medium"
}

Chat Completions accepts standard output controls such as max_completion_tokens (or legacy max_tokens) and GPT text verbosity values low, medium, or high. On compatible GPT models, Quotaflow preserves supported request options including response_format, parallel_tool_calls, prompt_cache_key, prompt_cache_retention, metadata, safety_identifier, service_tier, and top_logprobs. Function tools and custom tools are supported through the tools array when the selected model supports tool use. Non-streaming GPT chat requests may set n to request multiple choices; Quotaflow fans those choices out safely when the selected upstream cannot do native multi-choice generation. For privacy, store is not enabled by this compatibility path. GLM, Kimi, DeepSeek, MiMo and Muse use the same Chat Completions message format, but a model listing alone does not prove streaming, tools or strict JSON availability. Start with non-streaming text, then verify optional request capabilities; do not copy GPT-only verbosity or reasoning controls onto another model. See GLM, Kimi, DeepSeek, MiMo and Muse.

Do not send Claude-style or Gemini-style top-level thinking to Chat Completions. For OpenAI-compatible GPT chat requests, use reasoning_effort or reasoning.effort when the selected model supports reasoning controls. Requests that include unsupported parameter families return a clear 400 invalid_request_error and are not retried on another execution path, because they are customer request contract errors rather than service availability errors.

When you call Claude-compatible claude-sonnet-5, claude-opus-4-8, or claude-opus-4-7 through Chat Completions, omit non-default temperature, top_p, and top_k. Those adaptive-only Claude models do not use explicit sampling controls; Quotaflow strips them where possible and uses adaptive thinking semantics instead. Use reasoning_effort or reasoning.effort when your client needs a depth hint.

Protocol boundary

Quotaflow preserves the Chat Completions contract on this endpoint. For OpenAI-compatible chat providers and local agents, requests stay as messages + optional tools + optional stream, and responses stay as chat.completion or chat.completion.chunk.

Do not send Responses-only fields such as input or previous_response_id to this endpoint. Use /responses when your client natively speaks the Responses API. Use the Anthropic-compatible Messages endpoint for Claude-style clients and the Gemini-compatible endpoint for Gemini-native contents/parts workflows.

Fast mode routing

Send the optional X-QuotaFlow-Routing: fast header to start a new conversation on the capacity predicted to give the first answer soonest, choosing the most economical option among those within 15 % of the fastest. It changes routing order only: the model, every request parameter, the response and the price are unchanged, the header is never forwarded upstream, later turns of a conversation stay where their prompt cache is, and any other value is ignored. See Fast mode routing.

Curl

curl https://api.quotaflow.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [{"role":"user","content":"Return only the word ready."}],
    "stream": false
  }'

Recommendation

Use /responses for Codex-style clients that natively speak Responses. Keep /chat/completions for OpenAI-compatible chat agents, Gemini, non-streaming GLM chat, Kimi chat, and older clients.