Standard context
$2.00
- Input: $2.00 / 1M tokens · cached input: $0.20 / 1M tokens · output: $10.00 / 1M tokens.
- Applies when input context is 272,000 tokens or less.
GPT-6 Astra API 接口 / 透明 token 定价的长上下文聊天补全
通过 PiAPI 兼容 OpenAI 的聊天补全端点,使用 GPT-6 Astra 构建应用。在试用区测试消息并查看即时响应。
限时促销价(OpenAI 官方价格的 20%)。所有价格按每 100 万 token 计。
$2.00
$4.00
准备好使用 GPT-6 Astra 构建应用了吗?
兼容 OpenAI 的聊天 API,适用于长上下文应用和开发工作流。
向 POST /v1/chat/completions 发送标准 messages 数组,即可立即收到完整响应。
根据工作流对速度和深度的需求,选择 low、medium 或 high 推理强度。
同时展示标准与长上下文两个档位的输入、缓存输入和输出 token 价格。
当输入上下文超过 272,000 token 时,整个请求转入长上下文费率。
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the the playground above before wiring them into your product.
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-6-astra",
"task_type": "chat-completion",
"input": {
"messages": [{"role":"user","content":"Explain what an API gateway does, in two sentences."}]
}
}'
# → { "task_id": "9d5a…", "status": "pending" }curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'
# poll until status = completed
{
"data": {
"status": "completed",
"output": {
"content": "https://img.theapi.app/ephemeral/…"
}
}
}$ npm install -g piapi-cli $ piapi run gpt-6-astra \ messages=[object Object] ✓ Task completed! https://img.theapi.app/ephemeral/…
标准请求的价格为每 100 万输入 token $2.00、每 100 万缓存输入 token $0.20、每 100 万输出 token $10.00。
当输入上下文超过 272,000 token 时,整个请求按长上下文档位计费:每 100 万 token 的输入 $4.00、缓存输入 $0.40、输出 $15.00。
使用兼容 OpenAI 的 POST /v1/chat/completions 端点,并提供 model 值和 messages 数组。
More questions? See the API docs.
GPT-6 Astra API