API guides

GPT-6 Astra API guide: chat completions and responses

Call GPT-6 Astra on DreamTo with Chat Completions or Responses: request shape, streaming, reasoning effort, verbosity, tools, limits and token prices.

A wooden marionette dances on strings in a yellow spotlight between parted purple and coral stage curtains, with golden dust drifting
On this page

GPT-6 Astra is available on DreamTo under the model ID gpt-6-astra, through the same two OpenAI-compatible endpoints as the rest of the GPT family: POST /v1/chat/completions and POST /v1/responses. It takes text and image input, has a 1.05M-token context window, returns up to 128K output tokens and supports function calling. If you have an OpenAI SDK client, calling it is a base URL change and a model string.

This guide is the request-level view: a first call, streaming, the parameters the catalog lists for this model, the Responses differences, what the endpoints do not do, and what a request costs. All samples read the key from $DREAMTO_API_KEY and use the base URL https://api.dreamto.ai.

What you are calling#

The catalog describes gpt-6-astra as the first GPT-6 model and the top tier of that generation: a reasoning model for complex coding and professional work. Its listed uses are the long-evidence kind of task: rehearsing an interrupted migration, reviewing an incident from alerts, release history and logs, auditing interface compatibility between old and new definitions, and comparing a baseline specification with a revised draft.

There is a newer sibling, GPT-6.2 Astra (gpt-6.2-astra). The two share the same endpoints, the same parameter list and the same limits in the catalog, so moving between them is a change to the model string. The differences that show up in the sources are price and the details below.

gpt-6-astragpt-6.2-astra
InputText and imageText and image
Context window1.05M tokens1.05M tokens
Max output128K tokens128K tokens
Function callingYesYes
reasoning_effort valueslow, medium, high, xhighlow, medium, high, xhigh
verbosity valueslow, medium, highlow, medium, high
EndpointsChat Completions, ResponsesChat Completions, Responses

For the 6.2 pair, see the GPT-6.2 API guide.

A first Chat Completions request#

Chat Completions is the most widely used chat protocol: a list of messages in, the model's reply out. Put the system prompt in a message with the system role; the docs say that works with every model.

bash
curl "https://api.dreamto.ai/v1/chat/completions" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-6-astra",    "messages": [      {"role": "system", "content": "You are a rigorous reviewer. Separate observations from inferences."},      {"role": "user", "content": "A cutover failed halfway: the new schema is live, two legacy clients still write the old fields. List the rollback signals in the order to check them."}    ]  }'

The reply is a chat.completion object. The text is in choices[0].message.content and the token counts are in usage.

The same call with the OpenAI Python SDK:

python
import osfrom openai import OpenAIclient = OpenAI(    base_url="https://api.dreamto.ai/v1",    api_key=os.environ["DREAMTO_API_KEY"].strip(),)completion = client.chat.completions.create(    model="gpt-6-astra",    messages=[        {"role": "system", "content": "You are a rigorous reviewer. Separate observations from inferences."},        {"role": "user", "content": "Summarise what a rollback signal is in two sentences."},    ],)print(completion.choices[0].message.content)print(completion.usage)

Parameters the catalog lists#

The catalog's parameter list for gpt-6-astra is short. These are the fields it names:

ParameterWhat the catalog says
messagesRequired. OpenAI-compatible message array
max_tokensLimits the maximum output length of the response
streamStreaming response, default false
response_formatStructured output format, for example {"type": "json_object"}
toolsOpenAI function-calling definitions
tool_choiceauto, none or a specific tool
reasoning_effortlow, medium, high, xhigh
verbositylow, medium, high
temperatureListed, default 1

Reasoning effort#

reasoning_effort sets how much the model reasons before it answers. The catalog says the list shows the levels verified to work on this model and that unlisted levels are rejected upstream, so stay with the four values in the table. The generic API reference enumerates more values (none, minimal, max) because it covers every reasoning model, and it notes that not every model supports every value. The model's feature text also mentions max for Responses, which the parameter list does not verify, so test it before relying on it. The catalog also says the reasoning for this model starts at low.

The catalog's advice for choosing a level: run the same set of reproducible cases at each effort level and check whether each setting captures the same evidence, dependencies and edge conditions. The GPT-6.2 Astra entry adds that you should record correctness, elapsed time and token use for each run.

Verbosity#

verbosity controls how detailed the answer is: low is more concise, high more thorough. The catalog marks it as verified on this model and not guaranteed for other models in the same official series, so do not copy a request that works here onto an unrelated model without testing it.

