curl --fail-with-body -X POST "$RAWCHUNKS_API/api/voices" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"creator": $user,
"name": "Lead voice"
}')"
{
"success": true,
"voice": {
"id": "voice-example",
"name": "Lead voice",
"creator": "0x1111111111111111111111111111111111111111",
"status": "saved"
}
}
Voices
Save a voice from a song
Save and prepare vocals from an owned song.
POST
/
api
/
voices
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/voices" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"creator": $user,
"name": "Lead voice"
}')"
{
"success": true,
"voice": {
"id": "voice-example",
"name": "Lead voice",
"creator": "0x1111111111111111111111111111111111111111",
"status": "saved"
}
}
The song must have audio and belong to your account. Poll or follow events for preparation status. Saved voices.
Budget headers use six-decimal USDC atomic units. See session payments.
Headers and parameters
string
required
Bearer $SESSION_TOKEN. Use the complete token from your active Rawchunks session.string
required
Selected account address. Required for owner-scoped reads and writes. It identifies the account; your product must authenticate its own users.
string
Session network in CAIP-2 form, for example eip155:8453.
JSON body
string
required
Opaque ID returned by the API. Minimum length:
1.string
required
Wallet address for the selected account. Use the same address as the session owner. Minimum length:
10.string
Response (202)
Accepted; follow the returned task.boolean
required
object
required
Show Properties
Show Properties
string
required
string
required
string
required
string | null
string | null
string
required
Values:
saved, extracting, queued, training, ready, error.string | null
Errors
Failed JSON responses contain anerror string. Check the HTTP status before reading a successful result. See job handling for interrupted or uncertain submissions.
| Status | Meaning |
|---|---|
400 | Invalid request. |
401 | Invalid or expired session token. |
402 | Payment required or insufficient session budget. |
403 | Account does not match resource. |
404 | Resource not found. |
409 | Resource conflict; reload state or open an editable version. |
500 | Request failed. |
curl --fail-with-body -X POST "$RAWCHUNKS_API/api/voices" \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "x-network-id: $NETWORK" \
-H "x-session-user-address: $USER_ADDRESS" \
-H "Content-Type: application/json" \
--data "$(jq -nc --arg user "$USER_ADDRESS" --arg song "$SONG_ID" '{
"songId": $song,
"creator": $user,
"name": "Lead voice"
}')"
{
"success": true,
"voice": {
"id": "voice-example",
"name": "Lead voice",
"creator": "0x1111111111111111111111111111111111111111",
"status": "saved"
}
}
⌘I