Tracks API: Pricing, Documentation

by Pixazo

Tracks API, content creators, filmmakers, and musicians can generate high-quality original music tracks for their projects. The API offers intuitive controls for style, tempo, and mood, making professional music creation accessible to users of all skill levels.

Get API Key
Track Music API
View in Playground

Models Version

WELCOME BONUS

Get $5 Free Credit on First Payment

No strings attached — add funds and get $5 bonus instantly

Claim Your $5 →

Track v1.0 API Documentation

https://gateway.pixazo.ai/tracks/v1/generate

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Generate Music - Tracks

Request Code

POST https://gateway.pixazo.ai/tracks/v1/generate
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A cinematic Hans Zimmer style orchestral piece, building tension with heavy percussion and brass, epic atmosphere",
  "lyrics": "",
  "duration": 120,
  "bpm": 140,
  "key": "E minor",
  "time_signature": "4/4",
  "seed": 42
}
import requests

url = "https://gateway.pixazo.ai/tracks/v1/generate"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
    "prompt": "A cinematic Hans Zimmer style orchestral piece, building tension with heavy percussion and brass, epic atmosphere",
    "lyrics": "",
    "duration": 120,
    "bpm": 140,
    "key": "E minor",
    "time_signature": "4/4",
    "seed": 42
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = 'https://gateway.pixazo.ai/tracks/v1/generate';

const data = {
  prompt: 'A cinematic Hans Zimmer style orchestral piece, building tension with heavy percussion and brass, epic atmosphere',
  lyrics: '',
  duration: 120,
  bpm: 140,
  key: "E minor",
  time_signature: "4/4",
  seed: 42
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Cache-Control': 'no-cache',
    'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY'
  },
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl -v -X POST "https://gateway.pixazo.ai/tracks/v1/generate" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \
  --data-raw '{
    "prompt": "A cinematic Hans Zimmer style orchestral piece, building tension with heavy percussion and brass, epic atmosphere",
    "lyrics": "",
    "duration": 120,
    "bpm": 140,
    "key": "E minor",
    "time_signature": "4/4",
    "seed": 42
  }'

Output

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "tracks",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "tracks",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync modePOST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - Generate Music

ParameterRequiredTypeDefaultAllowed values / rangeDescription
promptYesstringDescribes the overall musical style, genre, mood, instrumentation, and atmosphere.
lyricsNostringemptySong lyrics controlling structure, sections, and vocal content. Use structure tags like [verse], [chorus], [bridge], [outro]. Leave empty for instrumental music. Default: empty
instrumentalNobooleanfalsetrue, falseWhen true, generate a purely instrumental track with no vocals; any provided lyrics are ignored. Default: false
durationNonumber3010–600Target duration of the track in seconds. Minimum 10 seconds, maximum 600 (10 minutes). Default: 30
bpmNointegerauto30–300Target tempo in beats per minute. Default: auto (inferred from the prompt)
keyNostringautoMusical key name, e.g. "C major", "B minor"Musical key the song is written in. Omit this field to let the model choose the key.
time_signatureNostringautoTime signature, e.g. "4/4", "3/4", "6/8"Rhythmic time signature of the song. Omit this field to let the model choose.
batch_sizeNointeger11-4Number of song variations to generate from this prompt. Values above 4 are capped at 4. Each variation is returned as a separate entry in the songs array of the status response.
thinkingNobooleanfalsetrue, falseWhen true, the language model first plans the song (a chain-of-thought "blueprint" of structure and style) before generating. Improves structure and prompt adherence, at the cost of extra generation time.
infer_stepsNointegerNumber of denoising / inference steps. Higher values (e.g. 60–100) improve audio quality at the cost of longer generation time; lower values (e.g. 10–30) are faster. Example: 25
guidance_scaleNonumberClassifier-free guidance strength — how strongly the output follows the prompt. Higher values increase prompt adherence; lower values allow more creative variation (typical range ~3–7). Example: 7.5
seedNointeger-1Random seed for reproducible output. Reuse the same seed with identical settings to reproduce a result; use -1 for a different result each time. Default: -1 (random)

Example Request

{
  "prompt": "A cinematic Hans Zimmer style orchestral piece, building tension with heavy percussion and brass, epic atmosphere",
  "lyrics": "",
  "duration": 120,
  "bpm": 140,
  "key": "E minor",
  "time_signature": "4/4",
  "seed": 42
}

Response

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Response Handling

Common status codes.

CodeMeaning
202Accepted — Request queued
Bad Request
401Unauthorized
402Insufficient Balance
403Forbidden
Too Many Requests
500Internal Server Error

Error Responses

Queue system errors and model validation errors.

Queue System Errors

// 402 — Insufficient balance
{
  "error": "Insufficient Balance",
  "message": "Your wallet does not have enough balance."
}
// 400 — Model not found
{
  "error": "Model not found",
  "message": "Model 'tracks' not found or is disabled"
}

Error via Status/Webhook

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "tracks",
  "error": "Description of the error",
  "output": null
}

Retrieving Results

Poll the universal status endpoint to check progress and retrieve results.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_API_KEY

cURL Example

curl -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  "https://gateway.pixazo.ai/v2/requests/status/tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Response (Completed)

{
  "request_id": "tracks_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "tracks",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/tracks_019dxxxx-xxxx/output.ext"
    ],
    "media_type": "application/octet-stream"
  },
  "created_at": "2026-03-31T10:00:00.000Z",
  "updated_at": "2026-03-31T10:00:15.000Z",
  "completed_at": "2026-03-31T10:00:15.000Z"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier
statusstringQUEUED, PROCESSING, COMPLETED, FAILED, or ERROR
model_idstringModel that processed the request
errorstring|nullError message if failed
output.media_urlarrayURLs to generated media (R2 CDN)
output.media_typestringMIME type of the output
created_atstringWhen request was created
completed_atstring|nullWhen request completed
polling_urlstringStatus URL (initial response only)

Status Values

StatusDescription
QUEUEDRequest accepted, waiting to be processed
PROCESSINGBeing processed by the model
COMPLETEDDone — output contains the result
FAILEDFailed — check error field
ERRORSystem error — not charged

Status Flow

QUEUED → PROCESSING → COMPLETED
                    → FAILED
                    → ERROR

Typical Workflow

  1. Send a generate request to the API endpoint
  2. Save the request_id from the response
  3. Poll every 5-10 seconds: GET /v2/requests/status/{request_id}
  4. When status is "COMPLETED", download from output.media_url

Tip: Use X-Webhook-URL header to get a callback instead of polling.

Track v1.0 API Pricing

Your request is Free
Free during preview — fair-use rate limit of 60 requests/minute applies. See terms.

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
99,800last 30d
~3,327 per day
Success rate
98.2%
of completed generations
Generation time
47.7savg
p95 81.6s
Requests
Jul 21max 14,700Aug 19
Track v1.0Avg 3,327/day
Generation Time
Jul 21max 4.0minAug 19
Track v1.0Avg 47.6s
Error Rate
Jul 21max 38.5%Aug 19
Track v1.0Avg 1.9%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
98.20%
across all generations of this model family
Uptime
Jul 21max 100%Aug 19
SuccessfulAvg 98.13%