AI Studio API
Task status
Poll a generation task and handle queued, running, succeeded, and failed states.
API playground
Send a real request to this site and inspect the HTTP response immediately.
Response
Send a request to view its response here.สถานะความคืบหน้าของงาน
สถานะเหล่านี้บอกคุณว่าการทำงานของคุณกำลังรอ กำลังทำงาน เสร็จแล้ว หรือล้มเหลว
queuedrunningsucceededfailedGET
/api/ai-studio/tasks/{taskId}ตรวจสอบความคืบหน้าของงานหลังจากสร้างโดยคืนค่า taskId และ statusSupported=true
ส่วนหัวของคำขอ
Authorization: Bearer YOUR_API_KEYพารามิเตอร์คำขอ
| ชื่อ | ประเภท | จำเป็น | ค่าเริ่มต้น | ตัวเลือก | คำอธิบาย |
|---|---|---|---|---|---|
| taskId | string | ใช่ | - | - | รหัสงานถูกส่งคืนหลังจากเริ่มการสร้างแล้ว |
คำร้อง
curl -X GET "https://freesoragenerator.com/api/ai-studio/tasks/provider-task-id" \
-H "Authorization: Bearer YOUR_API_KEY"ตัวอย่างการตอบสนอง
{
"success": true,
"data": {
"generationId": "b6a7f5c4-8a7c-4e2b-8cf6-6b8d9b3d8d21",
"taskId": "provider-task-id",
"modelId": "video:sora2-text-to-video-standard",
"state": "running",
"mediaUrls": [],
"raw": {},
"reservedCredits": 20,
"refundedCredits": 0
}
}ตัวอย่างข้อผิดพลาด
{
"success": false,
"error": "Generation record not found"
}