# Get a job

> Check a job's status and, once it succeeds, get its result.

`GET https://api.openrobotics.dev/v1/jobs/{id}`

Poll every few seconds. A key sees only its own jobs.

## Authorization

`Authorization: Bearer sk-orb-v1-…`, your [API key](https://www.openrobotics.dev/docs/authentication), or a free [test key](https://www.openrobotics.dev/docs/authentication#test-keys) (`sk-orb-test-…`; no account? get one with [`POST /sandbox/keys`](https://www.openrobotics.dev/docs/api/create-sandbox-key)).

## Path parameters

- `id` (string, required): The job id from [Create a prediction job](https://www.openrobotics.dev/docs/api/predict), e.g. `job_9f2c41d07a5e8b3c6d1e2f40`.

## Response

- `id` (string): The job id.
- `object` (string): `"job"`.
- `task` (string): `"predict"`.
- `model` (string): The model.
- `status` (string): `"queued"`, `"running"`, `"succeeded"` or `"failed"`.
- `progress` (number): From 0 to 1 while it runs.
- `created_at` (string): ISO 8601 time.
- `started_at` (string | null): When a GPU started it.
- `finished_at` (string | null): When it succeeded or failed.
- `result` (object | null): Once it succeeds.
  - `video` (object): Video models: `{ url, content_type, bytes, width, height, frames, fps }`. Download `url` with the same key; it's kept for 7 days.
  - `seed` (integer): Video models: the random seed the video was generated with.
  - `latents` (object): Latent models: `{ dim, steps, frames_per_step }`, where `steps` has one vector per predicted step, oldest first.
  - `surprise` (number[]): Latent models given `future`: per step, the mean L1 distance between predicted and observed latents.
  - `energy` (number[]): Latent models given `goal_image`: per step, the mean L1 distance to the goal's latent.
  - `plan` (object): Planners given a goal and no future actions: `{ actions, energy }`, the planned actions (one row per step) and the predicted distance to the goal after them.
- `error` (object | null): If it failed: `{ code, message }`. See the failure codes below.
- `usage` (object | null): Once it succeeds: `{ cost_usd, latency_ms }`.

A failed job is never billed. Its `error.code` says why:

| Code | Why |
| --- | --- |
| `400` | The model refused the input (for example, its safety checker refused the prompt), or the model is no longer served |
| `402` | Credit ran out before the job finished; the result is discarded |
| `403` | The key that created the job was deleted or disabled |
| `500` | The job's request was lost on our side |
| `502` | The model failed, its GPU worker stopped twice, or its output was too large to keep |
| `503` | No GPU was free within 30 minutes |

## Errors

- `404`: No job with this id for this key

Plus the errors every endpoint shares: see [Errors](https://www.openrobotics.dev/docs/errors).

## Example request

cURL:

```bash
curl https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40 \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY"
```

Python:

```python
import os, time, requests

headers = {"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"}
while True:
    job = requests.get("https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40", headers=headers).json()
    if job["status"] in ("succeeded", "failed"):
        break
    time.sleep(5)
print(job["result"] or job["error"])
```

TypeScript:

```typescript
const headers = { Authorization: `Bearer ${process.env.OPENROBOTICS_API_KEY}` };
let job;
do {
  await new Promise((r) => setTimeout(r, 5000));
  job = await fetch("https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40", { headers }).then((r) => r.json());
} while (job.status === "queued" || job.status === "running");
```

## Example response

Succeeded:

```json
{
  "id": "job_9f2c41d07a5e8b3c6d1e2f40",
  "object": "job",
  "task": "predict",
  "model": "nvidia/cosmos-predict-2.5",
  "status": "succeeded",
  "progress": 1,
  "created_at": "2026-11-25T12:00:00.000Z",
  "started_at": "2026-11-25T12:00:04.000Z",
  "finished_at": "2026-11-25T12:04:05.000Z",
  "result": {
    "video": {
      "url": "https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40/files/video.mp4",
      "content_type": "video/mp4",
      "bytes": 2483021,
      "width": 1280,
      "height": 704,
      "frames": 93,
      "fps": 16
    },
    "seed": 1871234
  },
  "error": null,
  "usage": { "cost_usd": 0.25, "latency_ms": 241000 }
}
```

Failed:

```json
{
  "id": "job_9f2c41d07a5e8b3c6d1e2f40",
  "object": "job",
  "task": "predict",
  "model": "nvidia/cosmos-predict-2.5",
  "status": "failed",
  "progress": 0.4,
  "created_at": "2026-11-25T12:00:00.000Z",
  "started_at": "2026-11-25T12:00:04.000Z",
  "finished_at": "2026-11-25T12:01:10.000Z",
  "result": null,
  "error": {
    "code": 502,
    "message": "Backend for nvidia/cosmos-predict-2.5 returned 500"
  },
  "usage": null
}
```
