Source: https://docs.cumuluslabs.io/reference/voices.preview
Content version: 9b7457f4

# Preview configured speech

Preview a fixed English or Spanish line with configured voice, model, speed and expressiveness; does not run an agent

Operation ID: `voices.preview`.

## Request {#request}

`POST /api/v1/voices/preview`

- MCP: `voices_preview`
- SDK: `client.voices.preview` (SDK path arguments use `path`; MCP uses `params`).
- Minimum API key role: **member**.
- Idempotency: **Required**. Send `Idempotency-Key` (MCP: `idempotency_key`) and keep it for retries.

Read resource IDs from earlier responses and use a key for the same environment.

## Integration notes {#integration-notes}

Audio is returned once. A retry with the same Idempotency-Key never synthesizes again and returns 409 if the preview request was already consumed. Use a new key only for an intentional new preview.

## Input schema {#input-schema}

### Path, query and header parameters

#### Idempotency-Key

header parameter · **Required**. 

Type: **string**. minLength: 1. maxLength: 256.

### JSON request body

| Field | Type or values | Required | Description and limits |
| --- | --- | --- | --- |
| `voice_id` | string | Required | minLength: 1. maxLength: 256. |
| `model` | string | Required | minLength: 1. maxLength: 128. |
| `language` | "en" · "es" | Required | — |
| `speed` | number | Required | At least 0.5. At most 2. |
| `expressiveness` | number | Required | At least 0. At most 2. |

```openapi
{
  "parameters": [
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/VoicesPreviewRequest"
        }
      }
    }
  }
}
```

## Responses {#responses}

### HTTP 200

Preview a fixed English or Spanish line with configured voice, model, speed and expressiveness; does not run an agent

**application/json**

| Field | Type or values | Required | Description and limits |
| --- | --- | --- | --- |
| `audio_base64` | string | Required | minLength: 1. maxLength: 3000000. |
| `media_type` | "audio/mpeg" | Required | — |
| `text` | string | Required | — |

```openapi
{
  "200": {
    "description": "Preview a fixed English or Spanish line with configured voice, model, speed and expressiveness; does not run an agent",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/VoicesPreviewResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}
```

## Referenced schemas {#schemas}

Expand the complete OpenAPI definitions for integrations that generate their own clients.

```openapi
{
  "components": {
    "schemas": {
      "VoicesPreviewRequest": {
        "type": "object",
        "properties": {
          "voice_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "es"
            ]
          },
          "speed": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 2
          },
          "expressiveness": {
            "type": "number",
            "minimum": 0,
            "maximum": 2
          }
        },
        "required": [
          "voice_id",
          "model",
          "language",
          "speed",
          "expressiveness"
        ],
        "additionalProperties": false
      },
      "VoicesPreviewResponse200": {
        "type": "object",
        "properties": {
          "audio_base64": {
            "type": "string",
            "minLength": 1,
            "maxLength": 3000000
          },
          "media_type": {
            "type": "string",
            "enum": [
              "audio/mpeg"
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "audio_base64",
          "media_type",
          "text"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Errors and recovery {#errors}

See [API error handling](https://docs.cumuluslabs.io/api#errors) and [Troubleshooting](https://docs.cumuluslabs.io/troubleshooting).

## Related guides {#related-guides}

- [Agents](https://docs.cumuluslabs.io/agents)
