Skip to content
Book a callStart free
Reference

get_result

Get one job

View as Markdown

GET /api/v2/results/{id}

Status, output once it is done, and what it charged. Keep calling every 15-30 seconds until status is SUCCEEDED, FAILED or CANCELED. An id from the other key mode (test vs live) answers 404. Needs the results:read scope.

Path

NameTypeRequiredDescription
idstringyesThe job id from a make call.

Example

curl "https://app.diffusr.ai/api/v2/results/run_8Hk2xxxxxxxx" \
-H "Authorization: Bearer $DIFFUSR_KEY"

Response

200 ApiResult

The job.

NameTypeRequiredDescription
idstringyes
status“PENDING” | “RUNNING” | “SUCCEEDED” | “FAILED” | “CANCELED”yesPENDING and RUNNING = keep waiting. SUCCEEDED, FAILED and CANCELED are final.
modelstringyes
credits_estimatednumberno
created_atstringyes
finished_atstringno
outputobjectnoPresent once SUCCEEDED.
output.kind“IMAGE” | “VIDEO” | “AUDIO”yes
output.urlstringyesPublic link to the file.
output.thumbnail_urlstringno
output.widthnumberno
output.heightnumberno
output.duration_secnumberno
errorobjectnoPresent when FAILED.
error.codestringyes
error.messagestringyes
request_idstringnoThe X-Request-Id of the request that started the job.
testtruenotrue when a test key made the call: the price is real, nothing real ran. Absent for live keys.
chargeobjectyes
charge.quoted_creditsnumber | nullyesThe most the call could charge (null for a run with no API quote).
charge.charged_creditsnumberyesWhat the call has charged so far. Work that was never delivered is not counted. A test run is always 0.
charge.finalbooleanyestrue once the run is over: the number can no longer change.
priceobjectno
price.creditsnumberyesThe most this call costs, in whole credits (1 credit = $0.01).
price.usdstringyesThe same price in US dollars, e.g. “0.0336”.
price.tariff“direct” | “outcome”yes“direct” = your prompt goes to the model as sent; “outcome” = a result we shape (Recast, creator video).
price.tariff_versionstringyes
price.expires_atstringyesThe quoted price holds until then (ISO time).
nextstringnoPresent while the job is not finished.

Errors

Every error body is { error, code, request_id, ... }. All codes and what to do.

  • 401: Missing, wrong, revoked or expired API key (code UNAUTHORIZED, KEY_REVOKED, KEY_EXPIRED).
  • 403: The key may not do this (SCOPE_DENIED, MODEL_NOT_ALLOWED, TEST_MODE_UNSUPPORTED, ACCOUNT_BLOCKED, allowance_exceeded).
  • 404: No such id, or it is not yours, or it belongs to the other key mode (NOT_FOUND).
  • 429: Too many requests or jobs (RATE_LIMITED, CONCURRENCY_LIMIT, UPLOAD_QUOTA, …). Wait Retry-After seconds, then retry.
  • 500: Our fault (INTERNAL_ERROR). Quote request_id to support.
  • 503: Paused or busy (API_PAUSED, MODEL_PAUSED, PROVIDER_PAUSED, PROVIDER_BUSY, UNAVAILABLE). Wait Retry-After seconds, then retry.

Charges

Free. No credits are spent.