GPT-6 Astra API Tutorial: Build Your First App with the Responses API
Build your first GPT-6 Astra app with the Responses API, reasoning controls, structured output, tools, conversation state and production safeguards.

The cleanest way to build with GPT-6 Astra is the Responses API. OpenAI supports Chat Completions for basic Astra requests, but its current model guidance says tool calling requires Responses. That makes Responses the practical default for new apps that need web or file search, custom functions, computer use, image generation, structured output or multi-turn state.
This tutorial builds a small “production brief reviewer.” It accepts a creative brief, identifies missing decisions and returns a structured result that another interface can use. The same architecture works for research assistants, coding tools and document workflows.
The examples are intentionally narrow. Authentication, SDK releases and product access can change, so compare implementation details with the official Responses API documentation before deployment.
What You Need Before Starting
You need an OpenAI API project with billing and access to gpt-6-astra. ChatGPT subscriptions and API billing are separate. The Astra model page currently lists no Free-tier API support.
For Node.js, install the current OpenAI SDK through your normal package manager and place the API key in a server-side environment variable. Do not embed it in browser code or commit it to a repository.
Our first request needs only three fields:
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-6-astra",
reasoning: { effort: "medium" },
input: "Review this brief: A courier finds a letter addressed to tomorrow."
});
console.log(response.output_text);
output_text is a convenience property for text collected from the response. A production application should also inspect response status, errors and usage rather than assuming every call completed normally.
Understand the Request Shape
model
Use the exact model identifier gpt-6-astra. Do not guess an alias or dated snapshot that is not listed in the official catalog.
input
Input may be a string or structured content. Astra accepts text and image input. It produces text natively; audio and video are not supported model modalities on the current model page.
reasoning
The reasoning.effort field controls how much reasoning the model applies. Astra supports low, medium, high, xhigh and max. It does not support none; OpenAI says that setting returns HTTP 400.
Start with medium for evaluation. Compare lower and higher settings on the same tasks instead of assuming more reasoning is always economical.
Use the result downstream: Once your app produces an approved script or shot brief, creators can transfer it into Elser AI for character design, storyboarding, scene generation and editing. This is a workflow handoff, not a claim of native integration.
Give the Model a Real Output Contract
A plain paragraph is difficult to validate. Our reviewer should return a stable object containing a summary, missing decisions and whether the brief is ready for storyboarding.
With Structured Outputs, define a JSON schema under text.format:
const briefSchema = {
type: "object",
properties: {
logline: { type: "string" },
missing_decisions: {
type: "array",
items: { type: "string" }
},
ready_for_storyboard: { type: "boolean" }
},
required: ["logline", "missing_decisions", "ready_for_storyboard"],
additionalProperties: false
};
const response = await client.responses.create({
model: "gpt-6-astra",
reasoning: { effort: "medium" },
instructions: [
"Review creative briefs for production readiness.",
"Do not invent missing budget, rights, audience or runtime decisions."
].join(" "),
input: "A courier finds a letter addressed to tomorrow.",
text: {
format: {
type: "json_schema",
name: "brief_review",
strict: true,
schema: briefSchema
}
}
});
const review = JSON.parse(response.output_text);
Schema validity does not guarantee factual or creative quality. Validate required business rules too. For example, ready_for_storyboard should be false when runtime, audience or rights constraints are absent.
Add a Custom Function
Suppose approved character records live in your database. Let Astra request the record rather than pasting the entire catalog into every prompt.
Conceptually, define a function tool with a name, description, strict parameter schema and your execution logic. When the response contains a function call:
- parse and validate its arguments;
- authorize access for the current user;
- execute the function in your application;
- return a
function_call_outputusing the originalcall_id; - continue the Responses conversation.
The model does not execute your database function. Your code does. Tool descriptions guide selection; they are not a security boundary.
GPT-6 Astra also supports asynchronous tool calling. Setting async: true on an eligible function or custom tool lets the model continue independent work while your application runs the tool. When the job finishes, send its output in a later Responses request with the original call ID. This differs from background mode: async tool calling changes whether the model waits for a tool result, while background mode concerns response generation itself.
Maintain Multi-Turn State
For a short follow-up, pass the earlier response ID:
const first = await client.responses.create({
model: "gpt-6-astra",
reasoning: { effort: "medium" },
input: "Review this six-shot production brief: ..."
});
const revised = await client.responses.create({
model: "gpt-6-astra",
previous_response_id: first.id,
reasoning: { effort: "medium" },
input: "Revise the review for a 30-second vertical video."
});
OpenAI documents store: true and previous responses as one way to preserve state. Organizations with different retention requirements should review the available stateless and encrypted-reasoning options rather than copying a persistence pattern blindly.
Do not send uncontrolled conversation history forever. Long contexts increase cost, can contain obsolete instructions and may cross the higher-price threshold above 272,000 input tokens.
Change Reasoning Effort Mid-Conversation
Astra supports configuration_update items in standard, single-agent mode. They can raise or lower reasoning effort while preserving the request-level prompt prefix for caching.
For example, begin a routine review at low effort, then escalate failure analysis:
const next = await client.responses.create({
model: "gpt-6-astra",
previous_response_id: first.id,
reasoning: { effort: "low" },
input: [
{ type: "configuration_update", reasoning: { effort: "high" } },
{
role: "user",
content: "Find continuity failures and propose the smallest repairs."
}
]
});
The official reasoning guide notes compatibility limits: configuration updates are Astra-only, apply in standard single-agent mode, cannot be adjacent in history and do not combine with automatic compaction or truncation. Read the current guide before adopting them broadly.
Add Images Carefully
Image input can help the reviewer compare a storyboard frame with a character brief. Provide text and an input_image item in structured input. Ask the model to separate visible observations from inference.
For example, request a checklist covering hairstyle, accessory side, palette and costume construction. Do not ask it to infer personality from appearance or treat small visual details as certain when the image is unclear.
If the result is intended for production, let a person approve the identity rules before saving them in Elser AI. Visual analysis can reduce review work; it does not replace it.
Handle Errors and Incomplete Responses
Production code should handle more than network failure. Check for:
- authentication and project-access errors;
- HTTP 400 from unsupported fields or reasoning values;
- rate limits;
- incomplete responses caused by output limits;
- tool-call argument validation failures;
- expired external jobs;
- schema-valid but semantically unusable output;
- user cancellation and time limits.
Use bounded retries with backoff for genuinely transient failures. Do not retry invalid requests unchanged. Log request identifiers, model, latency, token usage and tool outcomes without storing sensitive content unnecessarily.
Parameters to Avoid with Astra
OpenAI's current Astra migration guidance says to remove temperature, top_p and top_logprobs. Chat Completions requests should also remove logprobs, while Responses requests should omit message.output_text.logprobs from include.
Examples copied from generic API references may show fields accepted by other models. Model-specific guidance governs your Astra request.
Test the Application, Not Just the Model
Create a small evaluation set containing:
- complete briefs;
- briefs with missing runtime or audience;
- conflicting character details;
- a malicious instruction inside an uploaded document;
- an image with ambiguous details;
- a function call that should be denied;
- a very long brief near your cost boundary.
Measure first-pass acceptance, structured-output validity, unsupported claims, tool success, latency, token cost and human correction time. Red-team the full tool loop because permissions and external data create risks the base text prompt cannot solve.
From API Output to Animation
The sample reviewer creates a clean boundary between reasoning and rendering. It can return a validated logline, missing decisions and storyboard readiness. A production service could extend the schema with character locks, timed shots and continuity rules.
After approval, use Elser AI to build the character and storyboard, generate scene assets, add voice or music and assemble the final cut. Keep the API result versioned so production changes remain traceable.
Frequently Asked Questions
Which API should I use for GPT-6 Astra?
Use the Responses API for new projects and for tool calling. Basic Chat Completions requests are supported, but Astra tool calling requires Responses.
What is the GPT-6 Astra model ID?
Use gpt-6-astra.
Can I set temperature for GPT-6 Astra?
OpenAI's current migration guidance says to remove temperature, top_p and top_logprobs.
Does GPT-6 Astra support JSON output?
Yes. Structured Outputs are supported. Define and validate an appropriate JSON schema rather than trusting an informal formatting instruction.
Can GPT-6 Astra call my application functions?
Yes. The model can request a function call, but your application validates permissions, executes the code and returns the result.
Is GPT-6 Astra available on the API Free tier?
The current model page lists the Free tier as unsupported.
Conclusion
A reliable GPT-6 Astra app begins with the Responses API, an explicit reasoning setting and an output contract your software can validate. Add tools only with authorization and observability, keep conversation state bounded and test failures as carefully as ideal inputs.
For creative systems, use Astra to make the brief precise and reviewable. Then transfer the accepted script and shot data into Elser AI for visual production.
Official Sources
- GPT-6 Astra model page
- GPT-6 Astra model guidance
- Migrate to the Responses API
- Async tool calling
- Reasoning models
Technical details verified against official OpenAI documentation on September 4, 2026. Test examples against the current SDK before production use.






















































































