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.Stany postępu zadania
Te stany informują Cię, czy Twoje pokolenie czeka, działa, zakończyło się, czy nie powiodło.
queuedrunningsucceededfailedGET
/api/ai-studio/tasks/{taskId}Sprawdź postęp zadania po tym, jak create zwróci taskId i statusSupported=true.
Nagłówki żądania
Authorization: Bearer YOUR_API_KEYParametry żądania
| Imię | Typ | Wymagane | Domyślny | Opcje | Opis |
|---|---|---|---|---|---|
| taskId | string | Tak | - | - | ID zadania zwrócone po rozpoczęciu generowania. |
Prośba
curl -X GET "https://freesoragenerator.com/api/ai-studio/tasks/provider-task-id" \
-H "Authorization: Bearer YOUR_API_KEY"Przykład odpowiedzi
{
"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
}
}Przykład błędu
{
"success": false,
"error": "Generation record not found"
}