> ## 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 a 3 to 15 second sound effect from a text prompt with Stable Audio Open 1.0, at $0.001 per second of audio.

The SFX endpoint turns a text prompt into a sound effect. It runs **Stable Audio Open 1.0** (Stability AI) on ModelsLab GPUs and returns 44.1 kHz stereo audio.

| | |
| - | - |
| Model | Stable Audio Open 1.0, 80 diffusion steps |
| Price | \*\*$0.001 per second of audio**, $0.0047 minimum per effect (a 10-second effect costs $0.01). No per-effect charge on the $149/month Open Source Unlimited plan. |
| Length | 3 to 15 seconds, whole seconds only (default 8) |
| Formats | `mp3` (default), `wav`, `flac`; bitrate `128k`, `192k` or `320k` (default `320k`) |
| Speed | About 13 seconds of GPU time per effect when the queue is clear |
| Input | Text only |

<Note>
  For ElevenLabs Sound Effects on the same API key, use `POST https://modelslab.com/api/v7/voice/sound-generation` with `model_id: eleven_sound_effect` (\$0.06 per generation). Price comparisons with other sound effects APIs are on [modelslab.com/sound-effects-api-pricing](https://modelslab.com/sound-effects-api-pricing).
</Note>

## Request

Make a `POST` request to the endpoint below with the required parameters.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
POST https://modelslab.com/api/v6/voice/sfx
```

### Body

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "key": "your_api_key",
    "prompt": "Glass bottle shattering on a concrete floor",
    "duration": 5,
    "output_format": "mp3",
    "bitrate": "320k",
    "temp": false,
    "webhook": null,
    "track_id": null
}
```

## Response

When the GPU queue is clear, the request returns the finished file:

```json json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "status": "success",
    "generationTime": 13.3,
    "id": 4706825,
    "output": ["https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/<file>.mp3"],
    "proxy_links": ["https://cdn2.sdapi.co/generations/<file>.mp3"],
    "meta": { "prompt": "Glass bottle shattering on a concrete floor", "duration": 5, "output_format": "mp3", "bitrate": "320k" }
}
```

Otherwise the response has `status: "processing"`, an `eta` in seconds, a `fetch_result` URL and the `future_links` where the file will appear. Keep the `fetch_result` URL (fetch replies do not repeat it) and POST to it with your `key` (see [Fetch Voice](/voice-cloning/fetch-voice)) until `status` is `success`, `failed` or `error`, or pass a `webhook` to receive the result.


## OpenAPI

````yaml voice-cloning/openapi.json 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: >-
        Generates a 3 to 15 second sound effect from a text prompt with Stable
        Audio Open 1.0 (44.1 kHz stereo). Billed at $0.001 per second of audio
        with a $0.0047 minimum per effect.
      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: 8
          minimum: 3
          maximum: 15
          description: Length of the sound effect in whole seconds
        output_format:
          type: string
          enum:
            - mp3
            - wav
            - flac
          default: mp3
          description: Audio file format
        bitrate:
          type: string
          enum:
            - 128k
            - 192k
            - 320k
          default: 320k
          description: Audio bitrate
        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

````

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