# Seed Audio 1.5

> Seed Audio 1.5 API on PoYo: ByteDance Seed's audio model translates and dubs Chinese or English videos into 30 languages with subtitles, re-voices videos from their lines, generates spoken scenes with ambience, sound effects and music, and splits mixed audio into stems. From 0.5 credits ($0.0025) per second.

## Overview

- Submit: `https://api.poyo.ai/api/generate/submit`
- Status: `https://api.poyo.ai/api/generate/status/{task_id}`
- Page: https://poyo.ai/models/seed-audio-1-5
- Model page ID: `seed-audio-1-5`
- API model IDs: `seed-audio-1.5`, `seed-audio-1.5-video-dubbing`, `seed-audio-1.5-video-translation`, `seed-audio-1.5-stem-separation`
- Category: Music
- Auth: `Authorization: Bearer $POYO_API_KEY`
- Create a key at https://poyo.ai/dashboard/api-key

This model uses PoYo's unified async API. POST the JSON body below, then poll status with the returned `task_id` or receive a webhook on `callback_url`. Failed tasks are not charged.

## Pricing

- Audio generation: 0.5 credits ($0.0025) per billed second
- Video dubbing: 2 credits ($0.010) per billed second
- Video translation: 3 credits ($0.015) per billed second
- Stem separation: 10 credits ($0.050) per audio minute

For more details, see https://poyo.ai/models/seed-audio-1-5.

## API Information

The request envelope is always `{ model, input, callback_url? }`. Input fields below are nested under `input`.

### Request envelope

- `model` (`ModelEnum`, required):
  - Default: `"seed-audio-1.5"`
  - Options: `"seed-audio-1.5"`
- `callback_url` (`string`, optional):
  Optional completion or failure callback URL.

### Input Schema

Script, voice references, and output settings for audio generation.

The API accepts the following `input` parameters:

- `prompt` (`string`, required):
  Lines to speak, plus the speaker, language, emotion, pace, music, sound effects, and length of the clip. Quote every line that should be spoken. State a length that fits your lines, for example `Create a 10-second clip`. Credits follow the length the model plans for the clip; when `prompt` states a length, that length is used, so a length close to what your lines need keeps the charge predictable. With several reference audios, name the reference each speaker uses, in input order.
  - Length: 1 to unbounded characters
- `image_urls` (`list`, optional):
  One reference image URL that sets the scene, mood, or speaker. 300-6000 pixels per side, aspect ratio 0.4-2.5, up to 10MB, publicly accessible over HTTP or HTTPS. Use either `image_urls` or `reference_audio_urls` in one request.
  - Array of string
  - Length: 0 to 1
- `reference_audio_urls` (`list`, optional):
  Up to 6 reference audio URLs that set the voice timbre or performance. Each clip is WAV or MP3, 2-30 seconds, up to 15MB, and publicly accessible over HTTP or HTTPS. All clips together run up to 180 seconds. Use either `reference_audio_urls` or `image_urls` in one request.
  - Array of string
  - Length: 0 to 6
- `speed` (`float`, optional):
  Speech speed multiplier from 0.5 to 2. `1` is normal speed. Default: `1`.
  - Default: `1`
  - Range: `0.5` to `2`
- `volume` (`float`, optional):
  Volume multiplier from 0.5 to 2. `1` is normal volume. Default: `1`.
  - Default: `1`
  - Range: `0.5` to `2`
- `pitch` (`integer`, optional):
  Pitch shift in semitones from -12 to 12. `0` is normal pitch, `-12` is one octave lower, and `12` is one octave higher. Default: `0`.
  - Default: `0`
  - Range: `-12` to `12`
- `output_format` (`OutputFormatEnum`, optional):
  Audio format: `mp3`, `wav`, `pcm` (raw 16-bit sample data), or `ogg_opus` (Opus in an Ogg container). Default: `mp3`.
  - Default: `"mp3"`
  - Options: `"mp3"`, `"wav"`, `"pcm"`, `"ogg_opus"`
