# o1

o1 adds everything the preview lacked: function calling, structured outputs, vision, and developer system messages. It also uses 60% fewer reasoning tokens per request than o1-preview.

- **Model ID:** `openai/o1`
- **Type:** chat
- **Providers:** azure
- **Context window:** 200,000
- **Maximum output tokens:** 100,000
- **Pricing:** $15.0/1M input tokens, $60.0/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/o1

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'openai/o1',
  prompt: 'Why is the sky blue?'
})
```

## About

OpenAI released o1 on December 5, 2024 as `o1-2024-12-17`. This is the point where OpenAI's reasoning architecture became production-ready. The September 2024 preview proved the concept: chain-of-thought reasoning scoring 83% on International Mathematical Olympiad (IMO) qualifying problems. But it shipped without the API features production systems depend on. The production o1 fills those gaps.

Function calling means o1 can participate in agentic workflows: querying databases, hitting APIs, and invoking tools mid-reasoning. Structured Outputs via constrained JSON schema decoding let downstream systems consume responses without fragile parsing. Developer system messages restore the ability to set behavioral constraints and context. Vision input enables reasoning over images, circuit diagrams, mathematical notation in photographs, and charts that require interpretation.

The efficiency gains are equally significant. o1 uses 60% fewer reasoning tokens on average compared to o1-preview for equivalent quality. Fewer reasoning tokens means lower cost per request and shorter time-to-first-token. The context window of 200K tokens (expanded from the preview's 128K) accommodates the longer inputs that complex reasoning tasks demand.

The `reasoning_effort` parameter, unique to the production o1, controls how deeply the model thinks. Set it low for questions where a quick chain of thought suffices. Set it high for problems that genuinely require extended deliberation. In a pipeline mixing easy and hard queries, this single parameter can cut aggregate reasoning token spend substantially.

## What to consider

The `reasoning_effort` parameter lets you dial reasoning depth up or down per request. A single deployment can handle both lightweight queries and hard problems without switching models or endpoints.

## When to use

### Best For

- Agentic pipelines that combine deep reasoning with tool calls; function calling and structured outputs make o1 a complete agent backbone
- Mathematical problem solving, multi-step proofs, and quantitative analysis requiring verified chain-of-thought
- Complex debugging and architecture review where the model benefits from working through multiple approaches before committing
- Mixed-difficulty workloads where `reasoning_effort` lets you optimize cost per request without switching models
- Visual reasoning tasks: interpreting charts, diagrams, or handwritten notation as part of a larger analytical problem

### Consider Alternatives When

- The task is conversational or generative and doesn't benefit from extended chain-of-thought; GPT-4o or GPT-4.1 will respond faster and more cheaply
- Only STEM reasoning is needed and cost efficiency is critical; o1-mini offers nearly equivalent math and coding scores at lower cost
- Real-time, streaming, low-latency responses are required; reasoning token generation introduces inherent latency

## Best for

- **Agentic pipelines:** Function calling and structured outputs make o1 a complete agent backbone that combines deep reasoning with tool calls
- **Mathematical problem solving:** Multi-step proofs and quantitative analysis requiring verified chain-of-thought
- **Complex debugging:** Architecture review where the model benefits from working through multiple approaches before committing
- **Mixed-difficulty workloads:** `reasoning_effort` lets you optimize cost per request without switching models
- **Visual reasoning:** Interpreting charts, diagrams, or handwritten notation as part of a larger analytical problem

## Consider alternatives

- **Conversational or generative tasks:** GPT-4o or GPT-4.1 respond faster and more cheaply when extended chain-of-thought isn't needed
- **Cost-sensitive STEM reasoning:** o1-mini offers nearly equivalent math and coding scores at lower cost
- **Low-latency streaming:** Reasoning token generation introduces inherent latency that real-time responses can't tolerate

## Frequently asked questions

### How does `reasoning_effort` affect cost and latency in practice?

Lower effort values reduce the number of reasoning tokens the model generates before answering, which directly lowers both cost (reasoning tokens are billed as output) and time-to-first-token. A pipeline that sets low effort for simple queries and high effort for complex ones can cut aggregate reasoning spend significantly.

### What production capabilities does o1 have that the preview lacked?

Function calling for tool use, developer system messages for behavioral control, Structured Outputs via JSON schema constrained decoding, and vision input for image reasoning. The preview supported none of these.

### How much did the context window expand from the preview?

The preview offered 128K tokens. The production o1 supports 200K tokens, enabling substantially longer documents, conversation histories, and multi-source inputs in reasoning tasks.

### Can o1 be used as the reasoning layer in an agent that calls external APIs?

Yes. Function calling support means o1 can invoke tools mid-reasoning, receive results, and incorporate them into its chain of thought. Combined with Structured Outputs, it can produce machine-readable action plans that downstream orchestrators consume directly.

### Why does o1 use 60% fewer reasoning tokens than the preview?

OpenAI optimized the production model's reasoning efficiency. It reaches equivalent quality conclusions with fewer intermediate steps, which translates to lower per-request cost and faster responses.

### Is o1 appropriate for every query in a general-purpose chatbot?

No. Reasoning token generation adds latency and cost that is wasted on simple questions. For general chat, GPT-4o or GPT-4.1 are faster and cheaper. Reserve o1 for the subset of queries that genuinely benefit from extended deliberation, or use `reasoning_effort` at a low setting to triage.

## Links

- [Model page](https://vercel.com/ai-gateway/models/o1)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://platform.openai.com/docs/models/o1)
- [Provider pricing](https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service)
