# AI music API for ACE-Step 1.5

Send a recipe to the REST API with an API key and get songs back: the same models, settings, prices and refunds as the workbench. The body takes our recipe card or acestep-api fields, so code written for a self-hosted server moves over with few changes.

[Open the workbench](https://ace-step.xyz/ace-step-api#studio)

## How to call the AI music API

1. **Create an API key**: Open Settings → API keys and create a key. Send it as "Authorization: Bearer sk_…"; it spends this account's credits.
2. **POST a recipe**: POST /api/v1/songs with a recipe. The answer is 202 with the takes and their ids; credits are taken when the job starts.
3. **Poll and download**: GET /api/v1/songs/:id until the status is done, then fetch audio_url. A failed take is refunded automatically.

## Endpoints

Every endpoint takes the same API key. JSON in, JSON out, snake_case fields.

- `POST /api/v1/songs`: Start a job of 1 take, or up to 4 on the top plan
- `GET /api/v1/songs`: Your latest takes, newest first
- `GET /api/v1/songs/{id}`: One take: status, recipe, seed and audio_url
- `GET /api/song/audio/{id}?download=1`: The MP3 of a finished take
- `POST /mcp`: The MCP server, for Claude, ChatGPT, Cursor and other clients

## Example: one song, then poll

Set your key in ACE_KEY. The recipe below is the same JSON a recipe card copies.

```
curl -X POST https://ace-step.xyz/api/v1/songs -H "Authorization: Bearer sk_..." -H "Content-Type: application/json" -d '{"recipe":{"model":"ace15","caption":"upbeat indie pop, jangly guitar","instrumental":true,"seconds":60,"bpm":124,"key":"G major","meter":"4","seed":1234},"takes":1}'
```

Recipes carry "schema": "ace-step.xyz/recipe@1". You may also send acestep-api fields (prompt, lyrics, duration, bpm, key_scale, time_signature, seed) as the whole body. "takes" runs from 1 to 4.

## Rules of the API

The API follows the workbench rules exactly.

- **Keys are per account**: A key spends its account's credits. Delete a key in Settings and it stops working at once.
- **Lyrics must be yours**: When the recipe has lyrics, send "own_words": true to confirm they are yours to use. Captions that name an artist are refused.
- **Poll, do not hammer**: Songs usually take 1 to 5 minutes. Poll a few seconds apart, not in a tight loop; too many requests get a 429.
- **MCP uses the same key**: Clients that cannot sign in with OAuth can send the API key to the MCP server instead.
- **Several takes need the top plan**: "takes" above 1 answers 403 pro_required unless the account is on the top plan. A re-run with one change is always 1 take.
- **Errors in plain words**: Errors carry a message and a code: 401 bad key, 402 insufficient_credits, 403 pro_required, 422 for a refused caption, 429 for too many requests.

## The models and what a take costs

All three are open-weight models by ACE Studio & StepFun. A failed take is refunded.

- **ACE-Step 1.5** (ACE Studio & StepFun): 10–240 s, 131 credits a take, MIT
- **ACE-Step 1.5 Long** (ACE Studio & StepFun): 241–600 s, 251 credits a take, MIT
- **ACE-Step v1 Draft** (ACE Studio & StepFun): 10–240 s, 81 credits a take, Apache-2.0

Not offered here: Suno V5, MiniMax Music 2.5, Lyria 3 Pro. They show in the model picker as labels only.

## Questions and answers

### Is there a free AI music API?

The ACE-Step code includes a self-hosted API server you can run free on your own GPU. This hosted API uses credits: 131 per ACE-Step 1.5 take, and the 131 sign-up credits work here too.

### Is this the official ACE-Step API?

No. It is our own hosted API, independent and not affiliated with ACE Studio or StepFun. It accepts acestep-api field names so existing code is easy to point here.

### Which plans can use the API?

Every account, including the free credits. Jobs of several takes need the top plan; single takes and re-runs work on every plan.

### Are there webhooks?

Not yet. Poll GET /api/v1/songs/:id; most takes finish within a few minutes.

### Can I use the songs from the API commercially?

Yes, under the same Terms as the workbench: your lyrics must be your own, and captions must not imitate an artist.

### Can I use the API from an AI assistant instead?

Yes. The MCP server gives Claude, ChatGPT, Cursor and VS Code tools to generate songs, re-run them with one change and fetch the audio.

[Credit prices and plans](https://ace-step.xyz/pricing)

---

Source: https://ace-step.xyz/ace-step-api · Site index for AI agents: https://ace-step.xyz/llms.txt · Full content: https://ace-step.xyz/llms-full.txt
