Get API Key Get API
Docs

Generate music

- Generate a song from a prompt: `custom=false` is inspiration mode (`prompt` used as an inspiration prompt), `=true` is custom mode (`prompt` used as lyrics).

  • Async task: submitting returns a task_id; poll GET /v1/music/tasks/:task_id for the result
Warning

custom controls how text fields are interpreted. With custom=true (custom mode), prompt contains lyrics, and title, style, negative_tags, auto_lyrics, and persona_id apply. With custom=false (inspiration mode), prompt contains an inspiration description and those custom-mode fields are ignored. style_weight, weirdness_constraint, audio_weight, and vocal_gender are validated and applied in both modes.

Note

This endpoint has slightly different field names: style is used, instead of tags.

Request example

curl -X POST https://api.openveer.com/v1/music/generations \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  --data '{
    "model": "suno",
    "custom": false,
    "version": "v6",
    "prompt": "Late-night city lo-fi piano with the sound of rain"
  }'

Response example

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Authorizations

Authorization string

All endpoints require authentication using a Bearer Token

Get an API Key:

Visit the API Key management page to get your API Key

Add the following to the request headers when using it:

Authorization: Bearer YOUR_API_KEY

Body

model string

Audio model. Currently pass suno (defaults to suno if omitted).

custom boolean

false=inspiration mode; true=custom mode (prompt used as lyrics). Defaults to false.

instrumental boolean

true=instrumental only, no vocals. Defaults to false.

version string

Public version: v6 / v6-wild / v6-mini. At least one must be provided with custom_model_id; omit this field when using a custom model.

custom_model_id string

The complete UUID of the created custom model task. Mutually exclusive with version and persona_id; this field is provided to be charged based on the price tier of the custom model.

prompt string

inspiration prompt / lyrics. custom=false must be filled and no more than 3000 characters; custom=true and instrumental=false must be filled and no more than 5000 characters; custom pure music can be omitted.

title string

Title for custom mode, up to 80 characters. Ignored when custom=false (inspiration mode).

style string

Style tag (custom mode), no more than 1000 characters. Ignored when custom=false (inspiration mode).

negative_tags string

Negative style tags (styles you don't want). Only takes effect when custom=true.

auto_lyrics boolean

true=rewrite the provided lyrics creatively. Only takes effect when custom=true.

persona_id string

Persona Style ID. Only applies when custom=true is used and mutually exclusive with custom_model_id.

vocal_gender string

Vocal gender: Male / Female (m / f / male / female are also accepted and normalized by the backend). Works in both modes.

style_weight number

Style weight, 0.00–1.00. Validated and effective in both modes.

weirdness_constraint number

creative score, 0.00–1.00. Both modes will validate and take effect.

audio_weight number

Audio weight, 0.00–1.00. Validated and effective in both modes.

variety string

Style variation: off / normal / high / extra / max. Optional; there is no fixed default.

max_mode boolean

Whether to enable Max mode. Enable it requires custom=true and charges at twice the normal price.

audio_format string

Output audio format: mp3 / m4a / wav. If omitted, the service chooses the default.

duration integer

target generation duration, range 10-360 seconds. Only available when set as custom=true; actual finished product duration will be based on task results.

Note

Get Result: This is an asynchronous task. After submission, you will receive task_id and then poll GET /v1/music/tasks/{task_id} every 3–5 seconds until status becomes completed or failed (music generation usually takes 30–120 seconds; while generation is in progress, status may be pending or processing, and progress is an integer from 0 to 100 and is not guaranteed to change at fixed intervals). Once completed, read audio_url from data.result.music[] (there are also image_url / video_url / title / duration etc.). In case of failure, data.error.message provides the reason and the deducted amount will be automatically refunded.

Response

code integer

Response status code

data array
Returned data array
status string

Task status

  * submitted - Submitted
task_id string

Unique task identifier (used to poll GET /v1/music/tasks/{task_id} for the result)

This documentation is built and hosted on Mintlify, a developer documentation platform.