---
title: "Get a job"
method: GET
path: "/v1/jobs/{job_id}"
tags: ["jobs"]
---

# Get a job

`GET /v1/jobs/{job_id}`

## Request

- Base URL: `https://api.niubai.vip` (the document declares no server; this is the origin it was published from)
- URL: `https://api.niubai.vip/v1/jobs/{job_id}`
- Auth: HTTP bearer

The state of an async edit or batch. While it runs: `status` and `progress`. When it is done: the same body a synchronous edit returns (`changes`, `output`, `warnings`, `usage`), and `records` for a batch. Output links are valid for 24 hours.

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- JobResponse: ``GET /v1/jobs/{id}``: the sync body once the job is finished. While the job is queued or running only ``status``, ``job_id`` and ``progress`` are present; a finished job carries everything the sync response carries (plus ``records`` for a batch).
  - `status` string, required
  - `job_id` string, required
  - `kind` string
  - `progress` object
  - `records` BatchRecordOut[], nullable
    - `index` integer, required
    - `status` string, required
    - `output` OutputOut: The edited document (absent on ``dry_run`` and on a failed edit).
      - `file_id` string, required
      - `url` string, nullable
      - `expires_at` string, nullable
      - `pages` integer
      - `bytes` integer
    - `changes_count` integer
    - `error` string, nullable

## Other responses

- `401`: error.code is one of: unauthorized
- `404`: error.code is one of: not_found
- `429`: error.code is one of: rate_limited

---

[API](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway.md) · [All operations](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/niubai/apis/pdf-edit-api-gateway/revisions/83ed2bb54eb5?raw)
