> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.videogen.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.videogen.io/_mcp/server.

# Generate sound effect

POST https://api.videogen.io/v1/tools/generate-sound-effect
Content-Type: application/json

Generate a sound effect from a text description. Optionally control the duration and prompt influence. VideoGen automatically routes each request to the most effective state-of-the-art sound effect model for your prompt and settings, so you don't pick a model.

Reference: https://docs.videogen.io/rest-api-reference/tools/generate-sound-effect

## Authentication

- `Authorization` header (bearer token, required) — API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

## Request

### Body (application/json)

This endpoint expects a GenerateSoundEffectRequest.

- `prompt` (string, required) — A text description of the sound effect to generate.
- `durationSeconds` (double, optional, nullable) — Desired length of the sound effect in seconds, between 1 and 30. Defaults to about 10 seconds when omitted.
- `promptInfluence` (double, optional, nullable) — How closely the generated sound effect follows the prompt, between 0 (more creative, more variation) and 1 (more literal, less variation). Defaults to a balanced value when omitted.
- `numResults` (integer, optional, default: 1) — Number of output results to generate. Defaults to 1.
- `isOutputTemporary` (boolean, optional, default: false) — When true, generated files are temporary. Temporary files are guaranteed to be available for 24 hours, after which they may be archived at any time. Temporary files are not analyzed (no description, transcript, or embedding will be generated), so they will not appear in search results. Defaults to false.
- `hideFromUi` (boolean, optional, default: false) — When true, generated files are hidden from the VideoGen Media page by default. They remain accessible through the API. Defaults to false.

## Response

### 202

Execution accepted; poll until complete.

- `toolExecutionId` (string, required) — Execution id (e.g. `vg_tool_...`).

## Examples

**Request**

```json
{
  "prompt": "Create a short, high-quality thunderclap sound effect with a deep rumble and sharp crack"
}
```

**Response**

```json
{
  "toolExecutionId": "vg_tool_ccm3abc123defcm3xyz789ghi"
}
```

**SDK Code**

```typescript
import { VideoGen } from "@videogen/sdk";

const client = new VideoGen({ apiKey: "sk_videogen_live_..." });

await client.tools.generateSoundEffect({
  prompt: "Create a short, high-quality thunderclap sound effect with a deep rumble and sharp crack",
});
```

```python
from videogen import VideoGen

client = VideoGen(api_key="sk_videogen_live_...")

client.tools.generate_sound_effect(
    prompt="Create a short, high-quality thunderclap sound effect with a deep rumble and sharp crack",
)
```