- `sample_rate` (`SampleRateEnum`, optional):
  Output sample rate in Hz: `8000`, `16000`, `24000`, `32000`, `44100`, or `48000`. Default: `44100`. `ogg_opus` uses `48000`.
  - Default: `44100`
  - Options: `8000`, `16000`, `24000`, `32000`, `44100`, `48000`
- `enable_safety_checker` (`boolean`, optional):
  Content safety checking. Default: `true`.
  - Default: `true`

Required Parameters Example:

```json
{
  "model": "seed-audio-1.5",
  "input": {
    "prompt": "Create a 20-second audio scene at a busy night market. A cheerful street-food vendor (middle-aged woman, warm voice) calls out in English: 'Fresh dumplings, hot from the steamer! Two for three dollars!' A young man answers, curious: 'Are the pork ones spicy?' She laughs: 'Only if you ask nicely.' Background: sizzling woks, distant chatter and a soft lo-fi guitar loop."
  }
}
```

Full Example:

```json
{
  "model": "seed-audio-1.5",
  "input": {
    "prompt": "Create a 20-second audio scene at a busy night market. A cheerful street-food vendor (middle-aged woman, warm voice) calls out in English: 'Fresh dumplings, hot from the steamer! Two for three dollars!' A young man answers, curious: 'Are the pork ones spicy?' She laughs: 'Only if you ask nicely.' Background: sizzling woks, distant chatter and a soft lo-fi guitar loop.",
    "speed": 1,
    "volume": 1,
    "pitch": 0,
    "output_format": "mp3",
    "sample_rate": 44100,
    "enable_safety_checker": true
  }
}
```

Voice from a reference clip:

```json
{
  "model": "seed-audio-1.5",
  "input": {
    "prompt": "Create a 15-second clip. Using the voice from reference audio 1, a calm museum guide says in English: 'Please gather around. This bronze bell was cast over eight hundred years ago, and it still rings in tune.' Light echo of a large stone hall and faint footsteps.",
    "reference_audio_urls": [
      "https://storage.poyo.ai/models/seed-audio-1-5/examples/input-voice-reference-4233cde89a9c.mp3"
    ]
  }
}
```

Scene from a reference image:

```json
{
  "model": "seed-audio-1.5",
  "input": {
    "prompt": "Create a 15-second audio scene that matches the reference image. A cheerful fox tour guide says in English: 'Stay close, everyone, the dunes get windy after noon!' A tiny tortoise answers in a slow, sleepy voice: 'We are going as fast as we can.' Desert wind, soft footsteps in sand and a light playful ukulele tune.",
    "image_urls": [
      "https://storage.poyo.ai/covers/poyo-cover-0187cb301918.webp"
    ]
  }
}
```

### Output Schema

Submit returns a `task_id`. Poll `GET /api/generate/status/{task_id}` until `status` is `finished` or `failed`. Completed media is in `data.files`.

Response fields:

- `code` (`CodeEnum`, required):
  Business status code. `200` means success; any other value means the request failed. Always check this field: some validation errors return HTTP 200 with `code: 400` in the body.
  
  - `200`: Success
  - `400`: Invalid request parameters
  - `401`: Missing or invalid API key
  - `402`: Insufficient credits
  - `403`: Permission denied
  - `404`: Resource not found
  - `408`: Request timeout
  - `429`: Rate limit exceeded
  - `500`: Internal server error
  - `502`: Upstream service error
  - `503`: Service unavailable
  
  See [Error Codes](/api-manual/error-codes) for details.
  - Options: `200`, `400`, `401`, `402`, `403`, `404`, `408`, `429`, `500`, `502`, `503`
  - Examples: `200`
- `data` (`object`, required):

Example Response:

```json
{
  "code": 200,
  "data": {
    "task_id": "task_example",
    "status": "finished",
    "files": [
      {
        "file_url": "https://storage.poyo.ai/models/seed-audio-1-5/examples/scene-night-market-9307f3aff086.mp3",
        "file_type": "audio"
      }
    ]
  }
}
```

## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://api.poyo.ai/api/generate/submit \
  --header "Authorization: Bearer $POYO_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"model":"seed-audio-1.5","input":{"prompt":"Create a 20-second audio scene at a busy night market. A cheerful street-food vendor (middle-aged woman, warm voice) calls out in English: 'Fresh dumplings, hot from the steamer! Two for three dollars!' A young man answers, curious: 'Are the pork ones spicy?' She laughs: 'Only if you ask nicely.' Background: sizzling woks, distant chatter and a soft lo-fi guitar loop."}}'
```

### Python

```python
import json
import os
import time
import requests

API = "https://api.poyo.ai"
headers = {
    "Authorization": f"Bearer {os.environ['POYO_API_KEY']}",
    "Content-Type": "application/json",
}
payload = json.loads("{\n  \"model\": \"seed-audio-1.5\",\n  \"input\": {\n    \"prompt\": \"Create a 20-second audio scene at a busy night market. A cheerful street-food vendor (middle-aged woman, warm voice) calls out in English: 'Fresh dumplings, hot from the steamer! Two for three dollars!' A young man answers, curious: 'Are the pork ones spicy?' She laughs: 'Only if you ask nicely.' Background: sizzling woks, distant chatter and a soft lo-fi guitar loop.\"\n  }\n}")

submit = requests.post(f"{API}/api/generate/submit", headers=headers, json=payload)
submit.raise_for_status()
task_id = submit.json()["data"]["task_id"]

while True:
    status = requests.get(f"{API}/api/generate/status/{task_id}", headers=headers)
    status.raise_for_status()
    data = status.json()["data"]
    if data["status"] in ("finished", "failed"):
        print(data)
        break
    time.sleep(2)
```

### JavaScript

```javascript
const headers = {
  Authorization: `Bearer ${process.env.POYO_API_KEY}`,
  "Content-Type": "application/json",
};

const submit = await fetch("https://api.poyo.ai/api/generate/submit", {
  method: "POST",
  headers,
  body: JSON.stringify({
  "model": "seed-audio-1.5",
  "input": {
    "prompt": "Create a 20-second audio scene at a busy night market. A cheerful street-food vendor (middle-aged woman, warm voice) calls out in English: 'Fresh dumplings, hot from the steamer! Two for three dollars!' A young man answers, curious: 'Are the pork ones spicy?' She laughs: 'Only if you ask nicely.' Background: sizzling woks, distant chatter and a soft lo-fi guitar loop."
  }
}),
});

const submitted = await submit.json();
const taskId = submitted.data.task_id;

while (true) {
  const statusResponse = await fetch(`https://api.poyo.ai/api/generate/status/${taskId}`, { headers });
  const status = await statusResponse.json();
  if (["finished", "failed"].includes(status.data.status)) {
    console.log(status.data);
    break;
  }
  await new Promise((resolve) => setTimeout(resolve, 2000));
}
```

## Additional Resources

### Documentation

- [Model Playground](https://poyo.ai/models/seed-audio-1-5)
- [API Documentation](https://docs.poyo.ai/api-manual/music-series/seed-audio-1-5)
- [API Documentation (Markdown)](https://docs.poyo.ai/api-manual/music-series/seed-audio-1-5.md)
- [Task status](https://docs.poyo.ai/api-manual/task-management/query-task-status)
- [Webhooks](https://docs.poyo.ai/api-manual/task-management/webhooks)

### Other agent-readable surfaces

- [Platform overview](https://poyo.ai/llms.txt)
- [Documentation index](https://docs.poyo.ai/llms.txt)
- [Full documentation text](https://docs.poyo.ai/llms-full.txt)
- Any other model: `https://poyo.ai/models/<model-id>/llms.txt`