bash
curl "https://api.dreamto.ai/v1/chat/completions" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-6-astra",    "reasoning_effort": "high",    "verbosity": "low",    "max_completion_tokens": 4096,    "messages": [      {"role": "user", "content": "Here are the old and new interface definitions and three representative payloads. List the impact on each caller and one new test per change."}    ]  }'

Output length and sampling#

The catalog lists max_tokens; the API reference marks the same cap as max_completion_tokens, described as an upper bound that includes visible output tokens and reasoning tokens. For a reasoning model that distinction matters, because a low cap can be used up by reasoning before the visible answer is complete. The sample above uses max_completion_tokens.

temperature is the one to test before relying on it. The catalog lists it with a default of 1, while the docs say reasoning models reject temperature and that an unsupported parameter is answered with a 400 by the model. Send a small request with your sampling settings first; if it returns a 400, drop the parameter.

Structured output#

response_format takes {"type": "json_object"} for JSON mode. The API reference also describes json_schema, which enforces your schema, and says it is preferred where the model supports it. The catalog's tip for this model is to define the fields, include an output example, and say how missing values should appear before the result goes to downstream code.

python
completion = client.chat.completions.create(    model="gpt-6-astra",    response_format={"type": "json_object"},    messages=[        {            "role": "user",            "content": (                "Return JSON with keys 'caller', 'impact' and 'test' for each caller below. "                "Use null for a missing value.\n\n"                "billing-web: reads invoice.total_cents\n"                "mobile-app: reads invoice.total"            ),        }    ],)print(completion.choices[0].message.content)

Streaming#

Add "stream": true and the reply arrives as server-sent events. Each frame is a chat.completion.chunk and the last one is data: [DONE]. The docs say the final chunk of a streamed request carries usage.

python
stream = client.chat.completions.create(    model="gpt-6-astra",    messages=[{"role": "user", "content": "Write a four-line poem about autumn."}],    stream=True,)for chunk in stream:    if chunk.choices and chunk.choices[0].delta.content:        print(chunk.choices[0].delta.content, end="")

Check chunk.choices before reading it, as the docs sample does, since the final chunk carries usage. If a streamed request fails after streaming has started, the error appears inside the stream and the HTTP status stays 200, so a client that only checks the status code will miss it. See also Streaming chat completions.

Images and tools#

An image goes into a user message as an image_url content part next to the text. The url is either an image URL or Base64 image data, and detail is optional.

bash
curl "https://api.dreamto.ai/v1/chat/completions" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-6-astra",    "messages": [      {        "role": "user",        "content": [          {"type": "text", "text": "Compare this architecture diagram with the dependency list below and name any service the diagram omits.\n\nbilling-api, ledger, notifier"},          {"type": "image_url", "image_url": {"url": "https://your-cdn.example.com/architecture.png"}}        ]      }    ]  }'

Function calling uses the tools array and tool_choice. The model answers with tool_calls; you run the function, send the result back in a role: tool message with the matching tool_call_id, and call the endpoint again.

python
import jsontools = [    {        "type": "function",        "function": {            "name": "lookup_caller",            "description": "Return the owner and compatibility period of a service that calls an interface.",            "parameters": {                "type": "object",                "properties": {"service": {"type": "string"}},                "required": ["service"],            },        },    }]messages = [{"role": "user", "content": "Who owns billing-web and how long does it need the old contract?"}]first = client.chat.completions.create(    model="gpt-6-astra", messages=messages, tools=tools, tool_choice="auto")reply = first.choices[0].messageif reply.tool_calls:    messages.append(reply)    for call in reply.tool_calls:        args = json.loads(call.function.arguments)        result = f"{args['service']}: owned by the payments team, old contract needed for 30 days"        messages.append(            {"role": "tool", "tool_call_id": call.id, "content": result}        )    final = client.chat.completions.create(model="gpt-6-astra", messages=messages, tools=tools)    print(final.choices[0].message.content)else:    print(reply.content)

The lookup result above is a stub; replace it with your own function. For the full pattern, see the function calling guide.

The Responses endpoint#

Responses is OpenAI's newer interface for the GPT family. The input is a string or a list of messages, images and tool results; the output is a list of typed items such as messages, reasoning and function calls. The docs say reasoning models work best here and that the streaming events are finer-grained. The DreamTo catalog lists /v1/responses as a public endpoint for gpt-6-astra.

Compared with Chat Completions, effort moves into a reasoning object:

bash
curl "https://api.dreamto.ai/v1/responses" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-6-astra",    "reasoning": {"effort": "medium"},    "input": "Rehearse a rollback for a schema migration that two legacy clients still write to. List signals in execution order."  }'

