GPT-6 Astra API Pricing: The 272K Long-Context Rule

GPT-6 Astra pricing on PiAPI depends on the input context of each request. The standard rates are input 1M = $2.00, cached input 1M = $0.20, and output 1M = $10.00. When input context exceeds 272,000 tokens, the entire request uses the long-context rates: input 1M = $4.00, cached input 1M = $0.40, and output 1M = $15.00.
The higher tier does not apply only to the tokens above the threshold. It changes the input, cached-input, and output rates for that request. See the GPT-6 Astra API page and the PiAPI completions documentation for the current contract.
PiAPI's GPT-6 Astra Price Table
| Input context for the request | Input 1M | Cached input 1M | Output 1M |
|---|---|---|---|
| 272,000 tokens or fewer | $2.00 | $0.20 | $10.00 |
| More than 272,000 tokens | $4.00 | $0.40 | $15.00 |
PiAPI describes these rates as "Limited-time promotional pricing (20% of OpenAI's official pricing)". This is promotional pricing; check the current documentation when planning production usage. A prompt containing repeated text does not by itself establish that those tokens received cached-input pricing. Use the usage and billing information returned for the request.
What Happens at 272,000 Tokens?
The threshold is based on input context, not a combined input-and-output total. At exactly 272,000 input tokens, the standard tier still applies. At 272,001 input tokens, the request has crossed into the long-context tier.
| Request input context | Tier | What changes? |
|---|---|---|
| 271,999 tokens | Standard | Standard input, cached-input, and output rates |
| 272,000 tokens | Standard | The threshold has not been exceeded |
| 272,001 tokens | Long context | All three rates switch for the entire request |
| 300,000 tokens | Long context | The full input and output use the long-context rates |
For a 300,000-token request, it would be incorrect to price the first 272,000 input tokens at $2.00 and only the remainder at $4.00. The input rate is $4.00 per 1M for the request; eligible cached input uses $0.40 per 1M, and its output uses $15.00 per 1M.
Does OpenAI Use the Same Long-Context Mechanism?
Yes. The GPT-6 Astra model documentation states that prompts with more than 272K input tokens use 2x input and cache rates and 1.5x output rates for the full request. PiAPI's completions documentation describes the same threshold and full-request mechanism with the PiAPI prices shown above.
Keep the provider and API route explicit when integrating. This article's example uses PiAPI's documented Chat Completions endpoint.
Use the model ID gpt-6-astra with https://api.piapi.ai/v1/chat/completions. PiAPI documents model and messages as required request fields and uses a Bearer API key in the Authorization header.
Make a Small Chat Completions Request
The following Node.js 22 example prints a dry-run request or submits it with PIAPI_API_KEY. Inspect usage and billing after a real request; the example does not test the long-context boundary.
const request = {
model: 'gpt-6-astra',
messages: [{ role: 'user', content: 'Summarize the purpose of an API in one sentence.' }],
};
const endpoint = 'https://api.piapi.ai/v1/chat/completions';The request uses PiAPI's documented endpoint and model ID. Follow the completions reference for the current request format.
Plan Long-Context Usage Deliberately
Choose the context your task needs before optimizing for a price tier. For production estimates, keep three questions separate:
- How much total input context does the request contain?
- How much of that input is actually billed as cached input?
- How much output does the request generate?
The first determines the tier. The other two determine the usage charged within it. If the application is close to 272,000 input tokens, include the tier change in its budget.
Frequently Asked Questions
Is 272,000 tokens itself billed at the higher rate?
No. The long-context tier applies when input context exceeds 272,000 tokens. A request with exactly 272,000 input tokens uses the standard tier.
Is only the input above 272,000 tokens more expensive?
No. Once the request crosses the threshold, the entire request uses the long-context tier. This includes the applicable input, cached-input, and output rates.
Does generating more output trigger the long-context tier?
The documented trigger is input context. Output has its own token charge, and its rate is $10.00 per 1M in the standard tier or $15.00 per 1M in the long-context tier selected by the input.
Which endpoint and model ID should I use?
Use POST https://api.piapi.ai/v1/chat/completions with model: "gpt-6-astra" and messages. Follow the PiAPI completions reference.
Where can I check the model and current prices?
See the GPT-6 Astra API page and the completions pricing documentation. Check the current promotional terms before choosing a production budget.
Source note: prices, threshold behavior, and billing wording were checked against the approved GPT-6 Astra article and current PiAPI documentation on September 11, 2026.



