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