> ## Documentation Index
> Fetch the complete documentation index at: https://docs.robinzip.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a job

> GET /v1/jobs/:id

Fetch a job's status and result. Supports long-polling via `?wait`, the endpoint to call after creating a job.

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer sk_live_...`
</ParamField>

<ParamField path="id" type="string" required>
  The job id returned by `POST /v1/text`, `POST /v1/audio`, or `POST /v1/image`.
</ParamField>

<ParamField query="wait" type="number">
  Seconds to long-poll, 0–30. The server holds the response until the job reaches `completed` or `failed`, or the timeout passes, then returns the current job either way. A typical flow is 1–2 calls instead of a polling loop, and since rate limits count per request, `wait` also saves quota.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Job id.
</ResponseField>

<ResponseField name="status" type="string">
  `created`, `pending`, `processing`, `completed`, or `failed`. See [Jobs](/concepts/jobs).
</ResponseField>

<ResponseField name="error" type="string">
  Failure reason. Only present on `failed` jobs.
</ResponseField>

<ResponseField name="result" type="object">
  Present once the job completes.

  <Expandable title="properties">
    <ResponseField name="outputUrl" type="string">
      Signed download URL for file outputs. Freshly generated on every read, valid for 1 hour; re-fetch the job for a new one. Audio outputs are `.ogg` (Opus) by default or `.mp3` if requested via `encode`; image outputs are `.webp`, `.avif`, `.jpg`, or `.png`; file-based text outputs are `.txt`.
    </ResponseField>

    <ResponseField name="outputText" type="string">
      Inline output for text jobs created from inline `text`.
    </ResponseField>

    <ResponseField name="metrics" type="object">
      `inputSize`, `outputSize`, `compressionRatio`, `operationsApplied`.
    </ResponseField>
  </Expandable>
</ResponseField>

Results remain available for **7 days** after completion.

## Examples

```bash Long-poll (recommended) theme={null}
curl -s "https://api.robinzip.app/v1/jobs/665f1d00b8d4e91a2c3d4e60?wait=25" \
  -H "Authorization: Bearer $ROBIN_KEY"
```

```bash Instant read theme={null}
curl -s https://api.robinzip.app/v1/jobs/665f1d00b8d4e91a2c3d4e60 \
  -H "Authorization: Bearer $ROBIN_KEY"
```

<ResponseExample>
  ```json Completed theme={null}
  {
    "success": true,
    "data": {
      "id": "665f1d00b8d4e91a2c3d4e60",
      "status": "completed",
      "result": {
        "outputUrl": "https://...signed-get-url...",
        "metrics": {
          "inputSize": 52428800,
          "outputSize": 6291456,
          "compressionRatio": 8.33,
          "operationsApplied": ["trim-silence", "normalize", "compress", "encode"]
        }
      }
    }
  }
  ```

  ```json Processing theme={null}
  {
    "success": true,
    "data": {
      "id": "665f1d00b8d4e91a2c3d4e60",
      "status": "processing"
    }
  }
  ```

  ```json Failed theme={null}
  {
    "success": true,
    "data": {
      "id": "665f1d00b8d4e91a2c3d4e60",
      "status": "failed",
      "error": "Empty response from S3"
    }
  }
  ```
</ResponseExample>

## Errors

| Code            | HTTP | When                                                      |
| --------------- | ---- | --------------------------------------------------------- |
| `JOB_NOT_FOUND` | 404  | Unknown id, malformed id, or job owned by another account |
