If you’re choosing a model for an OpenAI API integration, start with the task and the trade-off you can accept. OpenAI’s model catalog recommends GPT-6 Astra for complex reasoning and coding, GPT-6.1 Sol to balance capability and cost, and GPT-6 Luna for cost-sensitive, high-volume work. Their listed API model IDs are gpt-6-astra, gpt-6.1-sol, and gpt-6-luna. The catalog says its latest models are available through the Responses API and client SDKs. (OpenAI model catalog)
For a first test, OpenAI’s quickstart uses gpt-6-astra with the Responses API. It shows how to create and export an API key, install the SDK, send a request, and print the returned text. (OpenAI quickstart)
Which ChatGPT API model should you choose?
| Model | OpenAI’s stated starting point | Standard API price per 1 million tokens: input / output | Context / maximum output |
|---|---|---|---|
GPT-6 Astra (gpt-6-astra) |
Complex reasoning, coding, and demanding work | $10 / $50 | 1,050,000 / 128,000 tokens |
GPT-6.1 Sol (gpt-6.1-sol) |
Balance intelligence and cost; complex work | $2 / $10 | 1,050,000 / 128,000 tokens |
GPT-6 Luna (gpt-6-luna) |
Cost-sensitive, high-volume workloads | $0.10 / $0.50 | 1,050,000 / 128,000 tokens |
The official model pages list a 1,050,000-token context window and 128,000-token maximum output for each model shown. Sol’s page additionally lists a 922,000-token maximum input. (Astra model page; Sol model page; Luna model page)
The prices above are from the Standard processing column and are displayed in dollars per 1 million tokens. Other processing modes and prompt caching have different rates. Check the catalog and pricing page again before implementation in case details change. (OpenAI API pricing)
Example cost estimate: Suppose a request uses 100,000 input tokens and produces 20,000 output tokens. Those amounts are below the listed context and output limits for all three models; for Sol, 100,000 input tokens is also below its listed 922,000-token maximum input. At the listed Standard rates, the token charges would be approximately:
- GPT-6 Astra: (100,000 × $10 + 20,000 × $50) ÷ 1,000,000 = $2.00
- GPT-6.1 Sol: (100,000 × $2 + 20,000 × $10) ÷ 1,000,000 = $0.40
- GPT-6 Luna: (100,000 × $0.10 + 20,000 × $0.50) ÷ 1,000,000 = $0.02
This illustration uses the Standard input and output rates only. Actual billing can differ with processing mode, cached input, or features used. Astra’s model page specifies different pricing for requests with more than 272,000 input tokens; this example uses 100,000 input tokens, below that threshold. (OpenAI API pricing; Astra model page)
Match the model to the job
- Complex reasoning, coding, or demanding work: Start with Astra if capability is your priority. OpenAI describes it as its most capable model for demanding work. (Astra model page)
- Complex work with a closer eye on cost: Try Sol and compare it with Astra using the same prompts and evaluation criteria.
- Focused, high-volume tasks: Consider Luna when cost matters and the task is well-scoped; test its output quality on representative examples before routing substantial volume to it.
- Visual or computer-use workflows: The catalog also lists GPT-6.1 Terra for visual reasoning and computer use. Check its model documentation and pricing before choosing it; it is not included in the three-model price comparison above. (OpenAI model catalog)
The model catalog says its latest models support text and image input and text output. The Astra, Sol, and Luna pages also list their individual modality support; check the chosen model’s page for any feature your integration depends on. Request settings and the chosen endpoint may impose additional constraints. (OpenAI model catalog; Sol model page; Luna model page)
Make your first API request
You’ll need Node.js, an OpenAI API key, and the official JavaScript SDK. The example below follows the model, request fields, and output property in OpenAI’s quickstart. (OpenAI quickstart)
1. Create and set an API key
Create an API key in the OpenAI Platform dashboard. Store it safely and export it as an environment variable so the SDK can read it. The quickstart documents these terminal commands: (OpenAI quickstart)
On macOS or Linux:
export OPENAI_API_KEY="your_api_key_here"
In PowerShell:
setx OPENAI_API_KEY "your_api_key_here"
If you used setx, open a new terminal window for the variable to be available there. Don’t commit a real key to source control or expose it in browser-side code.
2. Install the SDK and create a test file
npm install openai
Save this as example.mjs:
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.responses.create({
model: "gpt-6-astra",
input: "Write a one-sentence bedtime story about a unicorn.",
});
console.log(response.output_text);
The official quickstart uses this model ID, responses.create call, and output_text property. The model catalog says its latest models are available through the Responses API and SDKs, and lists Sol and Luna alongside Astra. You can substitute gpt-6.1-sol or gpt-6-luna from the catalog, then check the relevant model documentation for any feature-specific requirements. (OpenAI quickstart; OpenAI model catalog)
3. Run it and confirm the result
node example.mjs
A successful run prints the generated sentence. If the key is missing, check that the environment variable is set in the terminal running Node. If you receive a model or request error, verify the model ID and consult the official documentation for that model and endpoint rather than assuming every feature is supported.
Check pricing and billing before scaling
API usage is billed separately from a monthly ChatGPT subscription. OpenAI maintains separate billing systems for ChatGPT and the API platform; API charges depend on the models and features used. (OpenAI Help Center: ChatGPT and API billing)
Before estimating production costs, check the official pricing page for the selected model and processing mode. Input, output, cached input, and feature charges may be listed separately. Estimate spend using your expected token volumes and application mix, then monitor API usage as you test. (OpenAI API pricing)
Verify the model ID and status before production
Choose the API model ID shown in the OpenAI API catalog, not just a familiar model name from ChatGPT. Check the selected model’s official page for current availability, capabilities, and version guidance before relying on it in production. (OpenAI model catalog)
An alias and a snapshot are not necessarily interchangeable. OpenAI’s chat-latest page says the alias’s underlying model snapshot is regularly updated. By contrast, OpenAI describes snapshots as a way to lock in a specific model version so performance and behavior remain consistent; its GPT-Realtime page illustrates this distinction, but marks GPT-Realtime as deprecated, so it is not a current model recommendation. For the model you select, inspect its official page’s Snapshots or Aliases section before assuming its identifier pins a version. (Chat Latest model page; GPT-Realtime model page)
Older model pages can help explain past integrations, but they are not proof that a model remains available. For example, the GPT-4 model page labels GPT-4 shut down, while the GPT-Realtime page labels that model deprecated. Check the current catalog rather than copying a legacy ID into a new integration. (GPT-4 model page; GPT-Realtime model page)
In short: start with Astra for demanding work, Sol for a capability-cost balance, or Luna for focused high-volume tasks. Confirm the model ID, limits, and feature support in the official catalog, then use the quickstart to make a Responses API request. Compare candidates on your own test cases before choosing one for production. (OpenAI quickstart)
Sources
GPT-6 Astra Model | OpenAI API
GPT-6.1 Sol Model | OpenAI API
Chat Latest Model | OpenAI API
Developer quickstart | OpenAI API
