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

# Eleven v4 Text to Dialogue

> Generate ordered dialogue from inputs containing text and voice_id, with at most 10 distinct voices. Keeping total text within 2000 characters is recommended.

Submit asynchronously and [query the task](/pages/en/api-manual/task-management/get-task-detail). Download results[0].url on completion. Only returned metadata is preserved; save audio promptly.

`eleven-v4-text-to-dialogue` and `eleven-v4-text-to-dialogue-custom-voice` use the same nonempty `inputs` array. Each item requires `text` and `voice_id`. Order and IDs are preserved. At most10 distinct voices are allowed; repeated IDs count once, so more than10 segments are allowed. Keeping total text within2000 characters is a generation recommendation, not a hard local limit; longer requests may end early or fail.

Optional `settings` contains stability (default0.5), **similarity** (default0.75) and optional clone\_strength, all0–1. Omitting/nulling the object preserves saved voice settings. Clone strength requires a v4 professional clone. Context uses `previous_text` / `future_text` and is not billed. Seed accepts0–4294967295; normalization defaults to auto.

Custom dialogue may mix public and private voices. The regular model does not enforce a separate voice category. Every ID must be jointly accessible for the request. Voices are not replaced and segments are not split across accounts. IDs do not promise permanent availability, portability or exclusive access. Unavailable voices fail and follow normal refund rules.

