Video and some other generations finish asynchronously. After you start a generation, use this endpoint to check whether it is still running and to read the final file URL.
URL: POST https://api.thefluxtrain.com/api/v1/jobs/check-status/{editor_id}
Authentication: x-api-key header (API keys)
Image, video, and audio endpoints return a record with an id. When status is PENDING, call this endpoint with that id until status becomes SUCCESS or FAILED.
| Name | Type | Description |
|---|---|---|
editor_id | string | The id from your generation response |
None.
x-api-key: YOUR_API_KEY
Content-Type: application/json
The useful fields inside data:
| Field | Type | Description |
|---|---|---|
status | string | e.g. PENDING, SUCCESS, FAILED |
url | string | null | Download or play URL when complete |
{
"data": {
"status": "SUCCESS",
"url": "https://storage.example/output.mp4"
},
"error": null
}
You can only check jobs that belong to your account. Wrong or unknown IDs return 404.
POST to a generation endpoint (for example Video generation).data.id from the response.data.status is PENDING, call POST .../jobs/check-status/{id} every few seconds (or use your own backoff).status is SUCCESS, use url in your app. If FAILED, inspect error or your generation meta for details.