# How to use GPT-6 Astra with OmniaKey

> Use GPT-6 Astra through OmniaKey with the Responses API, Python, Node.js, or Codex CLI. Includes exact settings and fixes for common API errors.

- Canonical HTML: https://omniakey.com/blog/gpt-6-astra-setup
- Markdown: https://omniakey.com/blog/gpt-6-astra-setup.md
- Published: 2026-09-05 (updated 2026-09-09)
- Author: Kiki, COO at OmniaKey
- Language: en
- Category: API setup
- Reading time: 8 min
- All posts: https://omniakey.com/blog/llms.txt

---

This tutorial takes you from a new OmniaKey account to a successful **GPT-6 Astra** request. It covers server-side API calls and Codex CLI. An OmniaKey API key is not a ChatGPT subscription and cannot be pasted into the ChatGPT website.

> **Fact check: September 9, 2026.** **Use these exact values:** model `gpt-6-astra`, base URL `https://api.omniakey.com/v1`, and Responses endpoint `POST /v1/responses`. Start with `reasoning.effort` set to `medium`.

OpenAI's current Astra guide starts with the Responses API. Chat Completions remains available for plain text, but Astra tool calling requires Responses. The examples below respect that limit and use an environment variable instead of placing a key in source code.

## Before you start

### Create a scoped API key

Sign in to OmniaKey and open the [API Keys page](https://omniakey.com/dashboard/tokens). Create a key for this integration, then set a quota and expiration that match the test. Copy the key when it appears.

Your account also needs usable balance. Creating a key proves that the credential exists; it does not prove that the account can fund a request.

Treat the key like a password. Do not commit it, paste it into a browser application, include it in screenshots, or send it in chat.

### Put the key in your environment

On macOS or Linux:

```bash
export OMNIAKEY_API_KEY="your-omniakey-api-key"
```

In PowerShell:

```powershell
$env:OMNIAKEY_API_KEY="your-omniakey-api-key"
```

The SDK and Codex examples below read this same variable.

## Make your first Responses API request

Run this request in a terminal:

```bash
curl https://api.omniakey.com/v1/responses \
  -H "Authorization: Bearer $OMNIAKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-astra",
    "reasoning": {"effort": "medium"},
    "input": "Review this migration plan. Return the two highest risks and one acceptance test for each."
  }'
```

A successful response contains an `output` array, generated text, and token usage. This first call verifies the base URL, key, balance, model permission, model ID, and Responses endpoint together.

After it succeeds, open the [usage dashboard](https://omniakey.com/dashboard/usage) and confirm that the recorded model is `gpt-6-astra`. Review actual input, cached input, reasoning, and output usage instead of estimating cost from visible text alone.

## Call Astra from Python

Install or update the official OpenAI Python SDK:

```bash
python -m pip install --upgrade openai
```

Create `astra_example.py`:

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["OMNIAKEY_API_KEY"],
    base_url="https://api.omniakey.com/v1",
)

response = client.responses.create(
    model="gpt-6-astra",
    reasoning={"effort": "medium"},
    input="Explain this incident report, then list the three most useful follow-up checks.",
)

print(response.output_text)
```

Run it:

```bash
python astra_example.py
```

`response.output_text` is the SDK convenience field for the generated text. Keep the complete response when you also need usage, status, or tool-call items.

## Call Astra from Node.js

Install the SDK:

```bash
npm install openai
```

Create a server-side file such as `astra-example.mjs`:

```javascript
import OpenAI from "openai";

const apiKey = process.env.OMNIAKEY_API_KEY;
if (!apiKey) throw new Error("OMNIAKEY_API_KEY is required");

const client = new OpenAI({
  apiKey,
  baseURL: "https://api.omniakey.com/v1",
});

const response = await client.responses.create({
  model: "gpt-6-astra",
  reasoning: { effort: "medium" },
  input: "Review this API design. Identify two failure modes and a test for each.",
});

console.log(response.output_text);
```

Run it from the shell where the environment variable is set:

```bash
node astra-example.mjs
```

Run this code on a server, local machine, or trusted worker. A frontend bundle exposes any key it contains to visitors.

## Use GPT-6 Astra in Codex CLI

Codex uses the Responses wire format with a custom provider. Add this to `~/.codex/config.toml`:

```toml
model = "gpt-6-astra"
model_provider = "omniakey"

[model_providers.omniakey]
name = "OmniaKey"
base_url = "https://api.omniakey.com/v1"
env_key = "OMNIAKEY_API_KEY"
wire_api = "responses"
```

Launch Codex from a shell that has the key:

```bash
export OMNIAKEY_API_KEY="your-omniakey-api-key"
codex
```

Leave `requires_openai_auth` unset. The official Codex configuration reference defines it as the OpenAI-authentication flag; this custom provider authenticates with `env_key` instead.

Check the model shown by Codex, then run a small read-only task before allowing edits. A successful direct cURL request and a failed Codex request usually indicate client configuration rather than model access.

When OpenAI ships a newer Astra, only the `model` line changes; [GPT-6.2 Astra release status](https://omniakey.com/blog/gpt-6-2-astra) tracks what OpenAI has confirmed so far.

## Use Chat Completions only when the client needs it

GPT-6 Astra with OmniaKey accepts plain-text Chat Completions. Use this endpoint for a client that has not adopted Responses:

```bash
curl https://api.omniakey.com/v1/chat/completions \
  -H "Authorization: Bearer $OMNIAKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-astra",
    "reasoning_effort": "medium",
    "messages": [
      {"role": "user", "content": "Summarize the two main risks in this rollout plan."}
    ]
  }'
