Media & Music
Use this section for asset-generation workflows that do not behave like ordinary chat completions, especially AI Music tasks.
Use this section for asset-generation workflows that do not behave like ordinary chat completions, especially AI Music tasks.
Start here
| Task | Page | Outcome |
|---|---|---|
| Understand when to use music-specific workflows | Overview | Decide whether your workload is chat, media generation, or AI Music |
| Create songs, lyrics, styles, or cover art | Music Generation | Submit generation requests with the right prompt, model, and callback choices |
| Transform existing audio, create personas, or export WAV/MV | Music Transform | Reuse existing audio or completed tracks in follow-up workflows |
| Poll tasks and process callbacks | Music Tasks and Webhooks | Track async jobs until final assets are ready |
| Review common workflow patterns | Music Use Cases | Choose a route sequence for common product experiences |
API contracts
Use AI Music API for exact Suno-compatible route contracts. Use Media API for DashScope image and generic video routes.
How media and music differ from chat
| Difference | What to design for |
|---|---|
| Async task lifecycle | Store task IDs and poll or process callbacks until success or failure |
| Large generated assets | Store output URLs and metadata separately from chat messages |
| User-visible wait time | Show pending, processing, succeeded, and failed states in your UI |
| Retries | Make retry behavior idempotent enough to avoid duplicate paid jobs when possible |
| Rights and review | Decide how your product handles uploaded audio, generated tracks, and user-facing moderation |
Recommended workflow shape
- Create the task with a safe placeholder callback URL or a production HTTPS callback endpoint.
- Store the returned task ID with the user, project, prompt, and selected model.
- Poll the documented query route or accept webhook callbacks.
- Mark the asset ready only after the task status is successful and output URLs are present.
- Keep the original request payload and final metadata for customer support and retry analysis, without logging private API keys.
Choose the right API family
| Output | Start with |
|---|---|
| Text-only lyrics, descriptions, or planning prompts | OpenAI-compatible or another text API family |
| Image generation or prompt-driven video | Media API and Video Generation |
| Full song, cover, stem, persona, WAV, or music video workflow | AI Music API |
| Mixed product workflows | Keep text, media, and music tasks as separate route calls with separate error handling |
Production checks
Before launch, verify task creation, polling, callback reachability, duplicate callback handling, failed-task UI, output URL storage, and user-facing error messages for quota or policy failures.