Generate AI music based on text prompts using various models. The API supports two modes: Inspiration Mode and Custom Mode. In Inspiration Mode, Suno will automatically generate lyrics, title, and style tags based on your description.
Authentication is required for all API requests. Include your API key in the request headers:
URL: POST https://aimusicapi.org/api/submit
Content-Type: application/json
In this mode, you only need to provide a description prompt, and Suno will automatically generate lyrics, title, and style tags.
In this mode, you have full control over the song details by providing specific parameters.
Parameter | Type | Required | Description |
---|---|---|---|
gpt_description_prompt | string | Yes | Description of the music you want to generate |
make_instrumental | boolean | No | Generate instrumental version |
model | string | Yes | Model version (default: "chirp-v3-5") |
Parameter | Type | Required | Description |
---|---|---|---|
prompt | string | Yes | Text prompt describing the music you want to generate |
title | string | Yes | Title of the music |
tags | string | Yes | Style tags for the music |
make_instrumental | boolean | No | Generate instrumental version |
model | string | Yes | Model version (default: "chirp-v3-5") |
A successful response will return a JSON object with the following structure:
Field | Type | Description |
---|---|---|
code | number | HTTP status code |
message | string | Response message |
workId | string | Unique identifier for the generation task. Use this ID with the feed API to check generation status |
Code | Description |
---|---|
400 | Invalid request / No body provided |
401 | Invalid API key / No API key provided in Authorization header |
402 | Not enough credits |
500 | Internal Server Error |
The workId
returned in the response can be used with the feed API to check the status of your generation request and retrieve the final results.
URL: GET https://aimusicapi.org/api/query?workId={workId}
Query Parameter: workId
A successful response will return a JSON object with the following structure:
Field | Type | Description |
---|---|---|
code | number | HTTP status code |
message | string | Response message |
data.type | string | Result type ("SUCCESS", "IN_PROGRESS", etc.) |
data.request_body | object | Original generation request parameters |
data.response_data | array | Array of generated results |
data.created_at | string | Timestamp of the generation request |
Field | Type | Description |
---|---|---|
audio_url | string | URL to the generated audio file (MP3) |
image_url | string | URL to the generated cover image |
image_large_url | string | URL to the high-resolution cover image |
video_url | string | URL to the generated music video |
created_at | string | Timestamp of the result creation |
status | string | Status of the generation ("complete", "pending", etc.) |
title | string | Title of the generated music |
prompt | string | Original prompt used for generation |
tags | string | Style tags of the generated music |