gpt-6.2-astra
Call GPT-6.2 Astra, OpenAI's most capable GPT-6.2 model for hard reasoning, coding and documents, through reAPI's Chat Completions endpoint with text or image input, structured outputs and streaming, billed per token.
OpenAI's GPT-6.2 Astra — "our most capable model for your hardest projects,
from start to finish" — exposed through reAPI as an OpenAI-compatible Chat
Completions endpoint. A 1,050,000-token context window (up to
922,000 input tokens), 128,000 max output tokens, text and image
input, structured outputs and streaming. The wire model id is
gpt-6.2-astra. Current rates live on the
model page.
Quick example
curl https://reapi.ai/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.2-astra",
"messages": [
{ "role": "user", "content": "Find the race condition: two goroutines append to a shared slice guarded by a mutex that is copied by value into each worker. Return the cause and the fix." }
],
"reasoning_effort": "medium",
"max_completion_tokens": 4000,
"stream": true
}'from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://reapi.ai/api/v1",
)
stream = client.chat.completions.create(
model="gpt-6.2-astra",
messages=[{"role": "user", "content": "Find the race condition: two goroutines append to a shared slice guarded by a mutex that is copied by value into each worker. Return the cause and the fix."}],
reasoning_effort="medium",
max_completion_tokens=4000,
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content if chunk.choices else None
if delta:
print(delta, end="")import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://reapi.ai/api/v1",
});
const stream = await client.chat.completions.create({
model: "gpt-6.2-astra",
messages: [{ role: "user", content: "Find the race condition: two goroutines append to a shared slice guarded by a mutex that is copied by value into each worker. Return the cause and the fix." }],
reasoning_effort: "medium",
max_completion_tokens: 4000,
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
body, _ := json.Marshal(map[string]any{
"model": "gpt-6.2-astra",
"messages": []map[string]string{
{"role": "user", "content": "Find the race condition: two goroutines append to a shared slice guarded by a mutex that is copied by value into each worker. Return the cause and the fix."},
},
"reasoning_effort": "medium",
"max_completion_tokens": 4000,
})
req, _ := http.NewRequest("POST",
"https://reapi.ai/api/v1/chat/completions", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}Authentication
Use your reAPI API key — the same key that calls the image, video and audio endpoints — as a bearer token:
Authorization: Bearer YOUR_API_KEYCreate one under API keys in your reAPI dashboard. Chat requests are billed from the same credit balance as every other model on the platform.
Endpoint
POST /api/v1/chat/completionsBase URL https://reapi.ai/api/v1. The wire format is OpenAI-compatible, so the
same SDKs work once you swap the base URL, the key and the model string.
OpenAI lists v1/chat/completions, v1/responses and v1/batch for
GPT-6.2 Astra, and its changelog states: "Both models support the Responses API
and Chat Completions. Tool calling requires the Responses API." reAPI serves
this model through Chat Completions; see Tool calling.
Request body
Default is OpenAI's documented default. Every field is forwarded unchanged
unless its row says otherwise; when the model rejects a value, its error
message comes back inside reAPI's error envelope. An accepted field (200) is
not proof that it changed the answer.
| Field | Type | Default | Notes |
|---|---|---|---|
model | string | — | Must be gpt-6.2-astra exactly. Required. |
messages | array | — | Conversation history: system, developer, user, assistant, tool roles. Text and image parts — see Image input. Required. |
reasoning_effort | enum | — | OpenAI: the API rejects none. The playground offers low, medium, high, xhigh — see reasoning_effort. |
max_completion_tokens | integer | model limit | Upper bound on generated tokens, reasoning included, up to 128,000. Omitted → 128,000. |
max_tokens | integer | — | Deprecated by OpenAI in favour of max_completion_tokens. reAPI sends its value as max_completion_tokens (when both are set, the smaller one). |
stream | boolean | false | Server-sent events ending with data: [DONE]. |
stream_options | object | — | On streamed requests reAPI replaces it with { "include_usage": true }, so the last data chunk carries usage. |
response_format | object | text | OpenAI lists structured outputs for this model. |
n | integer | 1 | Forwarded. Every returned choice is billed. |
tools, tool_choice, parallel_tool_calls | array, enum/object, boolean | —, auto, — | OpenAI: tool calling requires the Responses API. See Tool calling. |
prediction | object | — | OpenAI lists predicted outputs as unsupported for this model. |
temperature, top_p, frequency_penalty, presence_penalty, stop, seed, logprobs, top_logprobs, logit_bias, verbosity, service_tier, prompt_cache_key, prompt_cache_retention, store, metadata, safety_identifier, user | — | OpenAI defaults | Forwarded unchanged for the model to accept or reject. |
Checked before anything is forwarded or charged:
- the body is a JSON object of at most 33,554,432 bytes (
413above that) modelis exactlygpt-6.2-astra(surrounding whitespace is ignored)messagesis a non-empty array, and every entry is an object with a non-emptyrolestream, when present, is a booleanmax_completion_tokens/max_tokens, when present and notnull, is a positive integer no larger than 128,000n, when present and notnull, is a positive integer
Everything else, including fields not in the table, is passed through for the model to accept or reject.
reasoning_effort
OpenAI's model page: "The API rejects requests that set reasoning effort to
none." The page does not publish the full list of levels or the default.
The playground on the model page
offers low, medium, high and xhigh, starting at medium. Other values
are forwarded unchanged.
| Effort | When to use it |
|---|---|
low | Short reasoning: clear extraction, small fixes, routine edits |
medium | The playground default |
high | Multi-file changes, long documents, conflicting requirements |
xhigh | The hardest cases |
Reasoning tokens bill as output. max_completion_tokens caps them together
with the visible answer.
Tool calling
OpenAI's changelog for GPT-6.2: "Tool calling requires the Responses API." OpenAI lists the hosted tools for this model (web search, file search, code interpreter, computer use, MCP and others) under the Responses API.
This page serves GPT-6.2 Astra through Chat Completions, so send requests
without tools. Structured outputs, image input and streaming are documented
for Chat Completions.
Image input
| Modality | Supported |
|---|---|
| Text in | ✅ |
| Image in | ✅ |
| Text out | ✅ |
| Audio in / out | ❌ |
| Video in | ❌ |
Images go in as image_url content parts with a public HTTP(S) URL. Image
tokens count as input. Output is text only.
Troubleshooting
| Failure | What it means | What to do |
|---|---|---|
400 naming a field | A check in the list above failed | Fix the field; nothing was charged |
400 "Unsupported model" | model is not gpt-6.2-astra | Send the id exactly — gpt-6-astra is the previous Astra |
400 about reasoning_effort | The model rejected the level, for example none | Use low, medium, high or xhigh |
400 about tools | Tool calling requires the Responses API | Call GPT-6.2 Astra without tools on this endpoint |
401 | Missing or invalid API key | Create a key under API keys in the reAPI dashboard |
402 | Insufficient balance | Top up your reAPI credits |
413 | Body larger than 33,554,432 bytes | Shorten the conversation or send images by URL |
Failures use the standard envelope: error.code, error.message,
error.type and error.request_id. See the
errors catalog.
Response envelope
Non-streaming (stream: false)
{
"id": "req_...",
"object": "chat.completion",
"created": 1795400000,
"model": "gpt-6.2-astra",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 120,
"completion_tokens": 48,
"total_tokens": 168,
"prompt_tokens_details": { "cached_tokens": 0 },
"completion_tokens_details": { "reasoning_tokens": 0 }
}
}id is the reAPI request id (req_…), the same value as error.request_id
on a failure — quote it to support. usage.completion_tokens includes
reasoning tokens, and usage.prompt_tokens_details.cached_tokens is the part of
the prompt billed at the cache-read rate.
Streaming (stream: true)
Server-sent events, each data: line carrying a chat.completion.chunk with the
incremental text in choices[0].delta.content. The last chunk before
data: [DONE] carries usage; a chunk with an empty choices array is
normal and should be skipped.
Groups
See the model page’s live group prices. Copy the complete model ID shown for the group you want and use it in the normal model field. The same reAPI key works across available groups; no separate group key is needed.
The bare gpt-6.2-astra model ID uses its default group. For programmatic discovery and compatibility details, see LLM groups.
Pricing
GPT-6.2 Astra bills per token, from your reAPI credit balance:
cost = input × input_rate + cache_read × cache_read_rate
+ cache_write × cache_write_rate + output × output_rate
1 credit = $0.001
$1 = 1,000 credits1. Cache reads and writes have their own rates
Prompt tokens served from cache (usage.prompt_tokens_details.cached_tokens)
bill at the cache-read rate, 5% of the input rate. The first request that
writes a prefix to the cache bills those tokens at the cache-write rate. Keep
a stable prefix — system message, instructions, reference documents — at the
start of the conversation so repeat requests hit the cache.
2. Reasoning tokens are output
usage.completion_tokens includes reasoning tokens. reasoning_effort and
max_completion_tokens are the levers on cost.
3. Prompts over 272K input tokens re-price the whole request
OpenAI's rule for this model: over 272K input tokens, input and cache rates double and output costs 1.5 times the short-context rate, for the full request. The long-context rates are listed separately on the model page.
Current numbers are on the model page — that table is the canonical source, not this page.
Related
- GPT-6.2 Astra model page — current rates and playground
- GPT-6.2 Sol — OpenAI's everyday GPT-6.2 model
- GPT-6 Astra — the previous Astra
- GPT-6.1 Sol
- Errors catalog
- Authentication