Get a job
GET/v1/jobs/{id}
Get a job's progress, held amount and charges.
Price
- Price
- Free
This endpoint is free, so it does not accept Idempotency-Key or X-Max-Price; sending either returns invalid_params.
Parameters
idUUIDRequired
The job ID.
Headers
AuthorizationRequired
Bearer followed by your API key.
Response
A successful call returns HTTP 200 with the data in data.item, one Job object. Every field is always present: [] means none this time and null means not available or unknown.
| Field | Type | Description |
|---|---|---|
id | string | Job ID |
status | "queued" | "running" | "completed" | "partial" | "failed" | queued: not started. running: in progress. completed: all done. partial: some failed. failed: all failed |
total | integer | Total number of answers |
counts | { answered: integer, no_answer: integer, refused: integer, failed: integer, pending: integer } | How many answers are in each status. pending means not finished yet |
max_charge | string | The most this job can cost, which is the amount held at submission |
held | string | The amount still on hold |
charged | string | The amount charged so far |
prompt_set | { name: string, version: string | null } | null | The question set given at submission, or null |
tags | string[] | The labels given at submission |
created_at | string | When the job was submitted |
completed_at | string | null | When every answer finished; null until then |
retry_after_seconds | integer | null | How many seconds to wait before checking again; null once the job has finished |
Common errors
An error means nothing was charged, except settlement_unknown: it means billing is not known yet, so ask again with the same Idempotency-Key. See every error code.
| Error | HTTP | Meaning | Charged? |
|---|---|---|---|
not_found | 404 | It does not exist, is private or was deleted | Not charged |
invalid_params | 400 | A parameter is invalid | Not charged |
unauthorized | 401 | No credential was sent, or it is invalid, disabled or expired | Not charged |
rate_limited | 429 | Too many requests, or too many calls in progress | Not charged |