> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mountsea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Schema

> Get the required and optional fields for each generate task type

This endpoint helps you understand what parameters are required or optional for each task type when using the [Generate](/api-reference/suno/generate) endpoint.

<Tip>
  **Recommended Workflow**: Before calling `/generate`, first call this endpoint with your desired task type to understand exactly which fields to include in your request.
</Tip>

## Query Parameters

<ParamField query="task" type="string">
  The task type to get schema for. If not provided, returns schemas for all tasks.

  | Value               | Description                                   |
  | ------------------- | --------------------------------------------- |
  | `create`            | Create new music from scratch                 |
  | `extend`            | Extend existing music                         |
  | `upload_extend`     | Extend uploaded audio                         |
  | `upload_cover`      | Cover uploaded audio                          |
  | `cover`             | Create cover of existing clip                 |
  | `use_styles_lyrics` | Use styles from existing clip with new lyrics |
  | `replace_section`   | Replace a section of existing audio           |
  | `add_instrumental`  | Add instrumental to audio                     |
  | `add_vocals`        | Add vocals to audio                           |
  | `gen_stem_two`      | Generate two-track stems                      |
  | `gen_stem_all`      | Generate all stems                            |
  | `mashup`            | Mashup two songs                              |
  | `sample`            | Sample from existing clip                     |
  | `inspiration`       | Generate from inspiration playlist            |
  | `sound`             | Generate sound effects                        |
</ParamField>

## Response

Returns an array of task schema objects containing:

<ResponseField name="task" type="string">
  The task type identifier.
</ResponseField>

<ResponseField name="description" type="string">
  Human-readable description of the task.
</ResponseField>

<ResponseField name="required" type="array">
  List of required fields with their descriptions, types, and examples.
</ResponseField>

<ResponseField name="optional" type="array">
  List of optional fields with their descriptions, types, and examples.
</ResponseField>

<ResponseField name="notAllowed" type="array">
  List of fields that will be ignored for this task type.
</ResponseField>

<ResponseField name="example" type="object">
  A complete request example for this specific task.
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL (Get all schemas) theme={null}
  curl -X GET "https://api.mountsea.ai/suno/v2/generate/schema" \
    -H "Authorization: Bearer your-api-key"
  ```

  ```bash cURL (Get specific task schema) theme={null}
  curl -X GET "https://api.mountsea.ai/suno/v2/generate/schema?task=extend" \
    -H "Authorization: Bearer your-api-key"
  ```

  ```javascript Node.js theme={null}
  // Get schema for extend task
  const response = await fetch('https://api.mountsea.ai/suno/v2/generate/schema?task=extend', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer your-api-key'
    }
  });

  const schemas = await response.json();
  console.log(schemas);
  ```

  ```python Python theme={null}
  import requests

  # Get schema for create task
  response = requests.get(
      'https://api.mountsea.ai/suno/v2/generate/schema',
      params={'task': 'create'},
      headers={'Authorization': 'Bearer your-api-key'}
  )

  schemas = response.json()
  print(schemas)
  ```
</CodeGroup>

## Response Example

```json theme={null}
[
  {
    "task": "extend",
    "description": "Extend existing music",
    "required": [
      {
        "field": "clip_id",
        "description": "Source clip ID",
        "example": "clip_abc123",
        "type": "string"
      }
    ],
    "optional": [
      {
        "field": "continue_at",
        "description": "Continue position in seconds",
        "example": 30,
        "type": "number"
      },
      {
        "field": "tags",
        "description": "Style tags",
        "example": "Pop, Happy",
        "type": "string"
      },
      {
        "field": "prompt",
        "description": "Lyrics or prompt text",
        "example": "[Verse]\nHello world...",
        "type": "string"
      }
    ],
    "notAllowed": [
      "range",
      "audio_url"
    ],
    "example": {
      "task": "extend",
      "model": "chirp-v55",
      "clip_id": "clip_abc123",
      "continue_at": 30,
      "tags": "Pop, Happy"
    }
  }
]
```

## Task Types Overview

| Task                | Description                 | Key Required Fields                                                               |
| ------------------- | --------------------------- | --------------------------------------------------------------------------------- |
| `create`            | Create new music            | `model`                                                                           |
| `extend`            | Extend existing clip        | `clip_id`, `model`                                                                |
| `upload_extend`     | Extend uploaded audio       | `audio_url`, `model`                                                              |
| `upload_cover`      | Cover uploaded audio        | `audio_url`, `model`                                                              |
| `cover`             | Cover existing clip         | `clip_id`, `model`                                                                |
| `use_styles_lyrics` | Use styles with new lyrics  | `clip_id`, `model`                                                                |
| `replace_section`   | Replace audio section       | `clip_id`, `range`, `infill_context_range`, `continued_aligned_prompt`, `model`   |
| `add_instrumental`  | Add instrumental            | `clip_id`, `range`, `model`                                                       |
| `add_vocals`        | Add vocals                  | `clip_id`, `range`, `model`                                                       |
| `gen_stem_two`      | Two-track stems             | `clip_id`, `model`                                                                |
| `gen_stem_all`      | All stems                   | `clip_id`, `model`                                                                |
| `mashup`            | Mashup two songs            | `mashup_clip_ids`, `model`                                                        |
| `sample`            | Sample from existing clip   | `clip_id`, `range`, `model`                                                       |
| `inspiration`       | Generate from real playlist | `playlist_id`, `model` — see [Inspiration Guide](/api-reference/suno/inspiration) |
| `sound`             | Generate sound effects      | `sound`, `model`                                                                  |

<Info>
  All tasks require `task` and `model` fields. Use this endpoint to get the complete list of required and optional fields for each specific task type.
</Info>
