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

# Sound Effects (SFX)

> Generate lifelike Sound effects using text prompts.

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body.

```curl curl  theme={null}
--request POST 'https://modelslab.com/api/v6/voice/sfx' \
```

## Body

```json json theme={null}
{    
    "key":"",
    "prompt":"Thunderstorm with rain",
    "duration": 10,
    "temp": false,    
    "webhook": null,    
    "track_id": null
}
```


## OpenAPI

````yaml POST /voice/sfx
openapi: 3.1.0
info:
  title: ModelsLab Voice API
  description: >-
    A comprehensive API for AI-driven voice and audio generation including
    text-to-speech, voice cloning, music generation, and audio processing
    capabilities
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
security: []
paths:
  /voice/sfx:
    post:
      summary: Generate sound effects from text
      description: Creates sound effects from text prompts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SFXRequest'
      responses:
        '200':
          description: Sound effects generation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SFXRequest:
      type: object
      required:
        - key
        - prompt
      properties:
        key:
          type: string
          description: API key required to authorize the request
        prompt:
          type: string
          description: Descriptive input specifying the type of sound effect to generate
        duration:
          type: integer
          default: 10
          minimum: 3
          maximum: 15
          description: Length of generated sound effect in seconds
        temp:
          type: boolean
          default: false
          description: Use temporary links for regions blocking storage access
        webhook:
          type: string
          format: uri
          description: URL to receive POST notification upon completion
        track_id:
          type: integer
          description: ID for webhook identification
    VoiceResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - processing
            - error
          description: Status of the voice generation
        generationTime:
          type: number
          description: Time taken to generate the audio in seconds
        id:
          type: integer
          description: Unique identifier for the voice generation
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated audio URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy audio URLs
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future audio URLs for queued requests
        links:
          type: array
          items:
            type: string
            format: uri
          description: Array of audio URLs (voice cover response)
        meta:
          type: object
          description: Metadata about the audio generation including all parameters used
        eta:
          type: integer
          description: Estimated time for completion in seconds (processing status)
        message:
          type: string
          description: Status message or additional information
        tip:
          type: string
          description: Additional information or tips for the user
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when processing
        audio_time:
          type: number
          description: Duration of the generated audio in seconds
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message description

````