Output defaults to mp3\_44100\_128; see parameters for all28 formats. Explicit timestamps and dictionaries require the complete capability. Results preserve only returned alignment and voice segments; absent metadata is not synthesized. [Query the task](https://docs.aihubmax.com/pages/en/api-manual/task-management/get-task-detail.md) and promptly download results\[0].url.

Both models cost **\$0.00008 per Unicode character**, summed over inputs\[].text, including spaces, punctuation and tags. IDs, context and settings are excluded. There is no rounding to1000-character blocks. Saved prices and group multipliers determine completion settlement.

Migration: inputs\[].voice → inputs\[].voice\_id; flat controls → settings, with similarity\_boost renamed to settings.similarity. Unknown fields are rejected. Historical tasks keep their original requests and are not generated again.


## OpenAPI

````yaml openapi/en/eleven-v4-text-to-dialogue.json POST /v1/audios/generations
openapi: 3.1.0
info:
  title: Eleven v4 Dialogue / Custom Voice
  version: '1.0'
servers:
  - url: https://api.aihubmax.com/e
security:
  - BearerAuth: []
paths:
  /v1/audios/generations:
    post:
      tags:
        - Audio > Speech synthesis
      summary: Eleven v4 Dialogue / Custom Voice
      description: >-
        Generate ordered dialogue from inputs containing text and voice_id, with
        at most 10 distinct voices. Keeping total text within 2000 characters is
        recommended.


        Submit asynchronously and [query the
        task](/pages/en/api-manual/task-management/get-task-detail). Download
        results[0].url on completion. Only returned metadata is preserved; save
        audio promptly.
      operationId: eleven-v4-text-to-dialogue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElevenV4DialogueRequest'
            examples:
              按顺序合成对话:
                summary: Example request
                value:
                  model: eleven-v4-text-to-dialogue
                  inputs:
                    - text: 你好。
                      voice_id: existing-voice-id
      responses:
        '200':
          $ref: '#/components/responses/TaskCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    ElevenV4DialogueRequest:
      type: object
      required:
        - model
        - inputs
      properties:
        seed:
          anyOf:
            - maximum: 4294967295
              minimum: 0
              type: integer
            - type: 'null'
          default: null
          description: >-
            Optional random seed; zero is a valid explicit value. See
            minimum/maximum.
          example: 0
        language_code:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Language in ISO 639-1, such as zh or en.
          example: zh
        apply_text_normalization:
          default: auto
          description: 'Text normalization: auto, on or off. Defaults to auto.'
          enum:
            - auto
            - 'on'
            - 'off'
          type: string
          example: auto
        output_format:
          default: mp3_44100_128
          description: >-
            Output encoding, sample rate and bitrate; 28 formats, default
            mp3_44100_128.
          enum:
            - mp3_22050_32
            - mp3_24000_48
            - mp3_44100_32
            - mp3_44100_64
            - mp3_44100_96
            - mp3_44100_128
            - mp3_44100_192
            - pcm_8000
            - pcm_16000
            - pcm_22050
            - pcm_24000
            - pcm_32000
            - pcm_44100
            - pcm_48000
            - wav_8000
            - wav_16000
            - wav_22050
            - wav_24000
            - wav_32000
            - wav_44100
            - wav_48000
            - ulaw_8000
            - alaw_8000
            - opus_48000_32
            - opus_48000_64
            - opus_48000_96
            - opus_48000_128
            - opus_48000_192
          type: string
          example: mp3_44100_128
        timestamps:
          default: false
          description: >-
            Request alignment timestamps. The entire requested capability must
            be available; unsupported requests fail explicitly. Only actual
            alignment returned with the result is preserved.
          type: boolean
          example: false
        pronunciation_dictionary_locators:
          anyOf:
            - items:
                additionalProperties: false
                properties:
                  pronunciation_dictionary_id:
                    description: Pronunciation dictionary ID.
                    minLength: 1
                    type: string
                  version_id:
                    description: Fixed pronunciation dictionary version ID.
                    minLength: 1
                    type: string
                required:
                  - pronunciation_dictionary_id
                  - version_id
                type: object
              maxItems: 3
              type: array
            - type: 'null'
          default: null
          description: >-
            Up to 3 versioned pronunciation dictionaries. Requires the complete
            capability; unsupported requests fail explicitly.


            > Advanced option: omit unless needed.
          x-advanced: true
          example:
            - pronunciation_dictionary_id: dictionary-id
              version_id: version-id
        model:
          description: >-
            eleven-v4-text-to-dialogue: ordered dialogue with specified voices.
            eleven-v4-text-to-dialogue-custom-voice: may mix public and private
            voices. Both cost $0.00008 per Unicode character summed over
            submitted text.
          examples:
            - eleven-v4-text-to-dialogue
            - eleven-v4-text-to-dialogue-custom-voice
          type: string
          default: eleven-v4-text-to-dialogue
        inputs:
          description: >-
            Nonempty ordered dialogue segments with text and voice_id. At most
            10 distinct voices; repeated IDs count once. Recommended total text
            is at most 2000 characters; longer requests may end early or fail.
          items:
            additionalProperties: false
            properties:
              text:
                description: >-
                  Text for this ordered dialogue segment. Keeping total text
                  across all segments within 2000 characters is recommended;
                  longer requests may end early or fail.
                minLength: 1
                type: string
                example: 你好。
              voice_id:
                description: >-
                  Original ID of an existing voice. Required; the voice must
                  remain accessible and valid.
                minLength: 1
                type: string
                example: existing-voice-id
            required:
              - text
              - voice_id
            type: object
          minItems: 1
          type: array
          example:
            - text: 你好。
              voice_id: existing-voice-id
        settings:
          anyOf:
            - additionalProperties: false
              properties:
                stability:
                  anyOf:
                    - maximum: 1
                      minimum: 0
                      type: number
                    - type: 'null'
                  default: 0.5
                  description: Stability, 0–1. Null does not override the saved setting.
                  example: 0.5
                similarity:
                  anyOf:
                    - maximum: 1
                      minimum: 0
                      type: number
                    - type: 'null'
                  default: 0.75
                  description: >-
                    Voice similarity, 0–1. Null does not override the saved
                    setting.
                  example: 0.75
                clone_strength:
                  anyOf:
                    - maximum: 1
                      minimum: 0
                      type: number
                    - type: 'null'
                  default: null
                  description: >-
                    Optional strength, 0–1, only for a v4 professional cloned
                    voice.
                  example: 0.5
              type: object
            - type: 'null'
          default: null
          description: >-
            Omit or use null to preserve saved settings. Dialogue uses
            similarity rather than similarity_boost.
          example:
            similarity: 0.75
            stability: 0.5
        previous_text:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: |-
            Previous context. Not spoken or included in character billing.

            > Advanced option: omit unless needed.
          x-advanced: true
          example: 开场。
        future_text:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: |-
            Following dialogue context. Not included in character billing.

            > Advanced option: omit unless needed.
          x-advanced: true
          example: 结束。
      additionalProperties: false
    TaskResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757165031
        id:
          type: string
          description: Task ID
          example: task-unified-1757165031-uyujaw3d
        model:
          type: string
          description: >-
            eleven-v4-text-to-dialogue: ordered dialogue with specified voices.
            eleven-v4-text-to-dialogue-custom-voice: may mix public and private
            voices. Both cost $0.00008 per Unicode character summed over
            submitted text.
        object:
          type: string
          description: Task type
          enum:
            - audio.generation.task
        progress:
          type: integer
          description: Task progress (0–100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          type: object
          description: Asynchronous task information
          properties:
            can_cancel:
              type: boolean
              description: Whether the task can be canceled
              example: true
            estimated_time:
              type: integer
              description: Estimated completion time in seconds
              example: 45
        type:
          type: string
          description: Output type
          enum:
            - audio
          example: audio
    ErrorResponse400:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Bad request
            type:
              type: string
              example: invalid_request_error
    ErrorResponse401:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: API密钥无效
            type:
              type: string
              example: authentication_error
    ErrorResponse402:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 账户余额不足
            type:
              type: string
              example: insufficient_quota
    ErrorResponse422:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Validation failed
            type:
              type: string
              example: validation_error
    ErrorResponse429:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Rate limit exceeded
            type:
              type: string
              example: rate_limit_error
    ErrorResponse500:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Internal server error
            type:
              type: string
              example: server_error
    ErrorResponse503:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: 服务暂不可用，请稍后重试
            type:
              type: string
              example: service_unavailable
  responses:
    TaskCreated:
      description: Task created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TaskResponse'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse401'
    PaymentRequired:
      description: Insufficient balance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse402'
    UnprocessableEntity:
      description: Validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse422'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse429'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse500'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse503'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        All endpoints require Bearer authentication.

        Add this request header:

        `Authorization: Bearer YOUR_API_KEY`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.