```

Notice the parameter difference: Responses uses `reasoning.effort`; Chat Completions uses `reasoning_effort`. Do not attach Astra tools to the Chat Completions example. OpenAI's current model guide requires Responses for Astra tool calling.

## Choose the reasoning effort

|Effort|Start here when|
|-|-|
|`low`|The task is bounded, easy to verify, or latency-sensitive|
|`medium`|You are making the first representative request|
|`high`|The task needs deeper planning or cross-file checking|
|`xhigh` / `max`|A measured acceptance test still fails at lower effort|

Astra supports `low`, `medium`, `high`, `xhigh`, and `max`; it does not support `none`. Higher effort can increase reasoning work, latency, and output-token charges without guaranteeing a correct answer. Use the lowest setting that passes your tests.

## Give Astra a testable task

A good first prompt states the goal, relevant context, constraints, and completion check:

```text
Goal: review this database migration for deployment risk.
Context: PostgreSQL 15, one production writer, rollback must finish within five minutes.
Constraints: do not propose destructive commands; distinguish verified facts from assumptions.
Done when: return the top three risks, one mitigation and one acceptance test for each.
```

For coding work, also name the repository rules and the exact command that proves completion. Astra follows accessible instruction files closely, so review `AGENTS.md`, skills, and similar files before giving the model tool access.

## Fix common setup errors

### `401`, unauthorized, or invalid API key

Confirm that `OMNIAKEY_API_KEY` is set in the same shell that runs the command. The environment variable contains only the key; `Bearer` belongs in the HTTP header. Check that the key is enabled and has not expired.

### Insufficient balance or quota

Check both account balance and the key's own quota. A funded account can still fail when the scoped key has reached its cap.

### Model not found or unavailable

Use the exact ID `gpt-6-astra`. Check the [live model page](https://omniakey.com/gpt-6-astra) and confirm that this key is permitted to use the model. Display names such as `GPT 6` are not API IDs.

### Unsupported parameter

Remove `temperature`, `top_p`, and `top_logprobs`. Also remove `logprobs` from Chat Completions and `message.output_text.logprobs` from the Responses `include` list. These parameters are not supported by Astra.

### The response is `incomplete` or has no visible text

Increase `max_output_tokens` and inspect `output_tokens_details.reasoning_tokens`. Reasoning tokens consume output budget before the visible answer is complete.

### Chat works but tools fail

Move the workflow to `/v1/responses`. Start with a plain-text Responses call, then add one tool and verify its full request, result, timeout, and permission path. The official OpenAI tool list describes the model's direct capability; a gateway or client can expose a narrower set of tools.

### Codex still uses another model

Check `model`, `model_provider`, `base_url`, `env_key`, and `wire_api` in the active Codex config. Then restart Codex from the shell where `OMNIAKEY_API_KEY` is set.

## Verify cost before production

Run one representative task, confirm the usage record, and calculate its complete cost including retries. The [live Astra model page](https://omniakey.com/gpt-6-astra) shows current OmniaKey pricing; the [Astra review](https://omniakey.com/blog/gpt-6-astra-review) separates gateway pricing from OpenAI's direct rates and explains the 272K direct-price limit.

If a usage limit has interrupted your work, our [Codex usage-limit guide](https://omniakey.com/blog/codex-usage-limit-reached) explains how to check reset times and choose between extra credits, a plan change, and separately billed local API use.

## Frequently asked questions

### What model ID and base URL should I use?

Send `gpt-6-astra` to `https://api.omniakey.com/v1`. Display names such as `GPT 6` are not API IDs.

### Should I use the Responses API or Chat Completions?

Use Responses for anything with tools. Chat Completions still accepts plain text, but Astra tool calling requires Responses.

### Which reasoning effort should I start with?

Start with `medium` for the first representative request. Astra supports `low`, `medium`, `high`, `xhigh`, and `max`, so move to the lowest setting that passes your tests.

### Why does Codex still use another model?

Check `model`, `model_provider`, `base_url`, `env_key`, and `wire_api` in the active Codex config, then restart Codex from the shell where `OMNIAKEY_API_KEY` is set.

### Why is the response incomplete or empty?

Increase `max_output_tokens` and inspect `output_tokens_details.reasoning_tokens`. Reasoning tokens consume output budget before the visible answer is complete.

## Sources checked

- [OpenAI: GPT-6 Astra Model](https://developers.openai.com/api/docs/models/gpt-6-astra)
- [OpenAI: Using GPT-6](https://developers.openai.com/api/docs/guides/latest-model/gpt-6-astra)
- [OpenAI: Configuration Reference](https://developers.openai.com/codex/config-reference)

## References

- [OpenAI: GPT-6 Astra model](https://developers.openai.com/api/docs/models/gpt-6-astra)
- [OpenAI: Using GPT-6 Astra](https://developers.openai.com/api/docs/guides/latest-model/gpt-6-astra)
- [OpenAI: Codex configuration reference](https://developers.openai.com/codex/config-reference)
- [OmniaKey API quick start](https://docs.omniakey.com/en/quick-start)
- [OmniaKey OpenAI-compatible API](https://docs.omniakey.com/en/api/openai-compatible)
- [OmniaKey Codex CLI guide](https://docs.omniakey.com/en/guides/codex-cli)
