GPT-6 Astra API Errors: model_not_found, 401, and the max_tokens Trap
Real error bodies from the GPT-6 Astra endpoint, plus a measured finding: Astra ignores max_tokens entirely. We asked for 16 and were billed 2,614.
Every error body below was captured from live requests to the GPT-6 Astra endpoint on 6 September 2026. No paraphrasing, no invented error text. And one finding that is not an error at all but will cost you more than any of them: Astra ignores max_tokens.
model_not_found 404 → the model string does not exist
invalid_api_key 401 → key wrong, missing or revoked
invalid_request_error 400 → a required field is missing
invalid_request_error --- → a parameter value is not accepted
max_tokens ⚠️ silently ignored — see below
The Expensive One: max_tokens Does Nothing
We asked for 16 tokens and were billed 2,614. finish_reason came back as stop, not length, so nothing in the response signals that your limit was disregarded.
Measured on openai/gpt-6-astra, same prompt each time:
| Requested | Delivered | finish_reason |
|---|---|---|
max_tokens: 16 | 2,614 | stop |
max_tokens: 50 | 2,913 | stop |
max_tokens: 100 | 2,667 | stop |
max_completion_tokens: 50 | 2,944 | stop |
The delivered count has no relationship to the requested one. Switching to max_completion_tokens, the parameter OpenAI’s reasoning models normally want, changes nothing.
This is specific to Astra, not to the gateway. The same request against GPT-5.6 Sol on the same endpoint behaves correctly:
| Model | max_tokens: 50 | finish_reason |
|---|---|---|
openai/gpt-5.6-sol | 50 delivered | length |
openai/gpt-6-astra | 2,913 delivered | stop |
Sol clamps and reports length. Astra ignores and reports stop.
What this costs. At $50 per million output tokens, a request you budgeted at 50 tokens ($0.0025) that returns 2,900 ($0.145) is 58x your estimate. On a loop of 10,000 such calls that is $25 budgeted against $1,450 billed. If you have a cost guard built on max_tokens, it is not guarding anything on this model.
What to do instead, today:
- Constrain in the prompt. “Answer in one sentence” actually works;
max_tokensdoes not. - Set
reasoning.effortlow. Reasoning tokens bill at the output rate and are the bulk of the overage. - Alert on
usage, not on your request. Readcompletion_tokensfrom every response and alarm on the aggregate. Your request parameters are not a spend control here. - Cap at the gateway or account level if your provider offers it, since the per-request lever is not working.
We have not found this documented anywhere, so treat it as a measurement rather than a specification — re-run the check yourself before designing around it, and expect it to change without notice.
The Errors, With Real Bodies
model_not_found
{"error":{"message":"Model 'gpt-6' not found","type":"model_not_found","code":404}}
The string does not exist in the catalog. Valid identifiers:
openai/gpt-6-astragpt-6-astraandgpt-6-astra-2026-09-03as aliases
Two specific ways people land here:
The bare gpt-6. Returns 404. OpenAI’s own API aliases short names in some cases; the gateway does not guess.
A tier suffix. gpt-6-astra-sol returns the same 404:
{"error":{"message":"Model 'gpt-6-astra-sol' not found","type":"model_not_found","code":404}}
GPT-5.6 shipped as Sol, Terra and Luna. GPT-6 has no tiers — it is Astra and Astra Pro. Any router or config template that builds a model string by appending a tier will fail on this family. The generational comparison covers what else that naming change breaks.
invalid_api_key
{"error":{"message":"Invalid or expired API key","type":"invalid_api_key","code":401}}
The key is wrong, revoked, or from another account. Check that Authorization reads Bearer <key> and that the key actually loaded from your environment rather than being silently empty — an empty variable produces this error, not a missing-header error, which is why people search the wrong layer.
If your problem is Codex CLI specifically rather than a raw API call, Codex CLI 401 Unauthorized covers the auth-path differences there.
invalid_request_error — missing field
{"error":{"message":"Missing required parameter: 'messages' is required. [ofox.ai]","type":"invalid_request_error","code":400}}
A required field is absent. Worth noticing the [ofox.ai] suffix: that marks an error generated at the gateway rather than relayed from upstream. When you are debugging which layer rejected a request, that tag tells you it never left the gateway.
invalid_request_error — bad parameter value
{"error":{"code":null,"message":"Unsupported value: 'reasoning_effort' does not support 'ultra' with this model. Supported values are: 'none', 'low', 'medium', 'high', and 'xhigh'.","param":null,"type":"invalid_request_error"}}
You sent a value the model will not take. Distinct from the missing-field case: the field exists, the value does not.
But do not trust that list. The error names five values and omits max. We tested all six against the live endpoint, and every one returned a successful completion:
| effort | Result |
|---|---|
none | ✅ completion returned |
low | ✅ |
medium | ✅ |
high | ✅ |
xhigh | ✅ |
max | ✅ works, despite being absent from the error message |
So the error text is stale or incomplete rather than authoritative. max is a real setting — our review covers why it is rarely the setting you want, since third-party measurement puts it at one index point above high for roughly double the cost.
What Is Not an Error
A long response is not a failure. Given the max_tokens behaviour above, the most common “something is wrong” report on this model is a response far longer than expected. That is the model working as it currently does, and billing accordingly.
Empty content with reasoning tokens is not a failure either. On reasoning models, a low ceiling can be consumed entirely by reasoning before any visible text is produced, leaving content empty and completion_tokens_details.reasoning_tokens populated. Raise the ceiling rather than retrying. That said — on Astra the ceiling is not being honoured anyway, so if you see this, check usage before assuming which cause you have.
A Request That Works
curl -X POST https://api.ofox.io/v1/chat/completions \
-H "Authorization: Bearer $OFOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6-astra",
"messages": [{"role": "user", "content": "Answer in one sentence: what is quicksort?"}],
"reasoning": {"effort": "high"}
}'
Note what is doing the work: the length constraint is in the prompt, not in max_tokens. Read usage.completion_tokens on the response and compare it against what you expected before you scale this to a loop.
GET https://api.ofox.io/v1/models is the authority on what is callable and at what price, rather than this page.
Related
- GPT-6 Astra API pricing — what the tokens above actually cost, including the 272K long-context surcharge.
- GPT-6 Astra review — the independent benchmark picture and the effort-level cost curve.
- GPT-6 Astra in Codex, Cursor, Cline and DSH — working configs per agent.
- GPT-5.6 model not available — the previous generation’s version of the naming problem, including the Codex-with-ChatGPT-account case.
Sources
Every error body on this page was captured from live requests to the Ofox /v1/chat/completions endpoint on 6 September 2026. The max_tokens measurements are four requests against openai/gpt-6-astra and one control against openai/gpt-5.6-sol, same prompt, differing only in the parameter under test. This is a small sample on one route on one day, not a specification — verify it against your own account before building a cost model on it. Error text on other routes, including OpenAI direct, uses a different envelope.
Frequently Asked Questions
- Why does GPT-6 Astra return model_not_found?
- The model string does not exist in the catalog. The response is {"error":{"message":"Model 'gpt-6' not found","type":"model_not_found","code":404}}. The valid Ofox string is openai/gpt-6-astra, with gpt-6-astra and gpt-6-astra-2026-09-03 as aliases. The bare gpt-6 returns 404, and so does any tier suffix such as gpt-6-astra-sol — GPT-6 has no Sol, Terra or Luna tiers.
- Does GPT-6 Astra respect max_tokens?
- No, and this is the most expensive thing on this page. We requested max_tokens 16 and were billed 2,614 completion tokens with finish_reason stop, not length. max_completion_tokens behaves the same way — 50 requested, 2,944 delivered. GPT-5.6 Sol on the same gateway honours max_tokens exactly, returning 50 tokens with finish_reason length, so this is specific to Astra rather than to the endpoint.
- What reasoning effort values does GPT-6 Astra accept?
- In our testing on 6 September 2026, none, low, medium, high, xhigh and max all returned successful completions. An invalid value returns an error whose message lists only 'none', 'low', 'medium', 'high', and 'xhigh' — but max works despite being absent from that list, so treat the error text as incomplete rather than authoritative.
- What does invalid_api_key mean on the GPT-6 Astra endpoint?
- The key is wrong, revoked, or from a different account. The response is {"error":{"message":"Invalid or expired API key","type":"invalid_api_key","code":401}}. An empty environment variable produces this same error rather than a missing-header error, which sends people looking in the wrong place.
- How do I fix Missing required parameter messages is required?
- Your request body has no messages array. The response is {"error":{"message":"Missing required parameter: 'messages' is required. [ofox.ai]","type":"invalid_request_error","code":400}}. Note the [ofox.ai] suffix — that marks an error generated at the gateway rather than passed through from upstream, which is a useful signal when you are debugging which layer rejected you.
- Is GPT-6 Astra available on Ofox?
- Yes, since 5 September 2026, as openai/gpt-6-astra at $10.00 input and $50.00 output per million tokens, with cache read $1.00 and cache write $12.50, on /v1/chat/completions and /v1/responses.


