staqlydocs
REST APIAPI referenceMedia

An AI request's state

An AI request's state (media:read)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

GET
/v1/ai/jobs/{id}

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Path Parameters

id*string

Response Body

The job

application/json
  1. response

One AI request

id*string
operation*string
kind*string
Value in"image""video"
status*string
Value in"queued""running""succeeded""failed""canceled"
provider*string

The provider that runs it; empty until it is sent

model*string
fallback_from*string

The provider that did not take it first; empty: none

error*null|
result*null|
media_id*string

The library file it was kept as; empty until accepted

estimated_cost_usd*number

Estimated from the catalog's list prices; 0 when nothing was charged

duration_ms*integer
created_at*string
Formatdate-time
finished_at*string

Empty while it runs

Example Request
curl -X GET 'https://staqly.example.com/v1/ai/jobs/string'
Example Response
{  "id": "string",  "operation": "string",  "kind": "image",  "status": "queued",  "provider": "string",  "model": "string",  "fallback_from": "string",  "error": null,  "result": null,  "media_id": "string",  "estimated_cost_usd": 0,  "duration_ms": 0,  "created_at": "2019-08-24T14:15:22Z",  "finished_at": "string"}