---
title: "Design a voice from a prompt"
method: POST
path: "/v1/voice/design"
tags: ["Text To Speech (Speak)"]
---

# Design a voice from a prompt

`POST /v1/voice/design`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/voice/design`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Generate a brand-new **synthetic** voice from a text description (distinct from cloning, which copies a real person). Async: returns `202` with a `design_id`; poll `GET /v1/voice/design/{id}` for candidate previews, then `POST /v1/voice/design/{id}/save` to keep one. Send a stable `Idempotency-Key` when retrying create: the same organization and key receive the original response without another job or billable unit. Requires the `speak:design` scope.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `prompt` string, required: Natural-language description of the voice.
  - `candidates` integer: How many candidate voices to generate.
  - `sample_text` string: Optional line the previews speak.
  - `language` 'en' | 'zh' | 'ja' | 'ko' | 'de' | 'fr' | 'ru' | 'pt' | 'es' | 'it': Language spoken by the preview. Other languages are not supported for voice design.
  - `attributes` object: Optional structured hints folded into the prompt.
    - `gender` string
    - `age` string
    - `accent` string
    - `pace` number
    - `energy` number

## Response `202`

Design job accepted

- object
  - `design_id` string
  - `status` string
  - `candidates` integer
  - `estimated_seconds` integer

## Other responses

- `401`: Missing or invalid API key (`code: unauthorized`)
- `403`: Key lacks the required scope or the origin is not allow-listed (`code: forbidden | origin_not_allowed`)
- `429`: Design queue saturated, retry after the `Retry-After` delay.

---

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