CassetteAI Music Generator
cassetteai/music-generatorCassetteAI Music Generator creates instrumental music from a text prompt as 44.1 kHz stereo audio, from 10 seconds to 3 minutes long. A 30-second sample is ready in about 2 seconds.
- Base price
- $0.01USD / run
- Execution
- async
- Model type
- audio
- Input fields
- 2
Try the model
Playground
Your output will appear here
Complete the inputs, then click Run.
Model card
Specifications
Pricing
- Base price
- $0.01 / run
Context & modalities
- Input
- Schema-defined
- Output
- audio
Capabilities
- Chat
- Not supported
- Vision
- Not supported
- Reasoning
- Not supported
- Structured output
- Not supported
- Function calling
- Not supported
- Audio input
- Not supported
Access
- Provider
- CassetteAI
- Model ID
- cassetteai/music-generator
- Execution
- async
- Base URL
- https://api.sandbase.ai
- API
- Unified Run API
- Endpoint
- /v1/run
API README
CassetteAI Music Generator
CassetteAI Music Generator creates 44.1 kHz stereo music from a prompt, 10 seconds to 3 minutes long, in seconds.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Music description. |
duration | integer 10–180 | 30 | Length in seconds; sets the price. |
Billing
$0.02 per minute of generated music, prorated by duration.
| Length | Price |
|---|---|
| 30 s (default) | $0.01 |
| 1 min | $0.02 |
| 3 min | $0.06 |
Failed runs are not charged.
Prompting
- Name genre, instruments, mood, key and tempo (BPM).
Also on SandBase
Related: cassetteai/sound-effects-generator.
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "cassetteai/music-generator",
"prompt": "Smooth chill hip-hop beat with mellow piano melodies, deep bass, and soft drums, perfect for a night drive. Key: D Minor, Tempo: 90 BPM.",
"duration": 30
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Input Schema
2 parameters · 1 required · 1 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The prompt to generate music from. Genre, instruments, key and tempo work well. |
duration | integer | Optional | Length of the generated music in seconds (10–180). · Min: 10 · Max: 180 · Default: 30 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model runs asynchronously. Submit a request, then poll for the result.
- Submit: POST to /v1/run and read the returned
id. - Poll: GET /v1/run/{id} until status is
completed,failedortimeout. - Retrieve: read
outputsfrom the completed response.
Choose your model
Compare models
| Model | Type | Default price | Released |
|---|---|---|---|
CassetteAI Music GeneratorThis model CassetteAI | Audio | $0.01 / run | Mar 27, 2025 |
CassetteAI | Audio | $0.01 / run | Apr 3, 2025 |
Questions
FAQ
How do I call CassetteAI Music Generator through SandBase?
Create a SandBase API key, then send requests with the model ID "cassetteai/music-generator" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.
Do I need a separate CassetteAI account?
No. One SandBase API key and balance gives you access to CassetteAI Music Generator and the other models in the catalog; you do not need to sign up with CassetteAI separately.
