Creates a chat completion using the Supai AI service.
This endpoint is compatible with the OpenAI chat completions API format, with additional Supai-specific features.
auto: Automatically selects the optimal mode for your taskfast: Instant responses for trivial tasks (1 model, minimal thinking)thinking: Default mode for most development work (3 models, medium thinking)deep-thinking: Advanced problem-solving for complex challenges (6 models, high thinking)pro: Maximum rigor for high-stakes, mission-critical work (9 models, extra-high thinking)Requires a valid API key passed via the Authorization header as a Bearer token.
API key authentication. Use your Supai API key as the bearer token.
List of messages in the conversation. Must end with a user message.
1[
{
"content": "You are a helpful assistant.",
"role": "system"
},
{ "content": "Hello!", "role": "user" }
]User environment context including date, location, and name
Whether to include Supai-specific chunk data in the stream
false
The mode ID to use for generation. "auto" will automatically select the best mode.
auto, deep-thinking, fast, pro, thinking "auto"
Specific model IDs to use. If null, all non-deprecated models are available.
alibaba/qwen-3-235b, alibaba/qwen3-coder-30b-a3b, alibaba/qwen3-max, alibaba/qwen3-next-80b-a3b-thinking, alibaba/qwen3-vl-thinking, anthropic/claude-4.5-haiku, anthropic/claude-opus-4.1, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.5, deepseek/deepseek-v3.2, deepseek/deepseek-v3.2-exp, deepseek/deepseek-v3.2-exp-thinking, deepseek/deepseek-v3.2-speciale, deepseek/deepseek-v3.2-thinking, google/gemini-2.5-flash, google/gemini-2.5-flash-image, google/gemini-2.5-flash-lite, google/gemini-2.5-pro, google/gemini-3-flash, google/gemini-3-pro-image, google/gemini-3-pro-preview, meta/llama-3.3-70b, meta/llama-4-maverick, meta/llama-4-scout, minimax/minimax-m2, minimax/minimax-m2.1, mistral/magistral-medium, mistral/mistral-large, mistral/mistral-medium, mistral/mistral-small, mistral/pixtral-12b, moonshotai/kimi-k2-thinking-turbo, moonshotai/kimi-k2-turbo, openai/gpt-5, openai/gpt-5-mini, openai/gpt-5-nano, openai/gpt-5-pro, openai/gpt-5.1, openai/gpt-5.1-instant, openai/gpt-5.1-thinking, openai/gpt-5.2, openai/gpt-5.2-pro, xai/grok-4, xai/grok-4-fast-non-reasoning, xai/grok-4-fast-reasoning, xai/grok-4.1-fast-non-reasoning, xai/grok-4.1-fast-reasoning, zai/glm-4.5-air, zai/glm-4.6, zai/glm-4.6v, zai/glm-4.7 null
Whether to stream the response using Server-Sent Events
true
Options for streaming responses
Successful chat completion response. Returns JSON for non-streaming or SSE for streaming.
List of generated responses
Unix timestamp of when the response was created
1705312200
Unique identifier for the chat completion
"chatcmpl-abc123"
The mode used for this completion
"auto"
chat.completion