/docs/en/api/chat-completions/Twelver Chat Completions API: Model Series & reasoning_effort
Reference for POST/api/ai/<config-id>/v1/chat/completions and GET/v1/models: model series, live rates, reasoning_effort, max_tokens, vision, and tools.
Endpoints & Authentication#
Point any OpenAI SDK or compatible coding agent (Cline, Kilo Code, OpenCode, Qwen Code, Codex CLI) at base URL https://twelver.app/api/ai/<config-id>/v1 with header Authorization: Bearer sk-<your-key>.
The <config-id> path segment selects your default model series (provisioned alongside your key via Create API key). Passing an explicit model in the JSON body overrides the config series; passing an unknown or raw checkpoint ID (such as qwen4-max instead of qwen-max) returns 404 model_not_found before any balance reservation.
- POST
https://twelver.app/api/ai/<config-id>/v1/chat/completions— synchronous and SSE streaming (stream: true) chat completions, function calling (tools), and vision input (image_url). - GET
https://twelver.app/api/ai/<config-id>/v1/models— returns all 15 public model series and their current backing models in OpenAI list format.
Active Model Series & Capabilities Matrix#
Series keys are versionless and durable: when a provider ships a new flagship checkpoint (for example, qwen-max moving to Qwen4-Max), existing configs upgrade automatically with zero code changes.
| Series (model) | Backing model | Context | Vision (image_url) | Default reasoning | Accepted reasoning_effort | Input / output ($ per 1M) |
|---|---|---|---|---|---|---|
| gpt | GPT-6 Luna | 1.05M (tier >272K) | Yes | off | none | low | medium | high | xhigh | 0.163 / 0.813 |
| qwen-flash | Qwen3.8-Flash | 1M | Yes | off | — | 0.244 / 0.764 |
| zai-flash | GLM-5.3-Flash | 1.3M | No | low | low | high | max | 0.244 / 0.813 |
| minimax | MiniMax M3.1 Flash | 1M | Yes | low | low | medium | high | max | 0.244 / 0.975 |
| deepseek-flash | DeepSeek V4.1 Flash | 1M | Yes | off | — | 0.488 / 1.95 |
| auto / qwen | Qwen3.7-Plus | 1M (tier >256K) | Yes | off | — | 0.65 / 2.6 |
| xiaomi | MiMo V2.6 Pro | 1M | Yes | off | — | 0.707 / 1.41 |
| gpt-terra | GPT-6.1 Terra | 1.05M (tier >272K) | Yes | medium | none | low | medium | high | xhigh | max | 1.63 / 8.13 |
| deepseek | DeepSeek V4 Pro | 1M | No | off | — | 2.15 / 6.44 |
| zai | GLM-5.3 | 1M | No | max | low | high | max | 2.28 / 7.15 |
| qwen-max | Qwen4-Max | 1M | Yes | high | none | low | medium | high | max | 2.44 / 7.31 |
| grok | Grok 4.7 | 500K (tier >200K) | Yes | high | low | medium | high | xhigh | 3.25 / 9.75 |
| gpt-sol | GPT-6.1 Sol | 1.05M (tier >272K) | Yes | medium | low | medium | high | xhigh | max | 3.25 / 16.25 |
| gpt-max | GPT-6 Astra | 1.05M | Yes | medium | low | medium | high | xhigh | max | 16.25 / 81.25 |
Verified against /api/pricing on 1 December 2026.
Controlling reasoning_effort & max_tokens Budgeting#
The proxy accepts both max_tokens and max_completion_tokens (with max_tokens taking precedence if both are sent) and translates to the upstream parameter automatically.
On reasoning-capable models (qwen-max, zai, minimax, grok, gpt-*), max_tokens caps reasoning tokens + visible answer tokens combined, and reasoning tokens bill at the model output rate.
- qwen-max (Qwen4-Max): defaults upstream to deep thinking (
"high"). Pass"reasoning_effort": "none"to disable thinking completely (0 reasoning tokens — recommended for fast completions or smallmax_tokenscaps), or"low"/"medium"/"high"/"max"to tune depth. (Use standardreasoning_effortrather than Alibaba-specific enable_thinking.) - minimax (MiniMax M3.1 Flash): thinking is always enabled; when
reasoning_effortis omitted, the proxy defaults it to"low". - zai (GLM-5.3) & grok (Grok 4.7): thinking cannot be disabled; pass
"reasoning_effort": "low"for minimum latency and spend. - gpt-terra, gpt-sol, gpt-max (plus gpt when tools are passed with effort !=
"none"): bridged over OpenAI Responses. Customtemperature/top_prequire"reasoning_effort": "none". When continuing multi-turn tool calls, replayassistant.responses_reasoningon the assistant message.
Frequently Asked Questions
Which Base URL and API key format should I configure in Cursor, Cline, OpenCode, or the OpenAI SDK?
Set Base URL to https://twelver.app/api/ai/<config-id>/v1 (OpenAI-compatible clients append /chat/completions automatically) and send Authorization: Bearer <api-key> with an sk-… key owned by the same account as the config-id.
Which reasoning_effort values are accepted, and why can custom temperature return HTTP 400?
Accepted reasoning_effort values are none, minimal, low, medium, high, xhigh, max (per-series subsets are listed in the capability table above). On bridged GPT series (gpt-terra, gpt-sol, gpt-max), passing custom temperature or top_p requires reasoning_effort: "none".
How do I preserve reasoning state across multi-turn tool calls?
On Responses-bridged GPT series, assistant tool-call turns include a responses_reasoning field — echo that field back unchanged on the assistant message when sending tool results.
Inspect raw Markdown (LLM / @Docs source)
# Twelver Chat Completions API: Model Series & reasoning_effort
> Reference for POST /api/ai/<config-id>/v1/chat/completions and GET /v1/models: model series, live rates, reasoning_effort, max_tokens, vision, and tools.
Canonical URL: https://twelver.app/docs/en/api/chat-completions/
## Endpoints & Authentication
Point any OpenAI SDK or compatible coding agent (Cline, Kilo Code, OpenCode, Qwen Code, Codex CLI) at base URL https://twelver.app/api/ai/<config-id>/v1 with header Authorization: Bearer sk-<your-key>.
The <config-id> path segment selects your default model series (provisioned alongside your key via Create API key). Passing an explicit model in the JSON body overrides the config series; passing an unknown or raw checkpoint ID (such as qwen4-max instead of qwen-max) returns 404 model_not_found before any balance reservation.
- POST https://twelver.app/api/ai/<config-id>/v1/chat/completions — synchronous and SSE streaming (stream: true) chat completions, function calling (tools), and vision input (image_url).
- GET https://twelver.app/api/ai/<config-id>/v1/models — returns all 15 public model series and their current backing models in OpenAI list format.
**TypeScript (official OpenAI SDK)**
```typescript
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://twelver.app/api/ai/<config-id>/v1',
apiKey: process.env.TWELVER_API_KEY, // sk-...
});
const res = await client.chat.completions.create({
model: 'qwen-max', // Qwen4-Max; pass 'qwen' for Qwen3.7-Plus
reasoning_effort: 'low', // 'none' disables thinking on qwen-max; 'low' | 'medium' | 'high' | 'max'
max_tokens: 4096,
messages: [
{ role: 'user', content: 'Design an idempotent webhook consumer in TypeScript.' },
],
});
console.log(res.choices[0]?.message.content);
```
## Active Model Series & Capabilities Matrix
Series keys are versionless and durable: when a provider ships a new flagship checkpoint (for example, qwen-max moving to Qwen4-Max), existing configs upgrade automatically with zero code changes.
| Series (model) | Backing model | Context | Vision (image_url) | Default reasoning | Accepted reasoning_effort | Input / output ($ per 1M) |
| --- | --- | --- | --- | --- | --- | --- |
| gpt | GPT-6 Luna | 1.05M (tier >272K) | Yes | off | none \| low \| medium \| high \| xhigh | 0.163 / 0.813 |
| qwen-flash | Qwen3.8-Flash | 1M | Yes | off | — | 0.244 / 0.764 |
| zai-flash | GLM-5.3-Flash | 1.3M | No | low | low \| high \| max | 0.244 / 0.813 |
| minimax | MiniMax M3.1 Flash | 1M | Yes | low | low \| medium \| high \| max | 0.244 / 0.975 |
| deepseek-flash | DeepSeek V4.1 Flash | 1M | Yes | off | — | 0.488 / 1.95 |
| auto / qwen | Qwen3.7-Plus | 1M (tier >256K) | Yes | off | — | 0.65 / 2.6 |
| xiaomi | MiMo V2.6 Pro | 1M | Yes | off | — | 0.707 / 1.41 |
| gpt-terra | GPT-6.1 Terra | 1.05M (tier >272K) | Yes | medium | none \| low \| medium \| high \| xhigh \| max | 1.63 / 8.13 |
| deepseek | DeepSeek V4 Pro | 1M | No | off | — | 2.15 / 6.44 |
| zai | GLM-5.3 | 1M | No | max | low \| high \| max | 2.28 / 7.15 |
| qwen-max | Qwen4-Max | 1M | Yes | high | none \| low \| medium \| high \| max | 2.44 / 7.31 |
| grok | Grok 4.7 | 500K (tier >200K) | Yes | high | low \| medium \| high \| xhigh | 3.25 / 9.75 |
| gpt-sol | GPT-6.1 Sol | 1.05M (tier >272K) | Yes | medium | low \| medium \| high \| xhigh \| max | 3.25 / 16.25 |
| gpt-max | GPT-6 Astra | 1.05M | Yes | medium | low \| medium \| high \| xhigh \| max | 16.25 / 81.25 |
_Verified against /api/pricing on 1 December 2026._
## Controlling reasoning_effort & max_tokens Budgeting
The proxy accepts both max_tokens and max_completion_tokens (with max_tokens taking precedence if both are sent) and translates to the upstream parameter automatically.
On reasoning-capable models (qwen-max, zai, minimax, grok, gpt-*), max_tokens caps reasoning tokens + visible answer tokens combined, and reasoning tokens bill at the model output rate.
- qwen-max (Qwen4-Max): defaults upstream to deep thinking ("high"). Pass "reasoning_effort": "none" to disable thinking completely (0 reasoning tokens — recommended for fast completions or small max_tokens caps), or "low" / "medium" / "high" / "max" to tune depth. (Use standard reasoning_effort rather than Alibaba-specific enable_thinking.)
- minimax (MiniMax M3.1 Flash): thinking is always enabled; when reasoning_effort is omitted, the proxy defaults it to "low".
- zai (GLM-5.3) & grok (Grok 4.7): thinking cannot be disabled; pass "reasoning_effort": "low" for minimum latency and spend.
- gpt-terra, gpt-sol, gpt-max (plus gpt when tools are passed with effort != "none"): bridged over OpenAI Responses. Custom temperature / top_p require "reasoning_effort": "none". When continuing multi-turn tool calls, replay assistant.responses_reasoning on the assistant message.
## Frequently Asked Questions
### Which Base URL and API key format should I configure in Cursor, Cline, OpenCode, or the OpenAI SDK?
Set Base URL to https://twelver.app/api/ai/<config-id>/v1 (OpenAI-compatible clients append /chat/completions automatically) and send Authorization: Bearer <api-key> with an sk-… key owned by the same account as the config-id.
### Which reasoning_effort values are accepted, and why can custom temperature return HTTP 400?
Accepted reasoning_effort values are none, minimal, low, medium, high, xhigh, max (per-series subsets are listed in the capability table above). On bridged GPT series (gpt-terra, gpt-sol, gpt-max), passing custom temperature or top_p requires reasoning_effort: "none".
### How do I preserve reasoning state across multi-turn tool calls?
On Responses-bridged GPT series, assistant tool-call turns include a responses_reasoning field — echo that field back unchanged on the assistant message when sending tool results.