Skip to content

Model Description

seed-audio-1.0
Text-to-Speech Generation
Audio Reference Generation ✅(Up to 3 reference audio files)
Image Reference Generation ✅(Only 1 reference image; cannot be mixed with audio references)
Single output limit 120 seconds
text_promptupper limit 3000 characters

Functional Interface Details

Speech Synthesis (TTS Create)

Request URL

POST https://genaiapi-m2.cloudsway.net/v1/ai/{endpoint}/seedaudio/tts/create

Request Header

Header Required or not Description
Authorization Yes Bearer {YOUR_AK}
Content-Type Yes application/json

Request Body Parameters

Parameter Name Field Type Required or not Description
text_prompt string Yes Prompt or text to be synthesized. Maximum length: 3000 characters.
references array No Reference resources. This field can be omitted when generating plain text.
audio_config object No Output the audio configuration.
watermark object No Watermark configuration object. An empty object can be passed.

Generation Mode

  • Plain text generation: omit references. The API generates audio based on the text_prompt.

  • Audio Reference Generation: Provide audio references via speaker, audio_dataor audio_url. Reference the audio files in sequence in text_promptusing @Audio1, @Audio2, @Audio3.

  • Image reference generation: Provide a reference image via image_dataor image_url. text_promptonly needs to contain the text to be synthesized.

references[] element field (reference rules)

Parameter Name Field Type Required or not Description Mutual Exclusion Rule
speaker string
No Voice ID. You can use the supported Doubao TTS voice or the ID of a cloned voice. The audio reference is to be selected from one of speaker, audio_data, and audio_url.
audio_data string No Base64-encoded reference audio. Select one from speaker, audio_data, and audio_url.
audio_url string No The URL of the remote reference audio file.
Select one from speaker, audio_data, and audio_url.
image_data string
No Reference image encoded in Base64. Select either image_dataor image_url. Do not mix image references with audio references.
image_url string No The URL of the remote reference image. Select either image_dataor image_url. Do not mix image references with audio references.

Reference Resource Limits

  • Audio references: A maximum of 3 per request.

  • Each reference audio: maximum 30 seconds, and no larger than 10 MB.

  • Supported reference audio formats: wav, mp3, pcm, ogg_opus.

  • Image reference: Only 1 image per request.

  • Reference image size: no more than 10 MB.

  • Supported reference image formats: jpeg, png, webp.

  • Image references and audio references cannot be mixed in the same request.

audio_config field (audio configuration)

Parameter Name Field Type Required or not default value Description
format string No wav 允许值:wav、mp3、pcm、ogg_opus
sample_rate int No 24000 Allowed values: 8000,16000,24000,32000,44100,48000
speech_rate int No 0 Value range: -50 to 100. 100 corresponds to 2.0x speed; -50 corresponds to 0.5x speed.
loudness_rate int No 0 Value range: -50 to 100. 100 corresponds to 2.0 times the volume; -50 corresponds to 0.5 times the volume.
pitch_rate int No 0 Value range: -12 to 12.

Response Parameters

Parameter Name Field Type Description
code int Status code. Refer to the official error code documentation for details.
message string Status details.
audio string The generated audio data, encoded in Base64.
duration float The duration after speed adjustment or post-processing, in seconds.
original_duration float The output duration of the original model, in seconds, is used for billing with an upper limit of 120 seconds.
url
string Temporary audio URL. The official stated validity period is 2 hours.

Request Example

Plain Text Generation

curl --request POST \
  --url 'https://genaiapi-m2.cloudsway.net/v1/ai/{endpoint}/seedaudio/tts/create' \
  --max-time 120 \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {YOUR_AK}' \
  --data-raw '{
    "text_prompt": "Generate a short suspense radio drama in a late-night convenience store.",
    "audio_config": {
      "format": "mp3",
      "sample_rate": 48000,
      "pitch_rate": 0,
      "speech_rate": 0,
      "loudness_rate": 0
    },
    "watermark": {}
  }'

Audio Reference Generation

{
  "text_prompt": "Use @Audio1 as the narrator voice and read the following line naturally: Welcome to the store.",
  "references": [
    {
      "audio_url": "https://example.com/reference.mp3"
    }
  ],
  "audio_config": {
    "format": "wav",
    "sample_rate": 24000,
    "speech_rate": 0,
    "loudness_rate": 0,
    "pitch_rate": 0
  },
  "watermark": {}
}

Image Reference Generation

{
  "text_prompt": "Read this scene description in a restrained suspense style.",
  "references": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "audio_config": {
    "format": "wav",
    "sample_rate": 24000,
    "speech_rate": 0,
    "loudness_rate": 0,
    "pitch_rate": 0
  },
  "watermark": {}
}

Response Example

{
  "audio": "<base64-encoded-audio>",
  "duration": 3.52,
  "original_duration": 3.52,
  "url": "https://example.com/tmp/audio.wav"
}