# List jobs

URL: https://docs.hanzo.ai/docs/openapi/compute/listfleetjobs

> Returns the caller org's gpu-jobs render queue, each row tagged with the GPU it targets (empty = the shared any-GPU lane) and the node claiming it, optionally narrowed to one GPU's queue and/or one status.

`GET /v1/compute/fleet/jobs`

> [Compute →](https://docs.hanzo.ai/docs/openapi/compute) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                              |
| ------------- | -------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/compute/fleet/jobs` |
| **Method**    | `GET`                                        |
| **Operation** | `listFleetJobs`                              |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`       |

Returns the caller org's gpu-jobs render queue, each row tagged with
the GPU it targets (empty = the shared any-GPU lane) and the node claiming it,
optionally narrowed to one GPU's queue and/or one status.

A job whose worker died — STARTED with an elapsed lease and not yet reclaimed —
reads "stalled", not "running". Fail-soft: an unavailable tasks engine yields an
empty queue rather than an error.

## Request

2 fields.

| Field    | In    | Type   | Required | Description                                                                                  |
| -------- | ----- | ------ | -------- | -------------------------------------------------------------------------------------------- |
| `gpu`    | query | string | —        | GPU selects one node's lane: jobs TARGETED at it (gpu:\<node>) or CLAIMED by it.             |
| `status` | query | string | —        | Status selects one lifecycle state: queued, running, stalled, completed, failed or canceled. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | compute.jobList | ok      |
| `default` | problem-details | refused |

`200` body — 14 fields.

| Field                  | In   | Type              | Always | Description                                                                                                                                                                                                                                      |
| ---------------------- | ---- | ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `jobs`                 | body | compute.gpuJob\[] | —      | Jobs is the queue, most-recent-first.                                                                                                                                                                                                            |
| `jobs[].attempt`       | body | integer (int64)   | —      | Attempt is which try this is, counting from 1.                                                                                                                                                                                                   |
| `jobs[].closeTime`     | body | string            | —      | CloseTime is when the job reached a terminal state, RFC 3339.                                                                                                                                                                                    |
| `jobs[].failureCause`  | body | string            | —      | FailureCause is the engine's reason the job failed.                                                                                                                                                                                              |
| `jobs[].gpu`           | body | string            | —      | GPU is the node this job is aimed AT — the lane "gpu:\<node>" it was submitted on.                                                                                                                                                               |
| `jobs[].id`            | body | string            | —      | ID is the job's id, and the id the cancel route takes.                                                                                                                                                                                           |
| `jobs[].label`         | body | string            | —      | Label is the cheap human name for the render — the output filename prefix lifted out of the submitted graph.                                                                                                                                     |
| `jobs[].lastHeartbeat` | body | string            | —      | LastHeartbeat is the claiming worker's most recent beat on this job, RFC 3339 — the evidence a long render is still alive rather than wedged.                                                                                                    |
| `jobs[].leaseExpiry`   | body | string            | —      | LeaseExpiry is when the worker's claim lapses, RFC 3339.                                                                                                                                                                                         |
| `jobs[].runId`         | body | string            | —      | RunID identifies this execution of the job.                                                                                                                                                                                                      |
| `jobs[].startTime`     | body | string            | —      | StartTime is when a worker began executing the job, RFC 3339.                                                                                                                                                                                    |
| `jobs[].status`        | body | string            | —      | Status is the job's lifecycle state: queued, running, completed, failed or canceled — plus "stalled", which is this surface's own reading of a job that is STARTED whose worker died: its lease has elapsed and no reaper has taken it back yet. |
| `jobs[].type`          | body | string            | —      | Type is the work being done ("studio.render") — what the claiming worker has to be able to execute.                                                                                                                                              |
| `jobs[].worker`        | body | string            | —      | Worker is the node that actually CLAIMED the job, which is not always the one it was aimed at: a shared-lane job has no GPU but does have a Worker once picked up.                                                                               |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo compute fleet jobs list
```

**SDK**

**.ts**

```ts
import { Configuration, ComputeApi } from 'hanzoai';

const api = new ComputeApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listFleetJobs();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ComputeApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ComputeApi(client).list_fleet_jobs()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ComputeAPI.ListFleetJobs(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, compute_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = compute_api::list_fleet_jobs(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ComputeApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ComputeApi(client).listFleetJobs();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/compute/fleet/jobs \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `compute`, op `listFleetJobs` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "compute",
         "arguments": {
           "op": "listFleetJobs",
           "input": {}
         }
       }
     }'
```

---

[Compute API](https://docs.hanzo.ai/docs/openapi/compute) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
