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.
API สำหรับ GPT-6 Astra / แชตบริบทยาวพร้อมราคาโทเคนที่โปร่งใส
พัฒนาด้วย GPT-6 Astra ผ่านปลายทางแชตที่เข้ากันได้กับ OpenAI ของ PiAPI ใช้พื้นที่ทดลองเพื่อทดสอบข้อความและตรวจสอบคำตอบที่ส่งกลับทันที
ราคาโปรโมชั่นแบบจำกัดเวลา (20% ของราคาอย่างเป็นทางการของ OpenAI) ราคาทั้งหมดต่อ 1 ล้านโทเคน
$2.00
$4.00
พร้อมพัฒนาด้วย GPT-6 Astra แล้วหรือยัง?
API แชตที่เข้ากันได้กับ OpenAI สำหรับแอปพลิเคชันบริบทยาวและขั้นตอนการพัฒนา
ส่งอาร์เรย์ messages มาตรฐานไปยัง POST /v1/chat/completions แล้วรับคำตอบที่สมบูรณ์ทันที
เลือกระดับการให้เหตุผล low, medium หรือ high ตามสมดุลระหว่างความเร็วและความลึกที่ขั้นตอนการทำงานของคุณต้องการ
แสดงราคาโทเคนอินพุต อินพุตที่แคชไว้ และเอาต์พุตร่วมกันสำหรับบริบททั้งสองระดับ
เมื่อบริบทอินพุตเกิน 272,000 โทเคน คำขอทั้งหมดจะเปลี่ยนไปใช้อัตราบริบทยาว
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/…
คำขอมาตรฐานมีราคา $2.00 ต่อโทเคนอินพุต 1 ล้านรายการ, $0.20 ต่อโทเคนอินพุตแคช 1 ล้านรายการ และ $10.00 ต่อโทเคนเอาต์พุต 1 ล้านรายการ
เมื่อบริบทอินพุตเกิน 272,000 โทเคน คำขอทั้งหมดจะคิดตามอัตราบริบทยาว: อินพุต $4.00, อินพุตแคช $0.40 และเอาต์พุต $15.00 ต่อ 1 ล้านโทเคน
ใช้ปลายทาง POST /v1/chat/completions ที่เข้ากันได้กับ OpenAI โดยระบุค่า model และอาร์เรย์ messages
More questions? See the API docs.
GPT-6 Astra API