Skip to content
SeedAudio

DEVELOPER DOCUMENTATION

Audio API documentation

Create a task, query its status, then download through an authenticated site endpoint. Keep API keys on your server.

A paid credit pack or an active paid subscription is required; gifted credits alone do not unlock the API. A 503 response means the service is not activated or is temporarily unavailable.

1. Quick start

Run these examples in a server terminal. Python requires pip install requests; JavaScript uses Node.js 22 or later.

cURL

export SEEDAUDIO_ORIGIN='https://seedaudio.now'
export SEEDAUDIO_API_KEY='YOUR_API_KEY'

curl --fail-with-body "$SEEDAUDIO_ORIGIN/api/v1/audio/generations" \
  -H "Authorization: Bearer $SEEDAUDIO_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: rain-scene-001' \
  -d '{"model":"seed-audio-1.0","prompt":"Gentle rain against a window.","output_format":"mp3"}'

# Replace TASK_ID with the returned id. Poll every 5 seconds until terminal.
curl --fail-with-body "$SEEDAUDIO_ORIGIN/api/v1/audio/generations/TASK_ID" \
  -H "Authorization: Bearer $SEEDAUDIO_API_KEY"

# After status is succeeded, download using the same account's active key.
curl --fail-with-body "$SEEDAUDIO_ORIGIN/api/v1/audio/generations/TASK_ID/content" \
  -H "Authorization: Bearer $SEEDAUDIO_API_KEY" -o audio.mp3

JavaScript (Node.js)

const origin = "https://seedaudio.now";
const headers = { Authorization: 'Bearer ' + process.env.SEEDAUDIO_API_KEY };
async function json(response) {
  const data = await response.json();
  if (!response.ok) throw new Error(data.error?.message || 'Request failed');
  return data;
}
// Persist this key with your request; reuse it if the POST response is lost.
const idempotencyKey = 'rain-scene-001';
let task = await json(await fetch(origin + '/api/v1/audio/generations', {
  method: 'POST',
  headers: { ...headers, 'Content-Type': 'application/json', 'Idempotency-Key': idempotencyKey },
  body: JSON.stringify({ prompt: 'Gentle rain against a window.' })
}));
const deadline = Date.now() + 65 * 60 * 1000;
while (['queued', 'processing'].includes(task.status) && Date.now() < deadline) {
  await new Promise(resolve => setTimeout(resolve, 5000));
  task = await json(await fetch(origin + '/api/v1/audio/generations/' + task.id, { headers }));
}
if (task.status !== 'succeeded') throw new Error(task.error?.message || 'Poll deadline reached; keep the task id.');
const response = await fetch(task.output.url, { headers });
if (!response.ok) throw new Error('Download failed');
const { writeFile } = await import('node:fs/promises');
await writeFile('audio.mp3', new Uint8Array(await response.arrayBuffer()));

Python

import os, time, requests

origin = "https://seedaudio.now"
headers = {"Authorization": "Bearer " + os.environ["SEEDAUDIO_API_KEY"]}
# Keep this key with your request; a new scene needs a new key.
response = requests.post(origin + "/api/v1/audio/generations", timeout=45,
    headers={**headers, "Idempotency-Key": "rain-scene-001"},
    json={"prompt": "Gentle rain against a window."})
response.raise_for_status()
task = response.json()
deadline = time.monotonic() + 65 * 60
while task["status"] in ("queued", "processing") and time.monotonic() < deadline:
    time.sleep(5)
    response = requests.get(origin + "/api/v1/audio/generations/" + task["id"], headers=headers, timeout=90)
    response.raise_for_status()
    task = response.json()
if task["status"] != "succeeded":
    raise RuntimeError(task.get("error") or "Poll deadline reached; keep the task id.")
with requests.get(task["output"]["url"], headers=headers, stream=True, timeout=60) as response:
    response.raise_for_status()
    with open("audio.mp3", "wb") as audio:
        for chunk in response.iter_content(65536):
            audio.write(chunk)

2. Endpoints and identity

https://seedaudio.now

  • POST /api/v1/audio/generations → 202
  • GET /api/v1/audio/generations/{id} → 200
  • GET / HEAD /api/v1/audio/generations/{id}/content → 200 / 206

All endpoints require Authorization: Bearer. Tasks belong to the account and may be accessed using another active key from that account. Download URLs are stable but private. Never put keys in a URL. Signed-in history uses session authentication.

