TheFluxTrain

Jobs

Check when a generation has finished and get the output URL.

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.

Path parameter

NameTypeDescription
editor_idstringThe id from your generation response

Request body

None.

Headers

x-api-key: YOUR_API_KEY
Content-Type: application/json

Response

The useful fields inside data:

FieldTypeDescription
statusstringe.g. PENDING, SUCCESS, FAILED
urlstring | nullDownload or play URL when complete

Example

{
  "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.

Typical flow

  1. POST to a generation endpoint (for example Video generation).
  2. Save data.id from the response.
  3. While data.status is PENDING, call POST .../jobs/check-status/{id} every few seconds (or use your own backoff).
  4. When status is SUCCESS, use url in your app. If FAILED, inspect error or your generation meta for details.