API v1

FM9 API Documentation

Build powerful music generation features into your applications with our REST API.

Quick Start

Generate your first track with a single API call.

Requestbash
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"}'
Responsejson
{
  "id": "gen_abc123",
  "status": "processing",
  "estimated_time": 30
}

Authentication

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

Endpoints

POST/v1/generate

Generate Music

Create a new music generation task.

Parameters

  • 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.

GET/v1/generation/:id

Get Generation Status

Check the status of a generation task.

Returns the generation object with current status and download URLs when complete.

GET/v1/generations

List Generations

Retrieve a list of your generation history.

Parameters

  • limit-Number of results to return (default: 20, max: 100)
  • offset-Pagination offset (default: 0)
  • status-Filter by status (pending, processing, completed, failed)

API Pricing

Simple, transparent pricing based on usage.

Starter

Free

10 generations/month

  • Basic API access
  • Standard quality
  • Community support

Developer

$49/mo

500 generations/month

  • Full API access
  • High quality output
  • Priority support
  • Webhook callbacks

Enterprise

Custom

Unlimited

  • Dedicated infrastructure
  • Custom models
  • SLA guarantee
  • 24/7 support

Rate Limits

To ensure fair usage and service stability, the following rate limits apply:

  • Starter: 10 requests/minute
  • Developer: 60 requests/minute
  • Enterprise: Custom limits

If you exceed the rate limit, you'll receive a 429 Too Many Requests response.

Error Codes

The API uses standard HTTP response codes to indicate success or failure.

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
402Payment Required - Insufficient credits
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on our end

Need Help?

Our developer support team is here to help.

Email: [email protected]

Full documentation available at docs.fm9.ai