> ## Documentation Index
> Fetch the complete documentation index at: https://docs.breezeblue.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create clone preview

> Upload one reference sample and create a temporary voice clone preview.



## OpenAPI

````yaml /openapi.json post /v1/voice-previews/clone
openapi: 3.1.0
info:
  title: Breeze Developer API
  description: >-
    Breeze Developer API for models, voices, text-to-speech, history, balance,
    usage, and browser-managed API keys.
  version: 1.0.0
servers:
  - url: https://api.breeze.blue
security: []
tags:
  - name: Models
    description: Supported TTS models.
  - name: Text to Speech
    description: Text-to-speech synthesis and instruction rewriting.
  - name: Voices
    description: Saved voices and voice settings.
  - name: Voice Previews
    description: Create, audition, and save temporary voice previews.
  - name: Account
    description: Balance, usage, and API keys.
  - name: History
    description: Generated audio history.
paths:
  /v1/voice-previews/clone:
    post:
      tags:
        - Voice Previews
      summary: Create clone preview
      description: Upload one reference sample and create a temporary voice clone preview.
      operationId: voice_previews_clone
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/VoicePreviewsCloneRequestBody'
        required: true
      responses:
        '200':
          description: Generated clone preview.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceClonePreviewResponse'
          headers:
            x-breeze-api-key-id:
              description: >-
                Public API key identifier used to authenticate the request, when
                an API key was used.
              schema:
                type: string
        '400':
          description: HTTP 400 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: HTTP 401 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: HTTP 403 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: HTTP 422 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '429':
          description: HTTP 429 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: HTTP 502 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: HTTP 503 error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl \
              --request POST \
              --url "https://api.breeze.blue/v1/voice-previews/clone" \
              --header "xi-api-key: $BREEZE_API_KEY" \
              --form "name=Brand Narrator" \
              --form "description=Clean studio narration sample." \
              --form "files=@sample.wav;type=audio/wav"
        - lang: Python
          label: Python SDK
          source: |-
            from pathlib import Path

            import os

            from breeze_blue import BreezeBlue

            client = BreezeBlue(api_key=os.environ["BREEZE_API_KEY"])

            preview = client.voices.create_clone_preview(
                name="Brand Narrator",
                file=Path("sample.wav"),
                description="Clean studio narration sample.",
            )

            print(preview["generated_voice_id"])
        - lang: TypeScript
          label: TypeScript SDK
          source: |-
            import { readFile } from "node:fs/promises";
            import { BreezeBlueClient } from "@breeze.blue/sdk";

            const client = new BreezeBlueClient({
              apiKey: process.env.BREEZE_API_KEY!,
            });

            const preview = await client.voices.createClonePreview({
              name: "Brand Narrator",
              file: {
                data: await readFile("sample.wav"),
                filename: "sample.wav",
                contentType: "audio/wav",
              },
              description: "Clean studio narration sample.",
            });

            console.log(preview.generatedVoiceId);
components:
  schemas:
    VoicePreviewsCloneRequestBody:
      properties:
        name:
          type: string
          title: Name
          description: Display name for the clone preview.
        files:
          items:
            type: string
            contentMediaType: application/octet-stream
          type: array
          minItems: 1
          maxItems: 1
          title: Files
          description: Reference audio sample. WAV or MP3, up to 5MB. Exactly one file.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description stored with the preview.
        labels:
          anyOf:
            - type: string
            - type: 'null'
          title: Labels
          description: JSON object encoded as a string.
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
          description: Preview script. Breeze uses a default script when omitted.
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
          description: Performance guidance for the preview.
      type: object
      required:
        - name
        - files
      title: Body_add_voice_v1_voice_previews_clone_post
    VoiceClonePreviewResponse:
      properties:
        generated_voice_id:
          title: Generated Voice Id
          type: string
        requires_verification:
          default: false
          title: Requires Verification
          type: boolean
      required:
        - generated_voice_id
      title: VoiceClonePreviewResponse
      type: object
    ErrorResponse:
      properties:
        ok:
          default: false
          title: Ok
          type: boolean
        code:
          title: Code
          type: string
        detail:
          title: Detail
          type: string
        error:
          title: Error
          type: string
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Meta
      required:
        - code
        - detail
        - error
      title: ErrorResponse
      type: object
    ValidationErrorResponse:
      properties:
        ok:
          default: false
          title: Ok
          type: boolean
        code:
          title: Code
          type: string
        detail:
          title: Detail
          type: string
        error:
          title: Error
          type: string
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - code
        - detail
        - error
      title: ValidationErrorResponse
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: xi-api-key
      description: Breeze Developer API key.

````