---
title: "Synthesize a short audio sample of a voice"
method: GET
path: "/v1/accounts/{accountId}/voice-library/{voiceId}/sample"
tags: ["Voice Library"]
---

# Synthesize a short audio sample of a voice

`GET /v1/accounts/{accountId}/voice-library/{voiceId}/sample`

## Request

- Base URL: `https://api.us.poly.ai`
- URL: `https://api.us.poly.ai/v1/accounts/{accountId}/voice-library/{voiceId}/sample`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/poly/apis/polyai-agents-api/docs/v1/accounts/:accountId/voice-library/:voiceId/sample/get.ts> (a function with typed inputs; its response is checked against the schema)

## Response `200`

Successful response

- VoiceSampleResponse: Response for GET /voice-library/<voice_id>/sample.
  - `voiceId` string, required: The voice that was synthesized
  - `sampleUrl` string, required: Time-limited URL to a synthesized sample of the voice
  - `expiresInSeconds` integer, required: Number of seconds until sample_url expires
  - `text` string, required: The text that was synthesized

## Other responses

- `401`: Unauthorized – missing or invalid API key
- `403`: Forbidden – insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/poly/apis/polyai-agents-api.md) - [All operations](https://skmtc.dev/poly/apis/polyai-agents-api/llms.txt) - [OpenAPI document](https://skmtc.dev/poly/apis/polyai-agents-api/revisions/76f3c606e395?raw)
