> Treat every model id, price, size, length and limit in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /v1/models and GET /public/models on the Flow AI API.

# Reasoning

> Let the model think before it answers.

Reasoning models think through a problem before they answer. The thinking takes extra tokens, which you pay for as output, and usually gives better answers on maths, code and multi-step problems.

## Reasoning effort

Use `reasoning_effort` to trade quality for cost and speed. Models that support it take `"low"`, `"medium"` or `"high"`; some also take `"minimal"`.

**`Python`**

```python title="Python"
response = client.chat.completions.create(
    model="openai/gpt-6-luna",
    messages=[{"role": "user", "content": "How many prime numbers are there below 100?"}],
    reasoning_effort="low",
)
print(response.choices[0].message.content)
print(response.usage.completion_tokens_details.reasoning_tokens)
```

**`TypeScript`**

```typescript title="TypeScript"
const response = await client.chat.completions.create({
  model: 'openai/gpt-6-luna',
  messages: [{ role: 'user', content: 'How many prime numbers are there below 100?' }],
  reasoning_effort: 'low',
})
console.log(response.choices[0].message.content)
console.log(response.usage?.completion_tokens_details?.reasoning_tokens)
```

`reasoning_effort` is the only reasoning setting Flow AI passes on. A host's own reasoning options, such as a thinking budget, are removed from the request.

## Seeing the reasoning

Some models return their thinking in `message.reasoning_content`. Others keep it hidden and only report how many tokens it took, in `usage.completion_tokens_details.reasoning_tokens`.

## Billing

Reasoning tokens are charged as output, even when you can't see them. Where a model prices reasoning higher than output, the hold uses the higher price. Set `max_tokens` with room for both the thinking and the answer: if the model runs out while thinking, you pay for the thinking and get no answer.