Developers / Docs / Reasoning

Reasoning

Reasoning models can work through a problem before they answer. On ARK, thinking is off unless you ask for it, so simple requests stay fast and cheap.

Which models reason

GET /api/v1/models marks reasoning models with "ark_reasoning": true. On ARK Cloud these are arklabsai/Qwen3.6-35B-A3B and arklabsai/Qwen3.5-122B-A10B.

Turn thinking on

Set reasoning_effort. ARK accepts OpenAI's whole range of values and maps them onto three levels:

You sendLevelEffect
nothing, none, minimal, lowlowNo thinking. The model answers directly.
mediummediumThinking on.
high, xhigh, maxhighThinking on.

The Qwen models think the same way at medium and high. reasoning: {"effort": "high"} is accepted as an alternative spelling.

response = client.chat.completions.create(
    model="arklabsai/Qwen3.5-122B-A10B",
    messages=[{"role": "user", "content": "A train leaves Szczecin at 9:12 and arrives in Warsaw at 14:47. How long is the trip?"}],
    reasoning_effort="high",
    max_tokens=4096,
)
message = response.choices[0].message
print("thinking:", message.reasoning)   # the SDK keeps unknown fields
print("answer:", message.content)
print("reasoning tokens:", response.usage.completion_tokens_details.reasoning_tokens)

Where the thinking goes

  • Non-streamed: the thinking is in choices[0].message.reasoning and the answer in content. The field is called reasoning, not reasoning_content.
  • Streamed: thinking arrives first as delta.reasoning, then the answer as delta.content.
  • Usage: completion_tokens_details.reasoning_tokens counts the thinking. Those tokens are part of completion_tokens and are billed as output.
Leave room for thinking

max_tokens covers thinking and answer together. A hard problem can spend thousands of tokens thinking; if the limit is hit first, finish_reason is length and the answer may be missing. Give reasoning requests a generous limit.

Reasoning and tools

When a request offers tools, the Qwen models answer without thinking, whatever reasoning_effort says. This keeps tool selection fast and predictable. Split planning and acting into separate requests if you need both.

Thinking in the conversation history

You do not need to send earlier thinking back. A reasoning field on an assistant message in messages is accepted and dropped.

With the Anthropic API

On /api/anthropic/v1/messages, use thinking: {"type": "enabled", "budget_tokens": 8192} or more selects the high level, a smaller budget the medium level, and {"type": "adaptive"} the medium level. The thinking comes back as a thinking content block. budget_tokens picks the level; it is not a hard cap. See Messages API.