MotionLab for developers
AI music and audio generation API
Generate music and use song tools through one action, with live model controls, per-operation pricing and multi-track results.
Pick an audio model and read its controls
All audio goes through one action, motionlab_generate_audio. Read result.models.audio from GET /api/v1/models and choose a modelId. Each entry lists its price in credits, its duration range and its controls. A model with a tools list offers several operations, such as new songs, remixes, lyrics and stems, each with its own price, required source and output kind.
Audio models fall into two request shapes. Models without tools take their music controls as top-level fields. A model with tools takes a nested suno object. Use the shape that matches the model you selected; a mismatched request fails validation.
Generate music from a prompt
For a model without tools, send a prompt and the controls it advertises. duration is in seconds and must fall inside the model's durationsSeconds range. Optional fields include genre, mood, instruments, bpm, musicalKey, structure, vocalMode (auto, instrumental or vocals), vocalStyle, language, lyrics and timeline. If the model reports supportsInspirationImage, you can pass an owned upload as inspirationImageKey.
POST /api/v1/actions/motionlab_generate_audio
{
"model": "AUDIO_MODEL_ID_FROM_DISCOVERY",
"prompt": "Warm analog synths, a gentle groove, a hopeful atmosphere",
"duration": 60,
"vocalMode": "instrumental",
"bpm": 96,
"idempotencyKey": "YOUR_SAVED_UNIQUE_REQUEST_ID"
}Use a model with tools
For a model with tools, put the settings inside suno. mode and instrumental are always required. operation selects the tool and defaults to generate. In idea mode you describe the song; in custom mode you supply a title plus at least one of style, lyrics or negativeTags. Each tool's entry in discovery lists the modes and controls it accepts.
POST /api/v1/actions/motionlab_generate_audio
{
"model": "TOOLS_MODEL_ID_FROM_DISCOVERY",
"prompt": "An upbeat summer song about a road trip",
"suno": {
"operation": "generate",
"mode": "idea",
"instrumental": false,
"style": "indie pop, bright guitars"
},
"idempotencyKey": "YOUR_SAVED_UNIQUE_REQUEST_ID"
}Tools that work on existing audio take suno.sources. A source is either an owned upload, { "kind": "upload", "url": "OWNED_UPLOAD_KEY" }, or a track from one of your completed jobs, { "kind": "job", "jobId": "JOB_ID", "trackIndex": 0 }. trackIndex starts at zero. The tool's source entry says how many sources it needs and which kinds it accepts. For tools that need no text, send prompt as an empty string.
Estimate and read the result
Call motionlab_estimate_cost with kind: audio and the model. For a model with tools, add sunoOperation to price that tool. One operation is one charge, even when it returns several versions.
POST /api/v1/actions/motionlab_estimate_cost
{
"kind": "audio",
"model": "TOOLS_MODEL_ID_FROM_DISCOVERY",
"sunoOperation": "generate"
}Poll motionlab_get_job with the returned jobId. A completed audio job has audioTracks, one entry per returned version with url, title and, where available, duration and lyrics. outputUrl holds the first track. Tools that return text or files, such as lyrics or exports, report them in sunoResult. Download every track you need before outputExpiresAt.
Upload audio sources with motionlab_create_upload as audio/wav or audio/mpeg, up to 50 MB. The API reference lists job statuses, error codes and limits.
Continue building
- AI generation API quickstart
Create an API key, discover models, estimate credits and submit your first image with Node.js and cURL.
- AI video generation API
Integrate text-to-video and image-to-video with model discovery, owned uploads, cost estimates and asynchronous results.
- AI image generation and editing API
Build image generation and reference-image editing with live model settings and fractional-credit pricing.
- Image-to-3D API
Turn one uploaded image into a textured GLB model: source image tips, cost estimate, job creation and download.
- AI image and video upscaling API
Upscale images and videos or double frame rate with live engines, source rules and measured pricing.
- fal.ai vs Higgsfield API: Pricing Compared Side by Side
fal.ai vs Higgsfield API prices for the same model and settings, with dated official sources. Plus authentication, polling, webhooks and migration steps.
- MotionLab API reference
Endpoints, actions, job statuses, error codes, rate limits, upload limits and the OpenAPI document for the MotionLab generation API.