> For the complete documentation index, see [llms.txt](https://docs.aimlapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aimlapi.com/api-references/speech-models/text-to-speech/bytedance/seed-audio-1.0.md).

# Seed Audio 1.0

{% columns %}
{% column width="66.66666666666666%" %}
{% hint style="info" %}
This documentation is valid for the following list of our models:

* `bytedance/seed-audio-1-0`
  {% endhint %}
  {% endcolumn %}

{% column width="33.33333333333334%" %} <a href="https://aimlapi.com/app/bytedance/seed-audio-1-0" class="button primary">Try in Playground</a>
{% endcolumn %}
{% endcolumns %}

## Model Overview

Seed Audio 1.0 is a non-streaming audio generation model for speech, sound effects, timbre control, and reference-guided audio creation.

## Setup your API Key

If you don't have an API key for the AI/ML API yet, feel free to use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up).

## API Schema

## POST /v1/tts

>

```json
{"openapi":"3.0.0","info":{"title":"AIML API","version":"1.0.0"},"servers":[{"url":"https://api.aimlapi.com"}],"paths":{"/v1/tts":{"post":{"operationId":"_v1_tts","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","enum":["bytedance/seed-audio-1-0"]},"text":{"type":"string","minLength":1,"maxLength":3000,"description":"Text to synthesize (the TTS prompt). Use @Audio1, @Audio2, etc. to reference audio clips."},"references":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","description":"BytePlus TTS2.0 voice ID or cloned voice ID."},"audio_data":{"type":"string","description":"Base64-encoded reference audio."},"audio_url":{"type":"string","format":"uri","description":"URL of a reference audio file."},"image_data":{"type":"string","description":"Base64-encoded reference image."},"image_url":{"type":"string","format":"uri","description":"URL of a reference image."}}},"maxItems":3,"description":"Reference resources. Supports up to three audio references or one image reference."},"audio_config":{"type":"object","properties":{"format":{"type":"string","enum":["wav","mp3","pcm","ogg_opus"],"default":"wav","description":"The format of the generated music."},"sample_rate":{"anyOf":[{"type":"string","enum":["8000","16000","24000","32000","44100","48000"]},{"type":"integer"}],"description":"The sampling rate of the generated music.","enum":[8000,16000,24000,32000,44100,48000]},"speech_rate":{"type":"integer","minimum":-50,"maximum":100,"default":0,"description":"Speech rate. 100 means 2.0x speed, -50 means 0.5x speed."},"loudness_rate":{"type":"integer","minimum":-50,"maximum":100,"default":0,"description":"Volume. 100 means 2.0x volume, -50 means 0.5x volume."},"pitch_rate":{"type":"integer","minimum":-12,"maximum":12,"default":0,"description":"Pitch adjustment."}}},"watermark":{"type":"object","properties":{"aigc_watermark":{"type":"boolean","default":false,"description":"Adds an explicit audio rhythm marker."},"aigc_metadata":{"type":"object","properties":{"enable":{"type":"boolean","default":false},"content_producer":{"type":"string"},"produce_id":{"type":"string"},"content_propagator":{"type":"string"},"propagate_id":{"type":"string"}},"description":"Implicit watermark metadata."}}}},"required":["model","text"],"title":"bytedance/seed-audio-1-0"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"uri"},"meta":{"type":"object","nullable":true,"properties":{"usage":{"type":"object","nullable":true,"properties":{"credits_used":{"type":"number","description":"The number of tokens consumed during generation."},"usd_spent":{"type":"number","description":"The total amount of money spent by the user in USD."}},"required":["credits_used","usd_spent"]}},"description":"Additional details about the generation."}},"required":["audio"]}},"audio/wav":{"schema":{"type":"string","format":"binary","description":"Audio stream"}}},"description":"Successful response."}}}}}}
```

## Code Example

{% tabs %}
{% tab title="Python" %}
{% code overflow="wrap" %}

```python
import requests

def main():
    url = "https://api.aimlapi.com/v1/tts"
    headers = {
        # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
        "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
    }
    payload = {
        "model": "bytedance/seed-audio-1-0",
        "text": "Cities of the future promise to radically transform how people live, work, and move.",
        "voice": "en-US-AvaNeural",
    }

    try:
        response = requests.post(url, headers=headers, json=payload)
        response.raise_for_status()

        response_data = response.json()
        audio_url = response_data["audio"]["url"]

        audio_response = requests.get(audio_url, stream=True)
        audio_response.raise_for_status()

        # result = os.path.join(os.path.dirname(__file__), "audio.mp3")  # if you run this code as a .py file
        result = "audio.mp3"  # if you run this code in Jupyter Notebook

        with open(result, "wb") as write_stream:
            for chunk in audio_response.iter_content(chunk_size=8192):
                if chunk:
                    write_stream.write(chunk)

        print("Audio saved to:", result)

    except requests.exceptions.RequestException as e:
        print(f"Error making request: {e}")

if __name__ == "__main__":
    main()
```

{% endcode %}
{% endtab %}

{% tab title="JS" %}
{% code overflow="wrap" %}

```javascript
const https = require("https");
const fs = require("fs");

// Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
const apiKey = "<YOUR_AIMLAPI_KEY>";

const data = JSON.stringify({
  model: "bytedance/seed-audio-1-0",
  text: "Cities of the future promise to radically transform how people live, work, and move.",
  voice: "en-US-AvaNeural",
});

const options = {
  hostname: "api.aimlapi.com",
  path: "/v1/tts",
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Content-Length": Buffer.byteLength(data),
  }
};

const req = https.request(options, (res) => {
  if (res.statusCode >= 400) {
    let error = "";
    res.on("data", chunk => error += chunk);
    res.on("end", () => console.error(`Error ${res.statusCode}:`, error));
    return;
  }

  let body = "";
  res.on("data", chunk => body += chunk);
  res.on("end", () => {
    const audioUrl = JSON.parse(body).audio.url;

    https.get(audioUrl, (audioRes) => {
      const file = fs.createWriteStream("audio.mp3");
      audioRes.pipe(file);
      file.on("finish", () => {
        file.close();
        console.log("Audio saved to audio.mp3");
      });
    });
  });
});

req.on("error", (e) => console.error("Request error:", e));
req.write(data);
req.end();
```

{% endcode %}
{% endtab %}
{% endtabs %}

<details>

<summary>Response</summary>

```
Audio saved to: audio.mp3
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aimlapi.com/api-references/speech-models/text-to-speech/bytedance/seed-audio-1.0.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
