On this page
- An account. Signing up grants $20 of credit; a job costs $0.50 per minute of the longest input.
- A recording: WAV, AIFF, FLAC, MP3, M4A / AAC, OGG / Opus, WMA, CAF, or AMR. Up to 200 MB per file. Video is refused.
curlandjq, or Python withrequests, or Node 18+.
Get a key
/v1/auth/signup/v1/keysSign up (or log in) to get a session token, then trade it for an API key. The key is returned once. Every call below sends it as Authorization: Bearer mk_live_…. Details in Authenticate.
curl -X POST https://dueta.ai/v1/keys \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{"name": "production-server"}'
# -> {"id": "...", "name": "production-server", "prefix": "mk_live_8fQ2",
# "key": "mk_live_8fQ2...", "created_at": "..."} <- full secret, shown once
export DUETA_API_KEY="mk_live_8fQ2..."Upload a recording
/v1/uploads/v1/uploads/{id}/contentDeclare the file, then PUT its bytes as a raw body to the content_url the declaration returns. When the last byte lands the upload turns ready with its measured duration. Nothing is charged yet. Resuming and the full field list are in Upload audio.
curl -X POST https://dueta.ai/v1/uploads \
-H "Authorization: Bearer $DUETA_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"filename\": \"conversation.wav\", \"size_bytes\": $(wc -c < conversation.wav)}"
# -> 201 {"id": "upl_9f2c7a41d0e8", "state": "pending",
# "content_url": "/v1/uploads/upl_9f2c7a41d0e8/content", ...}Run the job
/v1/jobs/separationName the upload id. The job is quoted on the upload's duration, the credit is held, and the job is queued. Omit pipeline to run every step. The other product, one file per microphone, is in Run a separation.
curl -X POST https://dueta.ai/v1/jobs/separation \
-H "Authorization: Bearer $DUETA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs": ["upl_9f2c7a41d0e8"],
"pipeline": {"super_resolution": false}}'
# -> 201, the job. Omit "pipeline" to run every step.Download the tracks
/v1/jobs/{id}/v1/jobs/{id}/stems/{name}Poll until status is succeeded, then fetch each name in result.stems[]. Streaming and callbacks are in Track a job; FLAC and ZIP downloads in Get results.
while :; do
JSON=$(curl -sS -H "Authorization: Bearer $DUETA_API_KEY" https://dueta.ai/v1/jobs/$JOB_ID)
echo "$JSON" | jq -r '[.status, .stage, (.progress * 100 | floor | tostring) + "%"] | join(" ")'
case $(echo "$JSON" | jq -r .status) in
succeeded) break ;;
failed|canceled) echo "$JSON" | jq -r .error; exit 1 ;;
esac
sleep 2
done# WAV, byte for byte as rendered:
curl -H "Authorization: Bearer $DUETA_API_KEY" -o track.wav "https://dueta.ai/v1/jobs/$JOB_ID/stems/$STEM_NAME"
# FLAC, the same samples losslessly at about half the size:
curl -H "Authorization: Bearer $DUETA_API_KEY" -o track.flac "https://dueta.ai/v1/jobs/$JOB_ID/stems/$STEM_NAME?format=flac"Cases
- 402
- Not enough credit for the job. Nothing was charged; top up and submit the same upload id again.
- 409
- The upload is not ready yet, or your email is unverified on a deployment that requires it. Finish the upload, or click the verification link.
- 429
- More than 5 jobs in progress, or more than 20 submissions a minute. Wait Retry-After seconds.
- 415
- The file is video. Export the audio track and upload that.