GPT-6.2 Astra API

OpenAI GPT-6.2 Astra is designed for complex analysis, software engineering, and multi-step tasks.

POST /v1/responses

Basic text request, SSE, and 30-minute and 12-hour cache usage.

Basic text request

Required parameters: model, input

Available parameters: model, input, max_output_tokens, stream

12-hour explicit cache

Required parameters: model, input, prompt_cache_options

Available parameters: model, prompt_cache_key, prompt_cache_options, input, max_output_tokens, stream

Request parameters

ParameterTypeRequiredDescription
modelstringYesModel identifier. Options: gpt-6.2-astra
inputarrayYesAccepts a string or a message array. Use the array form for explicit caching.
max_output_tokensintegerNoOutput budget, including reasoning and visible output.
streambooleanNoDefaults to false. Set true for SSE.
prompt_cache_keystringNoUse a stable cache routing key for the same prefix. Use a non-sensitive value.
prompt_cache_optionsobjectNoSet options here for explicit caching.
## Caching and streaming - Cache options are optional for a basic call. For a 12-hour write, enable explicit mode and mark the end of a stable prefix. The cacheable prefix must be at least 1,024 tokens and stay identical across requests. - Save the explicit-cache scenario as `request.json` and replace the cURL `--data-raw` argument with `--data-binary @request.json`. - `cached_tokens` measures reads. The write total includes both write lifetimes. Avoid adding the total to the two parts again. A missing part differs from a reported zero. - With `stream:true`, parse complete SSE events. Read text deltas from `response.output_text.delta` and final usage from the `response` in `response.completed`. Handle `response.incomplete`, `response.failed` and `error` as applicable. - Omit `temperature`, `top_p`, `logprobs`, `top_logprobs` and `message.output_text.logprobs`. [OpenAI prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching) · Reviewed November 18, 2026 ## Request and response fields ### Request | Field | Type | Description | | --- | --- | --- | | `model` | string | Model identifier. | | `input` | array | Accepts a string or a message array. Use the array form for explicit caching. | | `input[].role` | string | Message role. | | `input[].content` | array | Content blocks in this message. | | `input[].content[].type` | string | Error category. | | `input[].content[].text` | string | Text in this content block. | | `input[].content[].prompt_cache_breakpoint` | object | Explicit breakpoint at the end of the reusable prefix. | | `input[].content[].prompt_cache_breakpoint.mode` | string | Prompt cache mode at this scope. | | `max_output_tokens` | integer | Output budget, including reasoning and visible output. | | `stream` | boolean | Defaults to false. Set true for SSE. | | `prompt_cache_key` | string | Use a stable cache routing key for the same prefix. Use a non-sensitive value. | | `prompt_cache_options` | object | Set options here for explicit caching. | | `prompt_cache_options.mode` | string | Prompt cache mode at this scope. | | `prompt_cache_options.ttl` | string | Cache lifetime at this scope. | ### Success | Field | Type | Description | | --- | --- | --- | | `id` | string | Identifier of this object. | | `object` | string | Object type response. | | `model` | string | Model identifier. | | `status` | string | completed indicates completion. For incomplete, inspect incomplete_details. | | `incomplete_details` | object | Additional details when incomplete, if present. | | `incomplete_details.reason` | string | Reason for an incomplete response, such as max_output_tokens. | | `output` | array | Output items have types such as message, reasoning and tool items. Read text from output_text blocks in messages. | | `output[].id` | string | Identifier of this object. | | `output[].type` | string | Error category. | | `output[].role` | string | Message role. | | `output[].content` | array | Content blocks in this message. | | `output[].content[].type` | string | Error category. | | `output[].content[].text` | string | Text in this content block. | | `usage` | object | Usage reported at the terminal state. It can be absent on failure or interruption. | | `usage.input_tokens` | integer | Total input tokens, including tokens used for cache reads or writes. | | `usage.output_tokens` | integer | Total output tokens, including reasoning. | | `usage.total_tokens` | integer | Sum of input and output tokens. | | `usage.input_tokens_details` | object | Input breakdown. Read the fields actually returned. | | `usage.input_tokens_details.cached_tokens` | integer | Tokens reported as cache reads. | | `usage.input_tokens_details.cache_write_tokens` | integer | Total cache writes, including both reported lifetimes. | | `usage.input_tokens_details.cache_write_tokens_details` | object | Lifetime breakdown when reported. Read only the total if the breakdown is absent. | | `usage.input_tokens_details.cache_write_tokens_details.ttl_30m_tokens` | integer | 30-minute cache write tokens. A reported zero may be present. | | `usage.input_tokens_details.cache_write_tokens_details.ttl_12h_tokens` | integer | 12-hour cache write tokens. A reported zero may be present. | | `usage.output_tokens_details` | object | Output breakdown. | | `usage.output_tokens_details.reasoning_tokens` | integer | Reasoning tokens already included in total output. | ### Error | Field | Type | Description | | --- | --- | --- | | `error` | object | Error object. | | `error.message` | string | Human-readable error message. | | `error.type` | string | Error category. | | `error.code` | string | Machine-readable error code, which can be absent. | | `error.param` | string | Associated parameter, which may be null. |

Request example

curl --request POST https://api.router.ai/v1/responses \
  --header "Authorization: Bearer $API_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "model": "gpt-6.2-astra",
  "input": "Reply with a short name for a fictional blue paper boat.",
  "max_output_tokens": 64,
  "stream": false
}'