---
title: "Prepare a clone reference: denoise + auto-transcribe"
method: POST
path: "/api/v1/prepare"
tags: ["Public API v1"]
---

# Prepare a clone reference: denoise + auto-transcribe

`POST /api/v1/prepare`

Denoises a reference clip and transcribes it with Whisper, returning a cleaned 44.1 kHz WAV (stored as a new `fileId`) plus the transcript. Run this BEFORE POST /v1/voices or /v1/clone and pass the returned `fileId` + `transcript` on: V4 uses `refText` as a continuation prompt, so a transcript that does not match the clip degrades EVERY generation with that voice, not just enrolment. Review the transcript before enrolling — `warnings` and `languageProbability` flag clips Whisper struggled with. Costs no tokens.

## Response `200`

The cleaned clip and its transcript. Review the transcript before enrolling.

- PublicPrepareResponseDto
  - `fileId` string, required — S3 key of the cleaned 44.1 kHz WAV — pass it as `refFileId` to POST /v1/clone, or download it via `url` to enrol with POST /v1/voices.
  - `transcript` string, required — Whisper transcript of the cleaned clip — use it as `refText` after reviewing it (on V4 every generation aligns against this text).
  - `seconds` number, required — Duration of the cleaned clip (seconds).
  - `languageProbability` number, nullable, required — Whisper language-detection confidence (0–1); null when unknown. A low value usually means the clip is noisy or not Vietnamese.
  - `warnings` string[], required — Non-fatal quality warnings, e.g. denoiser_unavailable, empty_transcript, low_language_probability, clip_short_for_engine, clip_long_for_engine.
  - `url` string, required — Presigned S3 download URL for the cleaned WAV.
  - `urlExpiresIn` number, required — Seconds until url expires.

## Other responses

- `400` — No clip (or both a file and refFileId), unsupported format, unknown fileId, or audio the worker cannot decode.
- `401` — API key missing, malformed, or revoked.
- `403` — refFileId belongs to another user.
- `429` — Rate limit or token quota exceeded. When the limit came from the application the response carries `Retry-After` (seconds) and the `X-RateLimit-*` headers and is counted against your API key; a 429 with none of those headers came from the edge proxy and is counted against your source address, shared with every other key calling from it. Back off on either.
- `503` — Prepare is disabled, or no worker with clone-prepare support is available.

---

[API](https://skmtc.dev/vieneu/apis/vieneu-api.md) · [All operations](https://skmtc.dev/vieneu/apis/vieneu-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vieneu/vieneu-api/revisions/11c8166a6c4d/schema)