In the Python SDK the call is client.responses.create(...) and the text is in response.output_text. Streaming uses typed events: response.created, response.output_text.delta and finally response.completed, which carries the complete Response object and usage.

python
stream = client.responses.create(    model="gpt-6-astra",    input="Write a four-line poem about autumn.",    stream=True,)for event in stream:    if event.type == "response.output_text.delta":        print(event.delta, end="")

Because only the create call exists (next section), a multi-turn conversation means you keep the history yourself. For reasoning models, the docs say to pass the items of the previous output, including reasoning, back in the next input unchanged. More on the endpoint in The OpenAI Responses API on DreamTo.

What the endpoints do not do#

The docs list these limits, and they apply to gpt-6-astra like any other GPT model:

  • Only POST /v1/responses. Retrieving, deleting or cancelling a response, and the input_tokens and compact endpoints, are not provided.
  • No server-side state. Do not rely on previous_response_id, conversation or background; send the whole conversation in input with every request.
  • No stored completions. For Chat Completions, store and the endpoints that list or delete stored completions are not available.
  • Hosted tools are not guaranteed. Use function calling (type: function) for tools. Built-in tools hosted by OpenAI, such as web search, file search, code interpreter and computer use, are not guaranteed to be available.

What a request costs#

gpt-6-astra bills per token, and the rate depends on the input length of the request. One set of rates applies up to 272K input tokens and a higher set above that. The table shows what the catalog charges as of December 2026, per 1M tokens, with the 75% discount the catalog shows already applied. Prices change; the prices page has the current numbers.

Per 1M tokensInput ≤ 272KInput > 272K
Input$2.5$5
Output$12.5$18.75
Cache read$0.25$0.5
Cache write$3.125$6.25
Cache write (12h)$6.25$12.5

A worked example at the standard rate: a request with 100,000 input tokens and 4,000 output tokens costs 0.1 × $2.5 = $0.25 for input and 0.004 × $12.5 = $0.05 for output, so $0.30 in total, before any cache pricing. The same request on gpt-6.2-astra at its listed rates, $2 and $10 per 1M tokens for input and output up to 272K, is 0.1 × $2 + 0.004 × $10 = $0.24.

That is the whole price difference in the sources: the 6.2 model is cheaper on every line, for both input lengths. The catalog tip for large inputs is to start from an inventory and select the most relevant records, and for inputs above 272,000 tokens to budget with the long-context rate. For repeated review rounds, keep stable evidence tables and terminology at the beginning of the prompt, and use the cache usage in the returned usage to review the bill. For more on this, see what long context costs on GPT-6 and prompt caching.

Errors#

Both endpoints return one common error structure with a real HTTP status: branch on the status first, then on error.code. A 400 invalid_request covers a malformed request or an unsupported parameter, and a 404 not_found an unknown model. Some validation errors come straight from the model side and may carry only code and message, so log the X-Request-Id response header. The error reference has the full table; the endpoint pages are Chat Completions and Responses.

Where to go next#

Try the model in its playground before wiring it up, and compare the other language models on the models page. For editors and agents, see Use DreamTo models in Cursor, Cline, Codex and OpenCode; for one key across formats, OpenAI-compatible API: one key.

FAQ#

What is the model ID for GPT-6 Astra on DreamTo?#

The model ID is gpt-6-astra. Send it in the model field of a request to https://api.dreamto.ai/v1/chat/completions or https://api.dreamto.ai/v1/responses with the header Authorization: Bearer $DREAMTO_API_KEY.

Does GPT-6 Astra support streaming, images and function calling?#

Yes to all three. Set "stream": true for server-sent events, send images as image_url parts in a user message, and pass tools for function calling. Built-in tools hosted by OpenAI, such as web search, are not guaranteed to be available.

Which reasoning effort values does GPT-6 Astra accept?#

The catalog lists low, medium, high and xhigh as the levels verified to work, and says unlisted levels are rejected upstream. In Responses the field is reasoning.effort; in Chat Completions it is reasoning_effort.

How much does GPT-6 Astra cost per million tokens?#

As of December 2026, for requests with up to 272K input tokens, the catalog charges $2.5 per 1M input tokens and $12.5 per 1M output tokens, with a 75% discount applied. Above 272K input tokens the rates are $5 and $18.75. See the prices page for current numbers.

Can I use previous_response_id with GPT-6 Astra?#

No. Only POST /v1/responses is available, so send the whole conversation in input with every request, and pass the previous reasoning items back unchanged for multi-turn reasoning.

What is the context window of GPT-6 Astra?#

The catalog lists a 1.05M-token context window and up to 128K output tokens. Requests with more than 272K input tokens are billed at the higher long-context rates.

  • GPT-6
  • API Guide