Build powerful music generation features into your applications with our REST API.
Generate your first track with a single API call.
curl -X POST https://api.fm9.ai/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "upbeat electronic dance music"}'{
"id": "gen_abc123",
"status": "processing",
"estimated_time": 30
}All API requests require an API key. Include your key in the Authorization header:
Get your API key from the developer dashboard.
Authorization: Bearer YOUR_API_KEY/v1/generateCreate a new music generation task.
prompt-Text description of the music to generate (required)duration-Track length in seconds (30-180, default: 60)style-Music style preset (optional)instrumental-Whether to generate instrumental only (default: false)Returns a generation object with task ID and status.
/v1/generation/:idCheck the status of a generation task.
Returns the generation object with current status and download URLs when complete.
/v1/generationsRetrieve a list of your generation history.
limit-Number of results to return (default: 20, max: 100)offset-Pagination offset (default: 0)status-Filter by status (pending, processing, completed, failed)Simple, transparent pricing based on usage.
10 generations/month
500 generations/month
Unlimited
To ensure fair usage and service stability, the following rate limits apply:
If you exceed the rate limit, you'll receive a 429 Too Many Requests response.
The API uses standard HTTP response codes to indicate success or failure.
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 402 | Payment Required - Insufficient credits |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Something went wrong on our end |
Our developer support team is here to help.
Email: [email protected]
Full documentation available at docs.fm9.ai