3. Request parameters

Content-Type: application/json; maximum 32 KiB. Unknown fields are rejected. Reference URLs must use public HTTPS, not internal addresses.

ParameterValuesNotes
modelseed-audio-1.0Default and only model.
promptstringRequired: 1–2048 Unicode characters, not whitespace only; line breaks are preserved.
audio_referencesstring[]Up to 3 public HTTPS audio URLs, referenced in order as @Audio1/2/3. Each reference: at most 10 MB and 30 seconds, checked by the generation service.
voicestringA preset listed below; consumes one audio reference slot.
image_urlstringOne public HTTPS image URL; cannot be combined with voice or audio references.
output_formatmp3 / wav / pcm / ogg_opusDefault mp3. PCM is a raw file and may not play in a browser.
sample_rate8000 / 16000 / 24000 / 32000 / 44100 / 48000Default 24000 Hz.
speed / volume0.5–2Both default to 1; finite numbers only.
pitch-12–12Integer; default 0.
multilingualbooleanDefault false; an API extension that does not follow the page language.
Supported voice IDs

stokie_en · vivi_mixed_en_zh_ja_es_id · mindy_en_es_id_pt_zh · kian_en_zh · cedric_en_zh · sophie_en_zh · jean_en_zh · magnus_en_zh · mabel_en_zh · nadia_en_zh · opal_en_zh · pearl_en_zh · quentin_en_zh · corinne_mixed_en_zh · esther_mixed_en_zh · lyla_mixed_en_zh · tracy_es_zh · sandy_es_mixed_en_zh · felix_zh · celeste_zh · monkey_king_zh

4. Billing and task status

At 75 credits per minute, charges are rounded up by second, with a 10-credit minimum and 150-credit cap. Creation reserves 150; success returns the difference and failure returns the reservation. Original credit expiration dates remain unchanged.

8 / 30 / 60 / 120 seconds cost 10 / 38 / 75 / 150 credits respectively. A refunded or disputed purchase no longer unlocks new API tasks. For a subscription this applies to the current period's payment and lasts until the next period is paid. Other paid purchases still unlock access.

queued → processing → succeeded / failed

succeeded means both private storage and billing are complete. Recovery lasts up to 60 minutes; delivery or reliable duration failure returns the reserved credits. Errors contain only site-facing information.

Example successful response

{
  "id": "TASK_ID",
  "object": "audio.generation",
  "model": "seed-audio-1.0",
  "status": "succeeded",
  "billing": {
    "reserved_credits": 150,
    "charged_credits": 38,
    "refunded_credits": 112
  },
  "output": {
    "url": "https://seedaudio.now/api/v1/audio/generations/TASK_ID/content",
    "format": "mp3",
    "sample_rate": 24000,
    "duration": 30
  },
  "usage": {
    "audio_seconds": 30
  },
  "error": null
}

5. Retries and limits

Idempotency-Key is required: 1–128 letters, digits or ._:-. Use a new key for each new task and preserve the key and body when retrying. Keys are unique within an account and API version for the record lifetime. Same key and body returns the original task; a changed body returns 409. A timeout does not mean creation failed: do not retry with a new key.

Per account: 6 creation requests per minute, 60 combined queries and downloads per minute, and 2 tasks in flight. All keys share these limits. Site capacity may also return 429. Poll every 5 seconds.

6. Errors and downloading

HTTPcodeAction
400invalid_requestMissing idempotency key, invalid input or unknown fields.
401invalid_api_keyMissing, invalid or revoked key.
402insufficient_creditsFewer than 150 available credits.
403purchase_requiredNo paid credit pack or active paid subscription unlocks access, for example because its payment was refunded or disputed.
404not_foundNot found or not owned by this account.
409idempotency_conflict / not_readySame key with different input, or audio not ready.
413request_too_largeJSON exceeds 32 KiB.
416RangeInvalid byte range; multiple ranges are unsupported.
429rate_limit / concurrency_limitWait for Retry-After before retrying.
503api_unavailable / temporarily_unavailableService disabled, configuration incomplete or temporarily unavailable. Keep the task id and idempotency key.

Downloads support a single byte range, suffix ranges and HEAD. Responses are not cached or redirected to external media. Examples use MP3; use the appropriate extension for other formats. Client cancellation and customer-defined callbacks are not offered; query for results.