---
title: "Regenerate Dubbing passages and save the revision to My work"
method: POST
path: "/projects/{projectId}/dub/library/{id}/revisions"
tags: ["Console creations"]
---

# Regenerate Dubbing passages and save the revision to My work

`POST /projects/{projectId}/dub/library/{id}/revisions`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/projects/{projectId}/dub/library/{id}/revisions`
- Auth: API key in cookie `pyai_session`

Requires a signed-in creator, trusted console Origin, and a parent job saved in this project. Accepts DubRevisionInput. The backend creates an idempotent revision and saves it to the project library before responding, so browser departure does not discard the accepted job. Retry with the same key after an interrupted response.

## Path parameters

- `projectId` string, required
- `id` string, required

## Headers

- `Idempotency-Key` string, required

## Request body

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

## Response `202`

Revision saved to My work.

- ConsoleDubRevision
  - `job_id` string, required
  - `name` string, required
  - `created_at` integer, required
  - `status` 'queued' | 'running' | 'done' | 'error', required
  - `parent_job_id` string, required

## Other responses

- `400`: Invalid selection.
- `401`: Sign in to the console.
- `403`: Project membership or a creation role is required.
- `404`: Creation not found in this project.
- `409`: Edits or retry key conflict.
- `503`: Interrupted or unavailable. Retry the same request key.

---

[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)
