OP Inference
API reference

Get a job

GET
/v1/jobs/{id}

Read a media job's state, progress and output.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key, sent as Authorization: Bearer <key>.

Path Parameters

id*string

The job id from the 202 response.

Response Body

The job.

application/json
  1. response
id*string
generation_id*string
object*string
state*string
Value in"queued""processing""succeeded""failed""canceled"
modality*string
model*string
created_at*string
Formatdate-time
started_at?string
Formatdate-time
completed_at?string
Formatdate-time
progress*
output?array<>
usage?
error?
retry_of?string
op_metadata*
curl -X GET "https://example.com/v1/jobs/string" \  -H "Authorization: Bearer $OP_API_KEY"
{  "id": "string",  "generation_id": "string",  "object": "job",  "state": "queued",  "modality": "string",  "model": "string",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "progress": {    "percent": 0,    "phase": "string",    "queue_position": 0  },  "output": [    {      "url": "string",      "url_expires_at": "2019-08-24T14:15:22Z",      "type": "string",      "bytes": 0,      "checksum_sha256": "string",      "purged_at": "2019-08-24T14:15:22Z"    }  ],  "usage": {    "units": {      "property1": 0,      "property2": 0    },    "cost": {      "billing_usd": 0,      "cost_source": "string",      "cost_status": "string",      "price_version": "string"    }  },  "error": {    "code": "string",    "kind": "string",    "scope": "string",    "message": "string"  },  "retry_of": "string",  "op_metadata": {    "generation_id": "string",    "requested_model": "string",    "retention_class": "string",    "region": "string",    "policy": [      "string"    ]  }}