创建音乐任务(异步)
返回的是 job,不是音频。用 GET /v1/jobs/{id} 轮询,直到 status 变成 completed,再从结果里读成品 URL。
生成通常在一分钟以内。返回的成品 URL 在整个保留期内有效 —— 需要时重新读一次 job 拿新链接,不要把 URL 本身缓存下来。
Authorization
bearerAuth 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}