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

# Generate Sound Effect

> Generate AI sound effects from a text description using ElevenLabs. Returns the audio URL immediately (synchronous).

Usage is counted against your plan's character limit.



## OpenAPI

````yaml POST /api/generate-sound
openapi: 3.0.1
info:
  title: Easy-Peasy.AI API
  description: >-
    OpenAPI Specifications for the Easy-Peasy.AI API.


    All API requests must be authenticated with an API key. Include the
    `x-api-key` API key in the request header with all requests. You can get the
    API key [here](https://easy-peasy.ai/settings/api).
  version: 1.0.4
servers:
  - url: https://easy-peasy.ai
security:
  - apiKeyAuth: []
paths:
  /api/generate-sound:
    post:
      summary: Generate Sound Effect
      description: >-
        Generate AI sound effects from a text description using ElevenLabs.
        Returns the audio URL immediately (synchronous).


        Usage is counted against your plan's character limit.
      operationId: generateSoundEffect
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: Your API key
          example: 27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateSoundRequest'
            examples:
              short_effect:
                summary: Short sound effect
                value:
                  prompt: A door creaking open slowly in a haunted house
                  duration: 3
              ambient:
                summary: Ambient sound
                value:
                  prompt: Rain falling on a tin roof with distant thunder
                  duration: 10
                  prompt_influence: 0.5
      responses:
        '200':
          description: Sound effect generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateSoundResponse'
              example:
                url: https://media.easy-peasy.ai/tts/user-id/abc123.mp3
                text: A door creaking open slowly in a haunted house
                seconds: 3
                status: completed
        '400':
          description: Bad request — missing prompt or plan limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Missing parameter prompt
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid API key
components:
  schemas:
    GenerateSoundRequest:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: Text description of the sound effect to generate.
          example: A door creaking open slowly in a haunted house
        duration:
          type: number
          default: 5
          description: Duration of the sound effect in seconds.
          example: 5
        prompt_influence:
          type: number
          default: 0.3
          minimum: 0
          maximum: 1
          description: >-
            How closely the output follows the prompt (0.0 = more creative, 1.0
            = more literal).
          example: 0.3
    GenerateSoundResponse:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: URL of the generated audio file (MP3)
        text:
          type: string
          description: The prompt used for generation
        seconds:
          type: integer
          description: Duration of the generated sound in seconds
        status:
          type: string
          enum:
            - completed
          description: Status of the generation
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Invalid API key
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Get yours at
        https://easy-peasy.ai/settings/api

````