In Vercel AI Gateway, AI SDK uses the model ID openai/gpt-6.2-astra and authenticates with the team's AI_GATEWAY_API_KEY; the Gateway routes requests to available providers.
Suitable tasks: Calling GPT-6.2 Astra from an AI SDK application through Vercel AI Gateway, configuring reasoning effort, or controlling provider routing.
Unsuitable tasks: Treating this configuration as the authentication method or model ID for a direct OpenAI API call.
Model version covered: GPT-6.2 Astra; the page also shows the fast-mode ID openai/gpt-6.2-astra-fast.
Client, agent, or API covered: Vercel AI Gateway and AI SDK; the page also lists entry points for Chat Completions, the Responses API, and the Anthropic Messages API.
Recommended reasoning effort and parameters: Set reasoning (none, minimal, low, medium, high, or xhigh) as needed for the task; explicitly set maxOutputTokens to control the output limit.
The model page's quick start calls for installing AI SDK, creating an API key, and setting it as the AI_GATEWAY_API_KEY environment variable. Keep the key in the server environment; do not put it in browser code or commit it to the repository.
pnpm add ai dotenvLocal .env:
AI_GATEWAY_API_KEY=你的_Vercel_AI_Gateway_API_KeyFor a Vercel deployment, set the same variable in the relevant Vercel Project's Environment Variables and select the required deployment environment. The page says to create the key on the AI Gateway API Keys page. Usage is charged to the team at API pricing.
The following model ID and parameter format are from the AI SDK example on the model page:
import { generateText } from 'ai';
const { text } = await generateText({
model: 'openai/gpt-6.2-astra',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
reasoning: 'high',
maxOutputTokens: 1024,
});Streaming uses the same model ID:
import { streamText } from 'ai';
const result = streamText({
model: 'openai/gpt-6.2-astra',
prompt: 'Why is the sky blue?',
});A Next.js Route Handler can call the SDK on the server, for example by exporting POST from app/api/chat/route.ts and returning result.toUIMessageStreamResponse(). This describes an application-level integration; the Gateway key still comes from a server-side environment variable. The model page does not prescribe a Next.js route structure or steps for managing deployment environment variables.
The model page's example uses providerOptions.gateway to restrict the available providers:
const result = await generateText({
model: 'openai/gpt-6.2-astra',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['openai', 'bedrock'],
},
},
});Routing parameters:
only: string[]: Hard-restricts providers; only providers in the list are tried, and the request fails if none in the list are available.
order: string[]: Tries the listed providers first; providers outside the list can still be used as fallbacks.
sort: 'cost' | 'ttft' | 'tps': Sorts candidate providers by price, time to first token, or generation speed.
zeroDataRetention: boolean: Routes only to providers that have a zero data retention policy for this model.
Gateway routing options go under providerOptions.gateway; provider-native options go under their respective namespaces. Refer to the AI SDK provider documentation for the specific supported options.
Create a team key on the Vercel AI Gateway API Keys page.
Set the key as the server-side AI_GATEWAY_API_KEY environment variable. For a Vercel deployment, configure it for the relevant environment in the target Project.
Install ai and call generateText or streamText from the server with openai/gpt-6.2-astra.
To constrain routing, set providerOptions.gateway.only or order; do not mistake a preference order for a hard allowlist.
Set the reasoning effort and output limit for the task, then monitor usage under the team's Gateway billing.
The top of the model page lists the available model ID openai/gpt-6.2-astra; its code example uses AI SDK's streamText.
Getting started explicitly says to create an AI Gateway API key and set it as AI_GATEWAY_API_KEY; the Gateway authenticates requests and routes them to available providers.
The Playground says usage is charged to the team at API pricing. The page displays input pricing of $8 / 1M tokens and output pricing of $40 / 1M tokens. These are the prices shown on the page at collection time, and provider prices may differ.
The page's parameter table lists a 1.1M-token context window and a maximum output of 128,000 tokens. Prompts and responses share the context window, and reasoning tokens count toward the output limit.
The page says AI SDK 7 or later supports top-level reasoning; reasoning settings in provider options take precedence over the top-level value. Reasoning tokens usually count toward output usage, but providers may report and bill them differently.
The page gives the -fast suffix example openai/gpt-6.2-astra-fast for a low-latency fast mode; it does not provide a quantitative comparison between that mode and the default mode.
This configuration is for the Vercel AI Gateway model page. AI_GATEWAY_API_KEY is a Gateway credential, not an OpenAI API key; the model page's request target is Gateway routing.
A Vercel Project is used to deploy the application and configure its environment variables. The model page does not explain all permissions, sharing, or access-control rules between creating a Gateway key and the Vercel Project's team. Verify these in the target team's Gateway/API Keys settings.
For direct calls to the OpenAI API, use the official OpenAI SDK, credentials, and model API documentation. The Gateway model ID and environment variable here cannot be copied directly into a direct OpenAI API configuration.
The Next.js Route Handler example identifies where to integrate on the application side; it is not complete official Next.js code from the model page. Calls must be made from the server to avoid exposing the key to clients.
Prices, provider availability, and model capabilities may change. This article records information visible on 2026-11-19 and does not treat real-time uptime or throughput metrics as long-term guarantees.
On a Node.js server, install ai, set a valid AI_GATEWAY_API_KEY, and run the generateText example above; to stream output, switch to streamText. Whether a request succeeds also depends on the Gateway key's team permissions, account availability, and the availability of the selected routing provider. No paid inference request was submitted for this article.
GPT-6.2 Astra