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

# Create task

> Creates an ElevenLabs Multilingual v2 speech task: `input.text` is the text to speak and `input.voice` the voice, and the optional `callBackUrl` receives a completion callback. On success `data.taskId` is returned and the task runs asynchronously; poll the query endpoint for the result. Every response has HTTP status 200; check `code`.



## OpenAPI

````yaml /openapi/en/elevenlabs-tts-multilingual-v2.json post /api/v1/jobs/createTask
openapi: 3.1.0
info:
  description: >-
    ElevenLabs Eleven Multilingual v2 text to speech: ElevenLabs' most natural,
    lifelike speech model, keeping the speaker's voice and accent across many
    languages, for audiobooks, voice-over and content creation, billed per
    character.
  title: ElevenLabs Multilingual v2
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: ElevenLabs Multilingual v2
paths:
  /api/v1/jobs/createTask:
    post:
      tags:
        - ElevenLabs Multilingual v2
      summary: Create task
      description: >-
        Creates an ElevenLabs Multilingual v2 speech task: `input.text` is the
        text to speak and `input.voice` the voice, and the optional
        `callBackUrl` receives a completion callback. On success `data.taskId`
        is returned and the task runs asynchronously; poll the query endpoint
        for the result. Every response has HTTP status 200; check `code`.
      operationId: elevenlabsCreateTask
      requestBody:
        content:
          application/json:
            examples:
              English narration:
                description: >-
                  `language_code: en` sets English; the other parameters are the
                  defaults.
                summary: English narration
                value:
                  model: elevenlabs/tts-multilingual-v2
                  input:
                    text: >-
                      Welcome to DreamTo, one API for the top AI models from
                      around the world.
                    voice: pFZP5JQG7iQjIQuC4Bku
                    stability: 0.5
                    similarity_boost: 0.75
                    style: 0
                    speed: 1
                    language_code: en
              News read faster:
                description: >-
                  Daniel (`onwK4e9ZLuTAKqWW03F9`) reads the news; `speed: 1.1`
                  reads slightly faster.
                summary: News read faster
                value:
                  model: elevenlabs/tts-multilingual-v2
                  input:
                    text: >-
                      Good evening. Here are the top stories from around the
                      world tonight.
                    voice: onwK4e9ZLuTAKqWW03F9
                    speed: 1.1
                    language_code: en
              Expressive reading with callback:
                description: >-
                  Lower `stability` and higher `style` for a more expressive
                  delivery; with a completion callback.
                summary: Expressive reading with callback
                value:
                  model: elevenlabs/tts-multilingual-v2
                  callBackUrl: https://your-domain.com/api/callback
                  input:
                    text: >-
                      The door creaked open, and there, in the dim light, stood
                      the one person she never expected to see again.
                    voice: pFZP5JQG7iQjIQuC4Bku
                    stability: 0.3
                    similarity_boost: 0.8
                    style: 0.4
                    language_code: en
            schema:
              $ref: '#/components/schemas/ElevenLabsCreateTaskRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                Created:
                  description: '`data.taskId` is the task ID.'
                  summary: Created
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 7d3f0a9c41e85b2f6a1c9e04b8d27f53
                Invalid request (422):
                  description: The request is invalid; no task is created or charged.
                  summary: Invalid request (422)
                  value:
                    code: 422
                    msg: input.speed must be between 0.7 and 1.2.
                    data: null
                Invalid request (unknown field):
                  description: >-
                    `input` contains an undeclared field; no task is created or
                    charged.
                  summary: Invalid request (unknown field)
                  value:
                    code: 422
                    msg: Unknown field input.dialogue.
                    data: null
                Unauthorized (401):
                  description: Missing or invalid API Key.
                  summary: Unauthorized (401)
                  value:
                    code: 401
                    msg: >-
                      Unauthorized - Authentication credentials are missing or
                      invalid
                    data: null
                Insufficient balance (402):
                  description: The balance does not cover the task.
                  summary: Insufficient balance (402)
                  value:
                    code: 402
                    msg: >-
                      Insufficient Credits - Account does not have enough
                      credits to perform the operation
                    data: null
                Rate limited (429):
                  description: Rate limit exceeded; retry later.
                  summary: Rate limited (429)
                  value:
                    code: 429
                    msg: >-
                      Rate Limited - Request limit has been exceeded for this
                      resource
                    data: null
                Server error (500):
                  description: >-
                    The service is temporarily unavailable; retry later. Not
                    charged.
                  summary: Server error (500)
                  value:
                    code: 500
                    msg: >-
                      Server Error - An unexpected error occurred while
                      processing the request
                    data: null
              schema:
                $ref: '#/components/schemas/ElevenLabsCreateTaskResponse'
          description: >-
            Always HTTP 200. With `code` `200` the task was created and
            `data.taskId` is its ID; any other `code` is an error with the
            reason in `msg` and `data` `null`.
          headers:
            X-Request-Id:
              description: ID of this request; include it when reporting issues.
              schema:
                type: string
