# GPT-6.2 Astra API

OpenAI's most capable model for demanding projects and reasoning.

Canonical page: https://routerhub.si/models/gpt-6.2-astra

- ID: `gpt-6.2-astra`
- Details and setup: https://routerhub.si/models/gpt-6.2-astra
- Provider: OpenAI
- Variant: Standard
- Protocols: responses (OpenAI-compatible Responses API, https://routerhub.si/v1/responses)
- Availability: preview
- Input per million tokens: $0.597908
- Output per million tokens: $2.98954
- Cached input per million tokens (cache hit): $0.0298954
- Cache write per million tokens: $0.747385
- Context limit: 1,050,000 tokens
- Maximum input: 922,000 tokens
- Maximum output: 128,000 tokens
- Compatible tools: OpenCode, Codex CLI, VS Code + Continue, cURL / Python

## RouterHub vs OpenAI API pricing

USD per 1 million tokens.

| Token type | RouterHub | Official API |
| --- | ---: | ---: |
| Input | $0.597908 | $8 |
| Output | $2.98954 | $40 |
| Cached input | $0.0298954 | $0.4 |
| Cache write | $0.747385 | $10 |

RouterHub costs 92% less at 1,000 input and 500 output tokens, before caching.

[Official pricing source](https://developers.openai.com/api/docs/models/gpt-6.2-astra) · Checked 2026-11-18.


## cURL

```bash
curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/responses \
  -H "Authorization: Bearer $ROUTERHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-6.2-astra","input":"Write a short noir scene set in a lighthouse.","max_output_tokens":256}'
```

## Python

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ROUTERHUB_API_KEY"],
    base_url="https://routerhub.si/v1",
    timeout=600.0,
    max_retries=0,
)
response = client.responses.create(
    model="gpt-6.2-astra",
    input="Write a short noir scene set in a lighthouse.",
    max_output_tokens=256,
)
print(response.output_text)
```

## Setup guides

- OpenCode: https://routerhub.si/guides/opencode
- Codex CLI: https://routerhub.si/guides/codex
- VS Code + Continue: https://routerhub.si/guides/vscode-continue
- cURL / Python: https://routerhub.si/docs/tools/api-request
