---
title: "Generate Audio"
method: POST
path: "/tools/generate/audio"
tags: ["accepts-api-key"]
---

# Generate Audio

`POST /tools/generate/audio`

## Request

- Base URL: `https://api.tellers.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tellers.ai/tools/generate/audio`
- Auth: none declared

## Headers

- `x-api-key` string, nullable
- `authorization` string, nullable

## Request body

- GenerateAudioRequest
  - `prompt` string, required: Text prompt describing the audio.
  - `model` 'music' | 'sfx': 'music' for a composed track, 'sfx' for a sound effect.
  - `duration_seconds` number: Requested length. Accepted range differs per model — music takes 10-300s and sfx 0.5-30s. See GET /tools/models.
  - `output_path` string, nullable: Optional library path for the generated audio file.
  - `reference_audio` AssetPeriodRef: A time range within an asset — mirrors the tools' ``AssetPeriod``.
    - `asset_id` string, required: The asset to take the range from.
    - `start_time` number, nullable: Range start in seconds. Defaults to 0.
    - `end_time` number, nullable: Range end in seconds. Ignored if `till_the_end` is true. Defaults to the end of the asset.
    - `till_the_end` boolean: Extend to the end of the asset, ignoring `end_time`.

## Response `200`

Successful Response

- GenerateAudioResponse
  - `asset_id` string, required
  - `duration_seconds` number, required

## Other responses

- `402`: Not enough Tellers tokens to run this tool. The call was refused before the tool ran, so nothing was charged. Buy more tokens or wait for the next subscription grant.
- `403`: The account's email is not verified yet, so it cannot spend tokens. Nothing was charged. `detail.code` is `EMAIL_NOT_VERIFIED`.
- `413`: The account is already using all the storage its plan allows, and a generation would add another file. Nothing was charged and no provider was called. Delete files or move to a plan with more storage; `GET /users/me` reports both the usage and the quota.
- `422`: Validation Error

---

[API](https://skmtc.dev/tellers/apis/tellers-api.md) - [All operations](https://skmtc.dev/tellers/apis/tellers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tellers/apis/tellers-api/revisions/fdaa0fa44a26?raw)
