Skip to main content
While a job runs, Hedra publishes estimated_completion_at, the instant the job is estimated to finish, and progress, the estimated fraction of the job completed. Use them to tell your users how long a generation will take.

Where the estimate appears

POST /v3/models/{id}/estimate returns a price: the cost in US dollars that submitting the same input would charge. It creates no job, so it has no completion time. Submit the job to get one.

Poll the status endpoint

The estimate can change while the job runs, so read it from every poll rather than keeping the value from the submit response:

When it is null

  • The job has finished. Once status is COMPLETED or FAILED, estimated_completion_at is null. A completed job reports progress of 1.
  • No estimate is available for the job. Some models publish no estimate, such as the text-to-speech models. Their jobs report a null estimated_completion_at from submission to completion, and the status endpoint reports progress of 0 until the job completes.

Treat it as a rough guide

  • The estimate is a guide rather than a deadline. A job can finish well before it, so show an approximate time, such as “about 3 minutes”, instead of a countdown to the second.
  • A job can run longer than its first estimate. Once the current time passes the first estimate you showed, tell your users that the job is taking longer than expected.
  • Hedra computes progress from the time since submission and the job’s completion estimate. It is only as accurate as the estimate, and it stays below 1 until the job completes.