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

# संगीत बनाएँ

> एक प्रदाता-स्वतंत्र endpoint के माध्यम से संगीत बनाता है। Phaseo सिंक्रोनस प्रदाताओं के पूरा होने तक प्रतीक्षा करता है और उनकी कतारों की जाँच को आंतरिक रूप से संभालता है।

एक प्रदाता-स्वतंत्र API के ज़रिए संगीत बनाएँ। Phaseo सिंक्रोनस प्रतिक्रियाओं और प्रदाता कतार की जाँच को पर्दे के पीछे संभालता है।

जनरेशन पूरा होने पर प्रतिक्रिया में `audio_url` या `audio_base64` शामिल होता है। यदि प्रदाता ऐसा जॉब लौटाता है जो अभी पूरा नहीं हुआ है, तो उसी प्रतिक्रिया के `id` के साथ `GET /music/generate/{music_id}` उपयोग करें।

## अनुरोध का स्वरूप

```json theme={null}
{
  "model": "minimax/music-3.0:free",
  "prompt": "Warm jazz trio with brushed drums",
  "format": "mp3"
}
```

## Suno विकल्प

* `suno.customMode` (बूलियन, डिफ़ॉल्ट `false`)
* `suno.instrumental` (बूलियन, डिफ़ॉल्ट `false`)
* `suno.prompt` (शीर्ष-स्तरीय `prompt` का वैकल्पिक ओवरराइड)
* `suno.style`, `suno.title` (`customMode = true` होने पर आवश्यक)
* `suno.personaId`, `suno.personaModel`
* `suno.negativeTags`, `suno.vocalGender`
* `suno.styleWeight`, `suno.weirdnessConstraint`, `suno.audioWeight`

## मान्यकरण नियम

* `customMode = false` होने पर `prompt` आवश्यक है।
* `customMode = true` होने पर `style` और `title` दोनों आवश्यक हैं।
* `customMode = true` और `instrumental = false` होने पर `prompt` आवश्यक है।

मान्यकरण त्रुटियाँ `400` के साथ यह लौटाती हैं:

```json theme={null}
{
  "error": "validation_error",
  "reason": "..."
}
```

## जवाब

```json theme={null}
{
  "id": "req_01JY6MUSIC123",
  "object": "music",
  "status": "completed",
  "provider": "gmicloud",
  "model": "minimax/music-3.0:free",
  "nativeResponseId": "5c30b275-d669-4a25-8151-de6d60214853",
  "audio_url": "https://.../generated-music.mp3",
  "usage": {
    "requests": 1,
    "output_audio_seconds": 25.364
  }
}
```

* `id` Phaseo का स्थिर अनुरोध ID है। अनुरोध प्राप्त करने के लिए `GET /music/generate/{music_id}` का उपयोग करें।
* `nativeResponseId` upstream provider का पहचानकर्ता है और provider से अनुरोध मिलान तथा सहायता पाने के लिए उपयोग होता है।
* `status` `queued`, `in_progress`, `completed` या `failed` हो सकता है।
* `usage` में `output_audio_seconds` शामिल हो सकता है, जब provider जनरेट की गई अवधि बताता है।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml POST /music/generate
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /music/generate:
    post:
      tags:
        - Gateway
      summary: संगीत बनाएँ
      description: >-
        एक प्रदाता-स्वतंत्र endpoint के माध्यम से संगीत बनाता है। Phaseo
        सिंक्रोनस प्रदाताओं के पूरा होने तक प्रतीक्षा करता है और उनकी कतारों की
        जाँच को आंतरिक रूप से संभालता है।
      operationId: generateMusic
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MusicGenerateRequest'
      responses:
        '200':
          description: संगीत निर्माण प्रतिक्रिया
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MusicGenerateResponse'
components:
  schemas:
    MusicGenerateRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
        prompt:
          type: string
        duration:
          type: integer
        format:
          type: string
          enum:
            - mp3
            - wav
            - ogg
            - aac
        provider:
          $ref: '#/components/schemas/ProviderRoutingOptions'
        suno:
          type: object
          properties:
            prompt:
              type: string
            style:
              type: string
            title:
              type: string
            customMode:
              type: boolean
            instrumental:
              type: boolean
            personaId:
              type: string
            model:
              type: string
            negativeTags:
              type: string
            vocalGender:
              type: string
              enum:
                - m
                - f
            styleWeight:
              type: number
              minimum: 0
              maximum: 1
            weirdnessConstraint:
              type: number
              minimum: 0
              maximum: 1
            audioWeight:
              type: number
              minimum: 0
              maximum: 1
            callBackUrl:
              type: string
              format: uri
        elevenlabs:
          type: object
          properties:
            prompt:
              type: string
            composition_plan:
              type: object
            music_length_ms:
              type: integer
            model_id:
              type: string
            force_instrumental:
              type: boolean
            store_for_inpainting:
              type: boolean
            with_timestamps:
              type: boolean
            sign_with_c2pa:
              type: boolean
            output_format:
              type: string
        echo_upstream_request:
          type: boolean
        debug:
          $ref: '#/components/schemas/DebugOptions'
    MusicGenerateResponse:
      type: object
      required:
        - id
        - object
        - status
        - model
        - provider
      properties:
        id:
          type: string
          description: >-
            स्थिर Phaseo अनुरोध ID, जिसका उपयोग GET /music/generate/{music_id}
            के साथ किया जाता है।
        object:
          type: string
          enum:
            - music
        status:
          type: string
          enum:
            - queued
            - in_progress
            - completed
            - failed
        model:
          type: string
        provider:
          type: string
        nativeResponseId:
          type: string
          nullable: true
          description: सहसंबंध और सहायता के लिए upstream प्रदाता पहचानकर्ता।
        audio_url:
          type: string
          format: uri
        audio_base64:
          type: string
        result:
          description: Phaseo द्वारा सामान्यीकृत प्रदाता परिणाम मेटाडेटा।
        output:
          type: array
          items:
            type: object
            additionalProperties: true
        usage:
          type: object
          additionalProperties: true
      additionalProperties: true
    ProviderRoutingOptions:
      type: object
      description: गेटवे चयन के लिए प्रदाता रूटिंग प्राथमिकताएँ।
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: रूटिंग में alpha प्रदाताओं को शामिल करें (डिफ़ॉल्ट रूप से बंद)।
        allow_fallbacks:
          type: boolean
          nullable: true
          description: विफलता के बाद किसी अन्य योग्य प्रदाता पर fallback की अनुमति दें।
        require_parameters:
          type: boolean
          nullable: true
          description: >-
            रूटिंग से पहले अनुरोधित पैरामीटरों के लिए प्रदाता का समर्थन आवश्यक
            करें।
        required_execution_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित execution region वाले प्रदाताओं तक सीमित करें।
        required_data_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित data region वाले प्रदाताओं तक सीमित करें।
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            रूटिंग को उन प्रदाताओं तक सीमित करें जो शून्य डेटा प्रतिधारण का
            समर्थन करते हैं।
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            इस अनुरोध के लिए प्रदाताओं को क्रम दें, जैसे कीमत, विलंबता या
            थ्रूपुट के आधार पर।
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
    DebugOptions:
      type: object
      description: गेटवे डिबग नियंत्रण। ये फ़्लैग कभी भी प्रदाता को फ़ॉरवर्ड नहीं किए जाते।
      properties:
        enabled:
          type: boolean
        return_upstream_request:
          type: boolean
        return_upstream_response:
          type: boolean
        trace:
          type: boolean
        trace_level:
          type: string
          enum:
            - summary
            - full
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.