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

# Music Generation

> Generate music from text prompts

# Music Generation API

The Music Generation API allows you to create original music tracks from text prompts. Powered by advanced AI models, it can generate various musical styles, instrumentation, and moods.

<Frame>
  <img src="https://mintcdn.com/taamai-c8c27d6c/7tpU7wOp-rlopJuB/images/Taamcloud.png?fit=max&auto=format&n=7tpU7wOp-rlopJuB&q=85&s=4bb63ae407c3f5f72f8298b8c49064e4" alt="Music Generation" width="1200" height="630" data-path="images/Taamcloud.png" />
</Frame>

## Overview

Create AI-generated music by providing text prompts that describe the style, mood, and instrumentation you want. The API handles the request asynchronously:

1. Submit a generation request with your prompt
2. Receive a task ID for tracking
3. Check the status until completion
4. Download the generated music file

<Note>
  The OpenAPI playground above allows you to test music generation. Provide a detailed prompt describing the music you want to create.
</Note>

## Base URL

```
https://api.gately.ai/suno/submit/music
```

## Request Format

```bash theme={null}
curl --location 'https://api.gately.ai/suno/submit/music' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "prompt": "An upbeat electronic dance track with energetic synths and a catchy hook",
    "tags": "electronic, dance, upbeat",
    "title": "Dance Energy",
    "mv": "v5"
}'
```

### Parameters

<ParamField body="prompt" type="string" required>
  Detailed description of the music you want to generate
</ParamField>

<ParamField body="tags" type="string">
  Comma-separated list of genre tags
</ParamField>

<ParamField body="title" type="string">
  Title for the generated track
</ParamField>

<ParamField body="mv" type="string" default="v5">
  Model version to use
</ParamField>

## Response Format

```json theme={null}
{
  "status": "success",
  "data": {
    "task_id": "mus_bVDqJBrLStaPbCZXvLZrWqi4",
    "estimated_completion_time": 120
  }
}
```

<ResponseField name="task_id" type="string">
  Unique identifier for the generation task
</ResponseField>

<ResponseField name="estimated_completion_time" type="integer">
  Estimated time in seconds until completion
</ResponseField>

## Checking Generation Status

Once you have a `task_id`, you can check the status of the music generation:

```bash theme={null}
curl --location 'https://api.gately.ai/suno/music/status/mus_bVDqJBrLStaPbCZXvLZrWqi4' \
--header 'Authorization: Bearer YOUR_API_KEY'
```

### Status Response Format

```json theme={null}
{
  "status": "completed",
  "data": {
    "task_id": "mus_bVDqJBrLStaPbCZXvLZrWqi4",
    "audio_url": "https://storage.taam.cloud/music/mus_bVDqJBrLStaPbCZXvLZrWqi4.mp3",
    "cover_image": "https://storage.taam.cloud/music/covers/mus_bVDqJBrLStaPbCZXvLZrWqi4.jpg"
  }
}
```

Status codes:

* `queued`: Task is in the queue
* `processing`: Music is being generated
* `completed`: Generation is complete
* `failed`: Generation failed

## Prompt Tips

<AccordionGroup>
  <Accordion title="Musical Style Guidance" icon="music">
    Include specific genres, eras, or artists: "A jazz fusion track inspired by Weather Report with complex chord progressions"
  </Accordion>

  <Accordion title="Instrumentation" icon="guitar">
    Specify instruments: "An orchestral piece featuring prominent French horns, violins, and timpani"
  </Accordion>

  <Accordion title="Mood and Energy" icon="face-smile">
    Describe the feeling: "A melancholic piano ballad with emotional chord progressions"
  </Accordion>

  <Accordion title="Structure" icon="layer-group">
    Detail song structure: "A pop track with verse-chorus structure, building to an energetic bridge"
  </Accordion>
</AccordionGroup>

## Example Prompts

<CodeGroup>
  ```json Electronic theme={null}
  {
    "prompt": "A futuristic electronic track with glitchy beats, atmospheric pads, and a driving bassline that evolves throughout",
    "tags": "electronic, ambient, glitch",
    "title": "Digital Horizon"
  }
  ```

  ```json Orchestral  theme={null}
  {
    "prompt": "An epic orchestral piece with soaring strings, powerful brass hits, and dramatic percussion building to a cinematic climax",
    "tags": "orchestral, epic, cinematic",
    "title": "Hero's Journey"
  }
  ```

  ```json Folk theme={null}
  {
    "prompt": "A folk acoustic guitar ballad with finger-picking patterns, warm vocals, and subtle background harmonies",
    "tags": "folk, acoustic, vocal",
    "title": "Mountain Path"
  }
  ```
</CodeGroup>

## Limitations

* Generated tracks are typically 1-2 minutes in length
* Specific artist names should be used as inspiration only, not direct copying
* Vocals are generated in a fictional language
* Maximum of 50 active generations per account at once

```
```


## OpenAPI

````yaml POST /suno/submit/music
openapi: 3.0.1
info:
  title: TaamCloud API
  description: >-
    A collection of AI services including chat, embeddings, reranking, and media
    generation
  version: 1.0.0
servers:
  - url: https://api.gately.ai
    description: Main API server
  - url: https://uploud.taam.cloud
    description: File Processing server
security:
  - bearerAuth: []
paths:
  /suno/submit/music:
    post:
      tags:
        - Music
      summary: Generate music
      description: Create AI-generated music based on text prompts
      operationId: music
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MusicGenerationRequest'
            examples:
              Simple:
                value:
                  prompt: A relaxing jazz piano piece with soft drums
                  title: Relaxing Jazz
                  tags: jazz, relaxing, piano
      responses:
        '200':
          description: Successful response
components:
  schemas:
    MusicGenerationRequest:
      type: object
      properties:
        prompt:
          type: string
        tags:
          type: string
        mv:
          type: string
        title:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Enter your API key prefixed with 'Bearer '

````