Skip to content

Tasks and results

Submit asynchronous tasks safely with idempotency, upload media, poll for status and download results.

Submit a task (async)

There is no synchronous call. POST /api/v1/jobs validates the input, reserves the price from your credits and returns immediately: 202 for a new task, 200 when an idempotent retry matches an earlier one.

HeaderValueNotes
AuthorizationBearer <API key>Or send the key in x-api-key.
Content-Typeapplication/json
Idempotency-Key<unique string ≤128>Required. Reuse it only to retry the identical request.
FieldTypeRequiredNotes
modelstringrequiredModel slug from the catalog.
inputobjectrequiredFields from the model's input schema.
expectedPriceMicrosintegeroptionalPrice you showed the user. A mismatch returns 409 PRICE_CHANGED before any charge.

Retry safely

Keep the same Idempotency-Key and body when retrying after a network failure. Use a new key for changed input. Reusing a key with changed input returns 409 IDEMPOTENCY_CONFLICT.

Upload media

Image and video fields take a public HTTPS URL or a media:<uuid> reference. Upload local files first:

POST /api/v1/media
curl -X POST https://api.hermes-ai.net/api/v1/media \
  -H "Authorization: Bearer $HERMES_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @input.png
# → { "reference": "media:<uuid>", ... }  Use the reference in an image or video field.

Get task results

Poll GET /api/v1/jobs/{id} every few seconds and stop at a terminal status. Do not resubmit a reconciliation_required task automatically.

StatusTerminalMeaning
queuednoAccepted and waiting for a worker.
submittingnoBeing sent to the model provider.
runningnoThe model is generating.
succeededyesFinished. Results are in assets.
failedyesFinished without a result. The hold is released.
reconciliation_requiredyesThe result is being verified. Keep the task ID and do not resubmit automatically.
FieldTypeNotes
idstringHermes AI task ID. Use it to poll.
modelstringModel slug.
statusstringSee task statuses.
errorCodestring | nullSet when a task fails or needs review.
priceMicrosintegerQuote fixed at admission, USD micro-units.
currency"USD"
createdAt / updatedAtstringISO 8601 timestamps.
assets[]array{ id, type, url?, text? }. url is a same-origin /api/v1/results/<uuid> link.
replayedbooleanSubmit only. true when an idempotent retry matched.

Result assets contain text or a same-origin /api/v1/results/<uuid> URL. Download files with the same credentials (scope media:read). GET /api/v1/jobs lists your latest 100 tasks.