# Regenerate a cloned voice sample (/docs/api-reference/voice-cloning/regenerateClonedVoiceSample)

> Regenerate the sample audio for a `ready` voice.

**POST** `/voices/{voice_id}/sample`

Regenerate the sample audio for a `ready` voice.

```yaml
operationId: regenerateClonedVoiceSample
parameters:
  - in: path
    name: voice_id
    required: true
    schema:
      type: integer
    description: Id of the cloned voice.
responses:
  '200':
    description: The voice, with a fresh sample.
    content:
      application/json:
        schema:
          type: object
          properties:
            voice:
              type: object
              description: |
                A voice cloned from an audio sample. Created asynchronously: `status` is
                `processing` until the provider finishes, then `ready` or `failed`.
                `voice_id` is the provider id an agent uses, and is `null` until ready.
              properties:
                id:
                  type: integer
                  example: 412
                name:
                  type: string
                  example: Front desk
                description:
                  type: string
                  nullable: true
                language:
                  type: string
                  example: en
                gender:
                  type: string
                  enum:
                    - male
                    - female
                status:
                  type: string
                  enum:
                    - processing
                    - ready
                    - failed
                voice_id:
                  type: string
                  nullable: true
                  description: |
                    The provider voice id. Put it in an agent's `voice.voice_id` with
                    `voice.provider: cartesia`. `null` until `status` is `ready`.
                  example: 8a1c2f5e-3b7d-4c9a-9f21-2e6b0d4a7c88
                sample_url:
                  type: string
                  nullable: true
                  description: |
                    An mp3 preview of the cloned voice, when one exists. Fetching it
                    needs your API key in the `Authorization: Bearer` header, so a
                    browser `<audio>` tag cannot play it directly.
                error:
                  type: string
                  nullable: true
                  description: |
                    Present only when `status` is `failed`. Deliberately generic: no
                    provider name and no internal detail.
                created_at:
                  type: string
                  description: ISO 8601 time in UTC, with no offset.
                  nullable: true
                ready_at:
                  type: string
                  description: ISO 8601 time in UTC, with no offset.
                  nullable: true
  '403':
    description: Voice cloning is not enabled for this account, or the key's user cannot write it.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '404':
    description: No such voice, or it belongs to another account.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '409':
    description: The voice is not ready yet.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: conflict
          error_description: This voice is not ready yet.
          code: voice_not_ready
          request_id: req_3b6e8f1d4a07
  '429':
    description: |
      You regenerated too many samples. The limit is 10 an hour per user.
      Retry after the number of seconds in the `Retry-After` header (3600).
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: too_many_requests
          error_description: Too many sample regenerations. Please wait and try again.
          code: rate_limited
          request_id: req_9c2a5e7b0d36
  '502':
    description: The sample could not be regenerated. Try again.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: server_error
          error_description: Could not regenerate the sample. Please try again.
          code: sample_failed
          request_id: req_1d4f8a3e6c92
  '503':
    description: Voice cloning is temporarily unavailable. Try again shortly.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
        example:
          error: service_unavailable
          error_description: Voice cloning is temporarily unavailable.
          code: provider_unavailable
          request_id: req_3f7c0b5d8a21
```

**curl**

```bash
curl -X POST "https://omnidim.io/api/v1/voices/{voice_id}/sample" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```