# Generate one tenant speech file

> `POST` `/v1/speech/generate`

URL: https://www.agencytitan.com/docs/tag/speech/POST/v1/speech/generate

Operation ID: `speech_generate`

Tag: [speech](https://www.agencytitan.com/docs/tag/speech.md)

## Description

Generates spoken audio from text and returns a storage_object_id. Attach the result by writing `{ "storage_object_id": "<id>" }` to a compatible tenant media field. Supply provider and model together to choose a speech model; otherwise the configured speech agent is used. Returns the provider, model and voice actually used. The operation never returns audio bytes or base64.

## Parameters

- `Idempotency-Key` (header, required, `string`) — Caller-generated key for deterministic command replay (1-255 characters).

## Request body

- Required: yes
- Content-Type: `application/json`
  - Type: `allOf`
  - Properties:
    - `format` (`string`)
    - `instructions` (`string`)
    - `model` (`string`)
    - `provider` (`string`)
    - `text` (`string`, required)
    - `voice` (`string`)

## Responses

- `200` (`application/json`): Successful response.
  - Type: `object`
  - Properties:
    - `data` (`object`, required)
- `400` (`application/json`): Request validation failed (unknown or out-of-range parameters/properties are rejected).
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `401` (`application/json`): Missing, invalid, expired, or revoked bearer token.
  - Type: `object`
  - Properties:
    - `error` (`string`, required)
    - `error_description` (`string`, required)
- `403` (`application/json`): The authenticated user does not have permission for this operation.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `404` (`application/json`): The requested resource was not found.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `409` (`application/json`): The request conflicts with an existing record or partially applied.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `429` (`application/json`): Per-tenant rate limit exceeded (600 requests/minute across all /v1 REST endpoints). The Retry-After header indicates how many seconds to wait.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)
- `500` (`application/json`): An unexpected internal error occurred.
  - Type: `object`
  - Properties:
    - `error` (`object`, required)

## Authentication

- `bearerAuth` — http (bearer) — All /v1 endpoints (except `/v1/openapi.json` and `/v1/llms.txt`) require a bearer token. Two equal first-class paths: (1) an OAuth 2.0 access token from the au…

## Useful links

- Interactive page: https://www.agencytitan.com/docs/tag/speech/POST/v1/speech/generate
- API reference home: https://www.agencytitan.com/docs/
- Tag page: https://www.agencytitan.com/docs/tag/speech.md
- This operation as Markdown: https://www.agencytitan.com/docs/tag/speech/POST/v1/speech/generate.md
- OpenAPI JSON: https://www.agencytitan.com/docs/openapi.json
- Full API Markdown: https://api.agencytitan.com/v1/llms.txt
- API keys: https://app.agencytitan.com/settings/api-mcp
