# Generate from audio

> Suno v1 has its own task system, different from Suno v2: a submit returns a numeric taskId and results come from the v1 query endpoints; task IDs and result formats are not interchangeable between the two. For the OpenAI-style entry use /v1/audio/generations (model suno_v1).

**What**：Use a piece of your own audio as the opening and let the AI continue it into a full song.

**When**：Use it when you have a hummed tune, demo or recording and want a finished song. audioFilePath + fileExt point to the audio; continue_at says where to continue.

## Endpoints
- Submit task: POST `/api/cqt/suno/v1/generateFromAudioTask`
- Query the result (with the returned taskId): GET `/api/cqt/suno/v1/sunoInfo?taskId={taskId}`

> After submitting, poll with the taskId — every 5–10 seconds is enough, no need to hit it every second.

## Request params
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| gpt_description_prompt | string | Yes | Music description (should include Chinese/English text and symbols). |
| make_instrumental | boolean | — | Whether to generate an instrumental version (no vocals). |
| prompt | string | — | Main prompt / lyrics (put lyrics here in custom mode; an empty string is allowed, null is not). |
| tags | string | — | Style tags, comma-separated English words recommended, e.g. "pop, upbeat". |
| title | string | — | Song title. |
| model | string | — | Model version, e.g. suno_v45 / suno_v45_lite / suno_v40; suno_v35 is automatically changed to suno_v45_lite. Fill either this or modelVersion; if both are set, model wins. Credits are looked up by "endpoint:model", and an unconfigured value returns "积分规则未配置或禁用", so in practice you must send it. |
| modelVersion | string | — | Alias of model (compatibility spelling); only used when model is empty. |
| audioFilePath | string | — | Audio file path. Same field as audio_file_path in two spellings; fill either one. |
| audio_file_path | string | — | Audio file path (snake_case spelling). |
| fileExt | string | — | File extension, e.g. mp3. Same field as file_ext in two spellings. |
| file_ext | string | — | File extension (snake_case spelling). |
| continue_at | number | Yes | Second at which to continue (must be greater than 0, e.g. 12.0). |
| is_regenerate | boolean | — | Whether this is a regeneration. |
| stream | boolean | — | Whether to stream. |
| include_history | boolean | — | Whether to include history. |
| style_weight | number | — | How strongly to follow the style, range 0–1, two decimals, e.g. 0.65. |
| audio_weight | number | — | Audio-element weight, range 0–1, two decimals, e.g. 0.65. |
| weirdness_constraint | number | — | Creativity / weirdness, range 0–1, two decimals, e.g. 0.65. |
| vocal_gender | string | — | Vocal gender preference: m = male, f = female. |

## Request example
```bash
curl -X POST https://api.novapi.ai/api/cqt/suno/v1/generateFromAudioTask \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{"gpt_description_prompt":"turn this melody into a pop song","audioFilePath":"<AUDIO_FILE_PATH>","fileExt":"mp3","continue_at":12,"model":"suno_v45"}'
# -> { "code":200, "msg":"success", "data":{ "taskId":1234567890 } }
```

## Response example
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": 1234567890
  }
}
```

## Response fields
| Field | Type | Description |
| --- | --- | --- |
| code | number | Business code: 200 = success; see the error notes for the rest. The HTTP status is normally 200. |
| msg | string | Message: success on success, the reason on failure. |
| data.taskId | number | Task ID (a number). Use it with the query endpoint to fetch the result. |
