RouteMux Docs
Api referenceMusic

Generate music (asynchronous)

POST
/v1/music/generations

Returns a job, not audio. Poll GET /v1/jobs/{id} until status is completed, then read the artifact URL from the result.

Generation typically takes under a minute. The returned artifact URL stays valid for the full retention window — re-read the job to get a fresh link rather than caching the URL itself.

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <your RouteMux API key>.

Create keys at https://routemux.com/console/keys. New keys use the sk- prefix; the legacy rmx_live_ prefix is still accepted.

The Anthropic SDK's x-api-key and the Google SDK's x-goog-api-key are accepted too. Sending several key headers with different values returns 400 AUTH_AMBIGUOUS_API_KEY.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request and response bodies match the upstream provider's official format verbatim — RouteMux passes them through untouched. See the provider's own docs for field definitions; the gateway itself only reads model and stream.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/music/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "minimax/music-3.0",    "prompt": "dreamy synthwave, slow build",    "lyrics": "[verse]\\nneon rain on empty streets\\n[chorus]\\nwe drive till morning"  }'
{  "model": "string",  "stream": true}