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

# Create or add a version to a voice design

> Creates a new voice design (version 1) when `voice_design_id` is omitted. When `voice_design_id` is provided, adds a new version to the existing design instead. A design can have at most 50 versions.



## OpenAPI

````yaml /openapi/voice-designs.yml post /voice_designs
openapi: 3.1.0
info:
  title: Voice Designs API
  version: 2.0.0
  description: Create and manage AI-generated voice designs using natural language prompts.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Voice Designs
    description: >-
      Create and manage AI-generated voice designs using natural language
      prompts.
paths:
  /voice_designs:
    post:
      tags:
        - Voice Designs
      summary: Create or add a version to a voice design
      description: >-
        Creates a new voice design (version 1) when `voice_design_id` is
        omitted. When `voice_design_id` is provided, adds a new version to the
        existing design instead. A design can have at most 50 versions.
      operationId: createVoiceDesign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceDesignRequest'
      responses:
        '201':
          description: Voice design created or new version added successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceDesignResponse'
        '401':
          description: Unauthorized — missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
        '404':
          description: >-
            Voice design not found — the specified `voice_design_id` does not
            exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
        '409':
          description: Conflict — the voice design has reached the maximum of 50 versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
        '422':
          description: Unprocessable entity — validation error in the request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
        '502':
          description: Bad gateway — upstream voice synthesis service is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const voiceDesign = await client.voiceDesigns.create({
              prompt: 'Speak in a warm, friendly tone',
              text: 'Hello, welcome to our service.',
            });

            console.log(voiceDesign.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            voice_design = client.voice_designs.create(
                prompt="Speak in a warm, friendly tone",
                text="Hello, welcome to our service.",
            )
            print(voice_design.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tvoiceDesign, err := client.VoiceDesigns.New(context.TODO(), telnyx.VoiceDesignNewParams{\n\t\tPrompt: \"Speak in a warm, friendly tone\",\n\t\tText:   \"Hello, welcome to our service.\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", voiceDesign.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.voicedesigns.VoiceDesignCreateParams;
            import com.telnyx.sdk.models.voicedesigns.VoiceDesignCreateResponse;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    VoiceDesignCreateParams params = VoiceDesignCreateParams.builder()
                        .prompt("Speak in a warm, friendly tone")
                        .text("Hello, welcome to our service.")
                        .build();
                    VoiceDesignCreateResponse voiceDesign = client.voiceDesigns().create(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            voice_design = telnyx.voice_designs.create(
              prompt: "Speak in a warm, friendly tone",
              text: "Hello, welcome to our service."
            )

            puts(voice_design)
        - lang: CLI
          source: |-
            telnyx voice-designs create \
              --api-key 'My API Key' \
              --prompt 'Speak in a warm, friendly tone' \
              --text 'Hello, welcome to our service.'
components:
  schemas:
    VoiceDesignRequest:
      type: object
      description: >-
        Request body for creating a new voice design or adding a version to an
        existing one. Omit `voice_design_id` to create a new design; include it
        to add a new version.
      required:
        - text
        - prompt
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Name for the voice design. Required when creating a new design
            (`voice_design_id` is not provided); ignored when adding a version.
            Cannot be a UUID.
        voice_design_id:
          type: string
          format: uuid
          description: >-
            ID of an existing voice design to add a new version to. When
            provided, a new version is created instead of a new design.
        text:
          type: string
          description: Sample text to synthesize for this voice design.
        prompt:
          type: string
          description: >-
            Natural language description of the voice style, e.g. 'Speak in a
            warm, friendly tone with a slight British accent'.
        language:
          type: string
          default: Auto
          description: >-
            Language for synthesis. Supported values: Auto, Chinese, English,
            Japanese, Korean, German, French, Russian, Portuguese, Spanish,
            Italian. Defaults to Auto.
        temperature:
          type: number
          format: float
          minimum: 0
          maximum: 2
          description: >-
            Sampling temperature controlling randomness. Higher values produce
            more varied output. Default: 0.9.
        top_k:
          type: integer
          minimum: 1
          maximum: 1000
          description: >-
            Top-k sampling parameter — limits the token vocabulary considered at
            each step. Default: 50.
        top_p:
          type: number
          format: float
          minimum: 0
          maximum: 1
          description: >-
            Top-p (nucleus) sampling parameter — cumulative probability cutoff
            for token selection. Default: 1.0.
        repetition_penalty:
          type: number
          format: float
          minimum: 1
          maximum: 2
          description: >-
            Repetition penalty to reduce repeated patterns in generated audio.
            Default: 1.05.
        max_new_tokens:
          type: integer
          minimum: 100
          maximum: 4096
          description: 'Maximum number of tokens to generate. Default: 2048.'
        provider:
          type: string
          enum:
            - telnyx
            - minimax
            - Telnyx
            - Minimax
          default: telnyx
          description: >-
            Voice synthesis provider. `telnyx` uses the Qwen3TTS model;
            `minimax` uses the Minimax speech models. Case-insensitive. Defaults
            to `telnyx`.
      example:
        name: friendly-narrator
        text: Hello, welcome to our service.
        prompt: Speak in a warm, friendly tone
        language: Auto
        provider: telnyx
    VoiceDesignResponse:
      type: object
      description: Response envelope for a single voice design with full version detail.
      properties:
        data:
          $ref: '#/components/schemas/VoiceDesignData'
      example:
        data:
          record_type: voice_design
          id: 550e8400-e29b-41d4-a716-446655440000
          name: friendly-narrator
          version: 1
          text: Hello, welcome.
          prompt: Speak in a warm tone
          voice_sample_size: 48000
          version_created_at: '2024-01-01T00:00:00Z'
          created_at: '2024-01-01T00:00:00Z'
          updated_at: '2024-01-01T00:00:00Z'
          provider: Telnyx
          provider_supported_models:
            - Qwen3TTS
          provider_voice_id: 550e8400-e29b-41d4-a716-446655440000
    voice-designs_ErrorResponse:
      type: object
      description: Standard error response envelope.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      example:
        errors:
          - code: '10005'
            title: Resource not found
            detail: Voice design not found
    VoiceDesignData:
      type: object
      description: A voice design object with full version detail.
      properties:
        record_type:
          type: string
          enum:
            - voice_design
          description: Identifies the resource type.
        id:
          type: string
          format: uuid
          description: Unique identifier for the voice design.
        name:
          type: string
          description: Name of the voice design.
        version:
          type: integer
          description: Version number of this voice design.
        text:
          type: string
          description: Sample text used to synthesize this version.
        prompt:
          type: string
          description: >-
            Natural language prompt used to define the voice style for this
            version.
        voice_sample_size:
          type: integer
          description: Size of the voice sample audio in bytes.
        version_created_at:
          type: string
          format: date-time
          description: Timestamp when this specific version was created.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the voice design was first created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the voice design was last updated.
        provider:
          type:
            - string
            - 'null'
          enum:
            - telnyx
            - minimax
            - Telnyx
            - Minimax
            - null
          description: Voice synthesis provider used for this design.
        provider_supported_models:
          type: array
          items:
            type: string
          description: >-
            List of TTS model identifiers supported by this design's provider
            (e.g. `Qwen3TTS`, `speech-02-turbo`).
        provider_voice_id:
          type:
            - string
            - 'null'
          description: >-
            Provider-specific voice identifier. For Telnyx designs this is the
            design version ID; for Minimax it is the Minimax-assigned voice ID.
    ErrorObject:
      type: object
      description: A single error object.
      properties:
        code:
          type: string
          description: Telnyx-specific error code.
        title:
          type: string
          description: Short, human-readable summary of the error.
        detail:
          type: string
          description: Detailed, human-readable explanation of the error.
        source:
          type: object
          description: Reference to the source of the error.
          properties:
            pointer:
              type: string
              description: A JSON Pointer (RFC 6901) to the field that caused the error.

````