> For the complete documentation index, see [llms.txt](https://docs.usedecentral.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usedecentral.org/api-reference/jobs.md).

# Jobs

Every inference request on Decentral creates a job. The Jobs API lets you retrieve job status and the on-chain receipt for any job associated with your API key.

***

## Retrieve a job

`GET /v1/jobs/{job_id}`

```bash
curl https://api.usedecentral.org/v1/jobs/job_8fx2kp3m9qrstvwxyz \
  -H "Authorization: Bearer dcntrl_live_your_key_here"
```

### Response

```json
{
  "id": "job_8fx2kp3m9qrstvwxyz",
  "object": "job",
  "status": "settled",
  "model": "qwen3-8b",
  "tier": "standard",
  "credits_charged": 8,
  "usdc_value": 0.08,
  "worker_address": "9WzDXwBcARV1LCkUjzAt7skwM3Qe7rMDDkSmXbkw4KKD",
  "created_at": "2026-06-15T14:22:00Z",
  "completed_at": "2026-06-15T14:22:03Z",
  "on_chain": {
    "escrow_tx": "4xKTgFZb9mNPqRTvwXyz3ABCdEfGhIjKlMnOpQrStUvW",
    "settlement_tx": "7mNPqRTvwXyz3ABCdEfGhIjKlMnOpQrStUvW4xKTgFZb",
    "escrow_pda": "DH5q5BRv1bCz7KJtg3Pb9WxQrYtSmNoMkLjHiGfEdCbA",
    "slot": 321847293,
    "proof_hash": "sha256:a1b2c3d4e5f6..."
  },
  "usage": {
    "prompt_tokens": 48,
    "completion_tokens": 214,
    "total_tokens": 262
  }
}
```

### Job status values

| Status       | Meaning                                                      |
| ------------ | ------------------------------------------------------------ |
| `pending`    | Credits locked in escrow, job is being routed to a worker    |
| `processing` | Worker acknowledged the job and inference is running         |
| `settling`   | Proof submitted on-chain, awaiting settlement confirmation   |
| `settled`    | Job complete, worker paid, credits deducted                  |
| `failed`     | Job failed before completion (routing failure, worker error) |
| `refunded`   | Job timed out (120s), credits returned to balance            |
| `disputed`   | Client opened a dispute, awaiting arbitration                |

***

## List jobs

`GET /v1/jobs`

Returns a paginated list of jobs for the authenticated API key.

```bash
curl "https://api.usedecentral.org/v1/jobs?limit=20&status=settled" \
  -H "Authorization: Bearer dcntrl_live_your_key_here"
```

### Query parameters

| Parameter | Type    | Default | Description                                                |
| --------- | ------- | ------- | ---------------------------------------------------------- |
| `limit`   | integer | 20      | Number of results to return (max 100)                      |
| `before`  | string  | none    | Return jobs created before this job ID (cursor pagination) |
| `after`   | string  | none    | Return jobs created after this job ID                      |
| `status`  | string  | none    | Filter by status (e.g. `settled`, `refunded`)              |
| `model`   | string  | none    | Filter by model ID                                         |

### Response

```json
{
  "object": "list",
  "data": [...],
  "has_more": true,
  "next_cursor": "job_7ex1jo2l8pqrsuvwxy"
}
```

***

## On-chain verification

The `on_chain` object in every settled job response gives you everything you need to verify the payment independently.

**Verify the escrow lock:**

```
https://explorer.solana.com/tx/4xKTgFZb9mNPqRTvwXyz3ABCdEfGhIjKlMnOpQrStUvW
```

This transaction shows the credit PDA debit, the escrow PDA creation, the model tier recorded, and the job ID.

**Verify the settlement:**

```
https://explorer.solana.com/tx/7mNPqRTvwXyz3ABCdEfGhIjKlMnOpQrStUvW4xKTgFZb
```

This transaction shows the escrow PDA close, the USDC transfer to the worker's wallet, the USDC transfer to the protocol treasury, and the proof hash verified.

You do not need to trust the API's report of what happened. The Solana transactions contain the authoritative record.

***

## Opening a dispute

If you believe a worker submitted a proof that does not match the response you received, you can open a dispute within 60 seconds of receiving the final output token.

`POST /v1/jobs/{job_id}/dispute`

```json
{
  "received_output_hash": "sha256:a1b2c3d4..."
}
```

Compute the SHA-256 hash of the full response text you received (UTF-8 encoded, no trailing newline). The API compares your hash to the proof hash the worker submitted on-chain. If they differ, the job is flagged as disputed.

```json
{
  "job_id": "job_8fx2kp3m9qrstvwxyz",
  "dispute_opened": true,
  "your_hash": "sha256:a1b2c3d4...",
  "worker_hash": "sha256:e5f6g7h8...",
  "dispute_tx": "9ABCdEfGhIjKlMnOpQrStUvW4xKTgFZb7mNPqRTvwXyz",
  "arbitration_window_hours": 24
}
```

If the worker's hash matches yours, no dispute is opened and the response says so.

See \[On-Chain Settlement]\(

\#dispute-process) for the full dispute and arbitration flow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.usedecentral.org/api-reference/jobs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
