> ## 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 localize preview

> Localize an existing voice into another speaking language and return a background job. Breeze keeps the source timbre and picks the preview script for the target language; poll the job and save the preview it produces.

<section className="api-next-steps" aria-label="Continue building">
  ## Continue building

  <Columns cols={2}>
    <Card title="Localizing a voice" icon="book-open" href="/guides/voice-localize">Generate, audition, and save localized previews.</Card>
    <Card title="Get localize preview" icon="braces" href="/api-reference/voice-previews/get-localize-preview">Poll the returned localization job.</Card>
    <Card title="List Voice Metadata options" icon="braces" href="/api-reference/voices/list-voice-metadata-options">Check target language and accent codes.</Card>
  </Columns>
</section>


## OpenAPI

````yaml /openapi.json post /v1/voice-previews/localize
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 enhancement.
  - 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/localize:
    post:
      tags:
        - Voice Previews
      summary: Create localize preview
      description: >-
        Localize an existing voice into another speaking language and return a
        background job. Breeze keeps the source timbre and picks the preview
        script for the target language; poll the job and save the preview it
        produces.
      operationId: voice_previews_localize
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceLocalizePreviewRequest'
        required: true
      responses:
        '202':
          description: Accepted background voice localization job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceLocalizePreviewJobResponse'
          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'
        '404':
          description: HTTP 404 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'
        '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/localize" \
              --header "xi-api-key: $BREEZE_API_KEY" \
              --header "Content-Type: application/json" \
              --data '{
              "voice_id": "voc_xeh3w54cqvnp",
              "language_code": "es",
              "name": "Brand Narrator (Spanish)"
            }'
        - lang: Python
          label: Python SDK
          source: |-
            import os

            from breeze_blue import BreezeBlue

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

            job = client.voices.create_localize_preview(
                voice_id="voc_xeh3w54cqvnp",
                language_code="es",
                name="Brand Narrator (Spanish)",
            )

            print(job["generation_job_id"])
        - lang: TypeScript
          label: TypeScript SDK
          source: |-
            import { BreezeBlueClient } from "@breeze.blue/sdk";

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

            const job = await client.voices.createLocalizePreview({
              voiceId: "voc_xeh3w54cqvnp",
              languageCode: "es",
              name: "Brand Narrator (Spanish)",
            });

            console.log(job.generationJobId);
components:
  schemas:
    VoiceLocalizePreviewRequest:
      properties:
        voice_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Voice Id
          description: >-
            Source voice to localize. See [List
            voices](https://docs.breezeblue.ai/api-reference/voices/list-voices).
        language_code:
          type: string
          maxLength: 16
          minLength: 2
          title: Language Code
          description: >-
            Target speaking language for the localized preview. See [supported
            language codes](https://docs.breezeblue.ai/concepts/multilingual).
        name:
          anyOf:
            - type: string
              maxLength: 160
              minLength: 1
            - type: 'null'
          title: Name
          description: Display name for the preview. Defaults to the source voice name.
      additionalProperties: false
      type: object
      required:
        - voice_id
        - language_code
      title: VoiceLocalizePreviewRequest
      description: Localize an existing voice into another supported speaking language.
    VoiceLocalizePreviewJobResponse:
      properties:
        generation_job_id:
          title: Generation Job Id
          type: string
        status:
          title: Status
          type: string
      required:
        - generation_job_id
        - status
      title: VoiceLocalizePreviewJobResponse
      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.

````