Seed Audio 1.5 Audio Separation
Extract dialogue, music, sound effects, or speaker tracks from one audio mix, with optional track labels.
Semua dokumentasi/v1/audio/seed/tasksSubmit seed-audio-1-5-separation tasks and poll GET /v1/audio/seed/tasks/{task_id}. Replace all example media URLs with your own public files. APISea selects the operation; no input.mode or callback configuration is required.
Contoh permintaan
# Requires Bash, curl, and jq. Replace example.com media URLs before running.
set -euo pipefail
TASK=$(curl --fail-with-body --silent --show-error \
"https://api.apisea.ai/v1/audio/seed/tasks" \
-H "Authorization: Bearer $APISEA_API_KEY" \
-H "Content-Type: application/json" \
--data '
{
"model": "seed-audio-1-5-separation",
"input": {
"audio_urls": [
"https://example.com/scene-mix.wav"
],
"prompt": "Separate the dialogue, background music, and sound effects.",
"format": "wav",
"sample_rate": 44100
}
}
')
TASK_ID=$(printf '%s' "$TASK" | jq -er '.data.task_id')
for attempt in $(seq 1 120); do
TASK=$(curl --fail-with-body --silent --show-error \
"https://api.apisea.ai/v1/audio/seed/tasks/$TASK_ID" \
-H "Authorization: Bearer $APISEA_API_KEY")
STATUS=$(printf '%s' "$TASK" | jq -er '.data.status')
case "$STATUS" in
completed) printf '%s\n' "$TASK" | jq '.data | {result, cost_usd}'; exit 0 ;;
failed) printf '%s\n' "$TASK" >&2; exit 1 ;;
submitted|processing) sleep 5 ;;
*) printf 'Unexpected task status: %s\n' "$STATUS" >&2; exit 1 ;;
esac
done
printf 'Polling timed out; resume GET polling with task_id=%s (do not resubmit).\n' "$TASK_ID" >&2
exit 1Authentication
Send Authorization: Bearer YOUR_APISEA_API_KEY on POST and GET requests. Send Content-Type: application/json when submitting. Manage keys in the APISea console.
Request parameters
Use POST /v1/audio/seed/tasks with {"model": "seed-audio-1-5-separation", "input": {...}}. APISea selects the operation from the public model ID. Do not send input.mode. Only the fields for this operation are listed below; do not add fields from another Seed Audio operation.
model
string — required.
Must be seed-audio-1-5-separation.
input
object — required.
Task inputs described below. Keep these fields nested inside input. APISea selects the operation from model; do not supply input.mode.
input.audio_urls
string[] — required.
Exactly one public HTTP(S) URL for a WAV or MP3 file, 2–360 seconds long.
input.prompt
string — required.
Describe which tracks to extract, such as dialogue, background music, sound effects, or individual speakers.
input.format
string — optional; default: wav.
Audio download format: wav, mp3, or ogg_opus.
input.sample_rate
integer — optional.
For WAV/MP3: 8000, 16000, 24000, 32000, 44100, or 48000 Hz; default 44100. For Ogg Opus: only 48000 Hz, which is also its default. Omit to use the format default.
Usage notes
Provide exactly one mixed audio file and describe the tracks to extract. Audio files must be public HTTP(S) WAV or MP3 URLs and 2–360 seconds long. Each returned track has its own audio URL. When labels are returned, use their zero-based result_index to associate them with the correct URL; do not assume that a fixed number or a fixed set of tracks is always returned.
Match track labels to URLs
result.extra_results.audio_tracks, when returned, is an array of labels. Each label has a zero-based result_index into result.urls and may include type and description. Check both the optional labels and the index before accessing the corresponding audio URL. The example response illustrates three tracks; the actual track count and labels depend on the requested extraction.
Poll task status and read results
Save data.task_id from the submission response. Use the same APISea key for authenticated polling:
curl --fail-with-body --silent --show-error \
"https://api.apisea.ai/v1/audio/seed/tasks/$TASK_ID" \
-H "Authorization: Bearer $APISEA_API_KEY"Continue polling while data.status is submitted or processing. Stop on completed or failed. A failed task is terminal, not a reason to continue polling indefinitely. APISea handles completion; no incoming callbacks, webhook registration, callback_url, or request_type are needed or accepted. Long media may take several minutes. The examples poll every five seconds for up to ten minutes; on a client timeout, resume GET polling with the same task ID instead of creating another billable task.
A successful task returns data.result.urls (an array of media URL strings), data.result.final_duration (billable seconds), optional data.result.extra_results (structured auxiliary outputs), and optional data.cost_usd (the finalized USD charge). Audio URLs appear in track order, followed by any requested video. result is a JSON object, not a JSON-encoded string: no additional JSON parsing is needed. extra_results may be absent when no auxiliary outputs are returned. Do not use client elapsed time to estimate billable duration. Example CDN URLs below are illustrative, not live results.
Pricing and rounding
The retail rate is $0.06 per minute of summed returned-track duration, not per minute of the source file. Sum the durations of all returned tracks first, then round the sum up to a whole second. Three tracks of 8 seconds each produce final_duration: 24 and cost $0.024. A summed duration of 6.2 seconds becomes 7 billable seconds and costs $0.0072 after request rounding. Do not round each track separately or charge only the input duration.
final_duration is the billable duration rounded up to a whole second. After duration rounding, the per-request USD charge is rounded up in $0.0012 increments. This is not nearest-cent rounding and not rounding the retail total to $0.001. For the retail per-minute rate R and billable seconds S, the exact equivalent public calculation is:
cost_usd = ceil(((S / 60) * R) / 0.0012) * 0.0012Use decimal arithmetic for monetary calculations to avoid binary floating-point ceiling errors. Read the finalized data.cost_usd when available rather than recomputing an invoice from a displayed rate.
Available balance and retries
Before submission, the account and key need $1.08 available for a temporary authorization. This is not the final charge: unused funds are released on completion, and a confirmed failed task costs $0. To retry a submission safely, send the same Idempotency-Key header and identical JSON body.
Related Seed Audio APIs
Respons
{
"data": {
"task_id": "task_seed_example",
"status": "submitted"
}
}Model yang menggunakan endpoint ini
Menemui masalah dalam dokumentasi ini? E-mel support@apisea.ai.