Skip to main content
POST
/
v1
/
voice
/
design
Design a voice from a prompt
curl --request POST \
  --url https://api.pyai.com/v1/voice/design \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "candidates": 3,
  "sample_text": "<string>",
  "attributes": {
    "gender": "<string>",
    "age": "<string>",
    "accent": "<string>",
    "pace": 123,
    "energy": 123
  }
}
'
{
  "design_id": "dsn_a1b2c3",
  "status": "queued",
  "candidates": 3,
  "estimated_seconds": 25
}

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Body

application/json
prompt
string
required

Natural-language description of the voice.

candidates
integer
default:3

How many candidate voices to generate.

Required range: 1 <= x <= 4
sample_text
string

Optional line the previews speak.

attributes
object

Optional structured hints folded into the prompt.

Response

Design job accepted

design_id
string
Example:

"dsn_a1b2c3"

status
string
Example:

"queued"

candidates
integer
Example:

3

estimated_seconds
integer
Example:

25