components:
  schemas:
    ElevenLabsCreateTaskRequest:
      additionalProperties: false
      description: Request body of createTask.
      properties:
        model:
          default: elevenlabs/tts-multilingual-v2
          description: >-
            Model name, always `elevenlabs/tts-multilingual-v2`.


            **Allowed values:**

            - `elevenlabs/tts-multilingual-v2`: ElevenLabs Eleven Multilingual
            v2 text to speech
          enum:
            - elevenlabs/tts-multilingual-v2
          type: string
        callBackUrl:
          description: >-
            Optional URL that receives a callback when the task finishes
            (success or failure); it must be a public `http` / `https` URL.
            Recommended in production; you can also just poll the query
            endpoint. See Task callback for the body and signature.
          type: string
        input:
          $ref: '#/components/schemas/ElevenLabsTTSInput'
          description: Generation parameters.
      required:
        - model
        - input
      type: object
    ElevenLabsCreateTaskResponse:
      additionalProperties: false
      description: Response of createTask; always HTTP 200.
      properties:
        code:
          description: >-
            Result code:

            - `200`: success

            - `401`: missing or invalid API Key

            - `402`: insufficient balance

            - `404`: the model does not exist or is not enabled

            - `405`: wrong HTTP method

            - `422`: invalid request, with the reason in `msg`; no task is
            created or charged

            - `429`: too many requests; retry later

            - `455`: service under maintenance

            - `500`: server error; retry later

            - `501`: generation failed

            - `505`: feature disabled
          format: int64
          type: integer
        msg:
          description: 'Message: `success`, or the English reason of an error.'
          type: string
        data:
          $ref: '#/components/schemas/ElevenLabsCreateTaskData'
          description: The task on success; `null` on error.
      required:
        - code
        - msg
        - data
      type: object
    ElevenLabsTTSInput:
      additionalProperties: false
      description: Generation parameters of `elevenlabs/tts-multilingual-v2`.
      properties:
        text:
          description: >-
            The text to speak, required, 1–5,000 characters and not blank.
            Counted in Unicode characters (one CJK character counts as one),
            spaces, punctuation and line breaks included; these characters are
            billed.
          maxLength: 5000
          minLength: 1
          type: string
        voice:
          default: pNInz6obpgDQGcFmaJgB
          description: >-
            The voice, required: a preset voice ID below (case-sensitive) or its
            preset name (case-insensitive, such as `Adam`).


            **Allowed values:**

            - `pNInz6obpgDQGcFmaJgB`: Adam - Dominant, Firm (also selected by
            the name `Adam`)

            - `Xb7hH8MSUJpSbSDYk0k2`: Alice - Clear, Engaging Educator (also
            selected by the name `Alice`)

            - `pqHfZKP75CvOlQylNhV4`: Bill - Wise, Mature, Balanced (also
            selected by the name `Bill`)

            - `nPczCjzI2devNBz1zQrb`: Brian - Deep, Resonant and Comforting
            (also selected by the name `Brian`)

            - `N2lVS1w4EtoT3dr4eOWO`: Callum - Husky Trickster (also selected by
            the name `Callum`)

            - `IKne3meq5aSn9XLyUdCD`: Charlie - Deep, Confident, Energetic (also
            selected by the name `Charlie`)

            - `iP95p4xoKVk53GoZ742B`: Chris - Charming, Down-to-Earth (also
            selected by the name `Chris`)

            - `onwK4e9ZLuTAKqWW03F9`: Daniel - Steady Broadcaster (also selected
            by the name `Daniel`)

            - `cjVigY5qzO86Huf0OWal`: Eric - Smooth, Trustworthy (also selected
            by the name `Eric`)

            - `JBFqnCBsd6RMkjVDRZzb`: George - Warm, Captivating Storyteller
            (also selected by the name `George`)

            - `SOYHLrjzK2X1ezoPC6cr`: Harry - Fierce Warrior (also selected by
            the name `Harry`)

            - `cgSgspJ2msm6clMCkdW9`: Jessica - Playful, Bright, Warm (also
            selected by the name `Jessica`)

            - `FGY2WhTYpPnrIDTdsKH5`: Laura - Enthusiast, Quirky Attitude (also
            selected by the name `Laura`)

            - `TX3LPaxmHKxFdv7VOQHJ`: Liam - Energetic, Social Media Creator
            (also selected by the name `Liam`)

            - `pFZP5JQG7iQjIQuC4Bku`: Lily - Velvety Actress (also selected by
            the name `Lily`)

            - `XrExE9yKIg1WjnnlVkGX`: Matilda - Knowledgeable, Professional
            (also selected by the name `Matilda`)

            - `SAz9YHcvj6GT2YYXdXww`: River - Relaxed, Neutral, Informative
            (also selected by the name `River`)

            - `CwhRBWXzGAHq8TQ4Fs17`: Roger - Laid-Back, Casual, Resonant (also
            selected by the name `Roger`)

            - `EXAVITQu4vr4xnSDxMaL`: Sarah - Mature, Reassuring, Confident
            (also selected by the name `Sarah`)

            - `bIHbv24MWmeRgasZH58o`: Will - Relaxed Optimist (also selected by
            the name `Will`)
          enum:
            - pNInz6obpgDQGcFmaJgB
            - Xb7hH8MSUJpSbSDYk0k2
            - pqHfZKP75CvOlQylNhV4
            - nPczCjzI2devNBz1zQrb
            - N2lVS1w4EtoT3dr4eOWO
            - IKne3meq5aSn9XLyUdCD
            - iP95p4xoKVk53GoZ742B
            - onwK4e9ZLuTAKqWW03F9
            - cjVigY5qzO86Huf0OWal
            - JBFqnCBsd6RMkjVDRZzb
            - SOYHLrjzK2X1ezoPC6cr
            - cgSgspJ2msm6clMCkdW9
            - FGY2WhTYpPnrIDTdsKH5
            - TX3LPaxmHKxFdv7VOQHJ
            - pFZP5JQG7iQjIQuC4Bku
            - XrExE9yKIg1WjnnlVkGX
            - SAz9YHcvj6GT2YYXdXww
            - CwhRBWXzGAHq8TQ4Fs17
            - EXAVITQu4vr4xnSDxMaL
            - bIHbv24MWmeRgasZH58o
          type: string
        stability:
          default: 0.5
          description: >-
            Voice stability, optional, `0`–`1`, default `0.5`. Lower values give
            a more expressive delivery with a wider emotional range but may be
            less stable; higher values are steadier and more consistent but can
            sound monotone.
          maximum: 1
          minimum: 0
          type: number
        similarity_boost:
          default: 0.75
          description: >-
            Similarity boost, optional, `0`–`1`, default `0.75`: how closely the
            output sticks to the original voice. Very high values can also
            amplify artifacts of the original recording.
          maximum: 1
          minimum: 0
          type: number
        style:
          default: 0
          description: >-
            Style exaggeration, optional, `0`–`1`, default `0`. Higher values
            amplify the voice's own speaking style but cost stability and add
            latency; `0` is recommended in most cases.
          maximum: 1
          minimum: 0
          type: number
        speed:
          default: 1
          description: >-
            Speaking speed, optional, `0.7`–`1.2`, default `1`. Below `1` is
            slower and above `1` faster; values near either end may affect
            quality.
          maximum: 1.2
          minimum: 0.7
          type: number
        language_code:
          description: >-
            Language code (ISO 639-1, such as `en`, `zh` or `ja`), optional.
            Omitted or an empty string means the language is detected from the
            text; setting it when the language is known improves pronunciation.
            A malformed code (not 2–3 lowercase letters) returns `code: 422`.
          examples:
            - en
            - zh
            - ja
          pattern: ^([a-z]{2,3})?$
          type: string
      required:
        - text
        - voice
      type: object
    ElevenLabsCreateTaskData:
      additionalProperties: false
      description: The created task.
      properties:
        taskId:
          description: Task ID (32 hex digits), used to query the task.
          type: string
      required:
        - taskId
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        API Key created in the DreamTo console, sent as `Authorization: Bearer
        <API Key>`.
      scheme: bearer
      type: http

````

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