---
title: "Regenerate selected passages as a new dub"
method: POST
path: "/v1/dub/jobs/{job_id}/revisions"
tags: ["Dub"]
---

# Regenerate selected passages as a new dub

`POST /v1/dub/jobs/{job_id}/revisions`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/dub/jobs/{job_id}/revisions`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Create a new asynchronous job using saved edits for 1–50 selected passages and the existing rendered audio for all other passages. The previous job is unchanged. If only a passage's source text changed, its translation is refreshed. A supplied pronunciation_text is the full spoken passage and does not appear in subtitles. Reuse the same Idempotency-Key and body after a lost response. A completed revision counts only the source time covered by selected passages, with overlapping time counted once. Exports carry no additional usage.

## Path parameters

- `job_id` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

- DubRevisionInput
  - `revision` integer, required
  - `segment_ids` string[], required

## Response `202`

Revision accepted, or the same previously accepted revision on retry.

- DubRevisionCreated
  - `job_id` string, required
  - `parent_job_id` string, required
  - `status` 'queued' | 'running' | 'done' | 'error', required
  - `status_url` string, required

## Other responses

- `400`: dub_invalid_revision: invalid selection or retry key.
- `401`: Missing or invalid API key (`code: unauthorized`)
- `402`: Billing gate: org out of prepaid credit, per-key budget hit, or plan quota exhausted (`code: credit_exhausted | key_budget_exceeded | insufficient_quota`). Do not retry; add credit or raise the limit. A brand-new key may see this on its first call until the account is funded.
- `403`: The product key lacks dub:render.
- `404`: unknown_job: no matching job in the calling organization.
- `409`: dub_edit_conflict, dub_revision_conflict, or dub_editor_unavailable.
- `429`: Rate/concurrency limit or dub_busy. Retry with backoff.
- `503`: Dubbing is unavailable. Retry with backoff.

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/271a1539185b?raw)
