> ## 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.

# Get task

> Returns the state and result of a task by `taskId`. When `data.state` is `success`, download the WAV audio from `data.response.resultUrls`; when it is `fail`, `data.failCode` / `data.failMsg` give the reason. Poll about every 5 seconds; generation usually takes a few seconds to a minute, longer for long texts.



## OpenAPI

````yaml /openapi/en/gemini-3-8-flash-lite-tts.json get /api/v1/jobs/recordInfo
openapi: 3.1.0
info:
  description: >-
    Google's cost-efficient text-to-speech model for high-volume dubbing,
    content creation and voice agents; same interface as Flash TTS, output as
    WAV.
  title: Gemini 3.8 Flash Lite TTS
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Gemini 3.8 Flash Lite TTS
paths:
  /api/v1/jobs/recordInfo:
    get:
      tags:
        - Gemini 3.8 Flash Lite TTS
      summary: Get task
      description: >-
        Returns the state and result of a task by `taskId`. When `data.state` is
        `success`, download the WAV audio from `data.response.resultUrls`; when
        it is `fail`, `data.failCode` / `data.failMsg` give the reason. Poll
        about every 5 seconds; generation usually takes a few seconds to a
        minute, longer for long texts.
      operationId: geminiTTSRecordInfo
      parameters:
        - description: 'Task ID: `data.taskId` returned by createTask.'
          example: 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
          explode: false
          in: query
          name: taskId
          required: true
          schema:
            examples:
              - 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                Waiting:
                  description: The task is created and waiting.
                  summary: Waiting
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
                      model: gemini-3.8-flash-lite-tts
                      state: waiting
                      param: >-
                        {"callBackUrl":"https://your-domain.com/api/callback","input":"{\"temperature\":1,\"speakers\":[{\"speaker_id\":\"Speaker
                        1\",\"voice_name\":\"Fola\"},{\"speaker_id\":\"Speaker
                        2\",\"voice_name\":\"Zephyr\"}],\"dialogue_turns\":[{\"speaker_id\":\"Speaker
                        1\",\"text\":\"Hello there. \\u003claugh\\u003e That
                        works.\",\"style\":\"Speak like a tired night-shift
                        radio host, slow and dry.\"},{\"speaker_id\":\"Speaker
                        2\",\"text\":\"Wait, did you hear that?
                        \\u003cgasp\\u003e I think it actually
                        worked.\",\"style\":\"Bright and curious, slightly
                        faster.\"}]}","model":"gemini-3.8-flash-lite-tts"}
                      resultJson: null
                      failCode: null
                      failMsg: null
                      costTime: null
                      completeTime: null
                      createTime: 1794911371000
                      updateTime: 1794911376000
                Generating:
                  description: The audio is being generated; query again later.
                  summary: Generating
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
                      model: gemini-3.8-flash-lite-tts
                      state: generating
                      param: >-
                        {"callBackUrl":"https://your-domain.com/api/callback","input":"{\"temperature\":1,\"speakers\":[{\"speaker_id\":\"Speaker
                        1\",\"voice_name\":\"Fola\"},{\"speaker_id\":\"Speaker
                        2\",\"voice_name\":\"Zephyr\"}],\"dialogue_turns\":[{\"speaker_id\":\"Speaker
                        1\",\"text\":\"Hello there. \\u003claugh\\u003e That
                        works.\",\"style\":\"Speak like a tired night-shift
                        radio host, slow and dry.\"},{\"speaker_id\":\"Speaker
                        2\",\"text\":\"Wait, did you hear that?
                        \\u003cgasp\\u003e I think it actually
                        worked.\",\"style\":\"Bright and curious, slightly
                        faster.\"}]}","model":"gemini-3.8-flash-lite-tts"}
                      resultJson: null
                      failCode: null
                      failMsg: null
                      costTime: null
                      completeTime: null
                      createTime: 1794911371000
                      updateTime: 1794911376000
                Succeeded:
                  description: '`response.resultUrls` holds the WAV audio links.'
                  summary: Succeeded
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
                      model: gemini-3.8-flash-lite-tts
                      state: success
                      param: >-
                        {"callBackUrl":"https://your-domain.com/api/callback","input":"{\"temperature\":1,\"speakers\":[{\"speaker_id\":\"Speaker
                        1\",\"voice_name\":\"Fola\"},{\"speaker_id\":\"Speaker
                        2\",\"voice_name\":\"Zephyr\"}],\"dialogue_turns\":[{\"speaker_id\":\"Speaker
                        1\",\"text\":\"Hello there. \\u003claugh\\u003e That
                        works.\",\"style\":\"Speak like a tired night-shift
                        radio host, slow and dry.\"},{\"speaker_id\":\"Speaker
                        2\",\"text\":\"Wait, did you hear that?
                        \\u003cgasp\\u003e I think it actually
                        worked.\",\"style\":\"Bright and curious, slightly
                        faster.\"}]}","model":"gemini-3.8-flash-lite-tts"}
                      resultJson: >-
                        {"resultUrls":["https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"],"resultObject":null}
                      failCode: null
                      failMsg: null
                      costTime: 12
                      completeTime: 1794911383000
                      createTime: 1794911371000
                      updateTime: 1794911383000
                      response:
                        resultUrls:
                          - >-
                            https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t
                        resultObject: null
                Unknown task (422):
                  description: >-
                    The task ID does not exist, belongs to another account or
                    has expired.
                  summary: Unknown task (422)
                  value:
                    code: 422
                    msg: recordInfo is null
                    data: null
                Failed:
                  description: '`failCode` / `failMsg` give the reason; not charged.'
                  summary: Failed
                  value:
                    code: 200
                    msg: success
                    data:
                      taskId: 5e2a9c7f13b84d06a8f1c3e5b7d9a2c4
                      model: gemini-3.8-flash-lite-tts
                      state: fail
                      param: >-
                        {"callBackUrl":"https://your-domain.com/api/callback","input":"{\"temperature\":1,\"speakers\":[{\"speaker_id\":\"Speaker
                        1\",\"voice_name\":\"Fola\"},{\"speaker_id\":\"Speaker
                        2\",\"voice_name\":\"Zephyr\"}],\"dialogue_turns\":[{\"speaker_id\":\"Speaker
                        1\",\"text\":\"Hello there. \\u003claugh\\u003e That
                        works.\",\"style\":\"Speak like a tired night-shift
                        radio host, slow and dry.\"},{\"speaker_id\":\"Speaker
                        2\",\"text\":\"Wait, did you hear that?
                        \\u003cgasp\\u003e I think it actually
                        worked.\",\"style\":\"Bright and curious, slightly
                        faster.\"}]}","model":"gemini-3.8-flash-lite-tts"}
                      resultJson: ''
                      failCode: '400'
                      failMsg: >-
                        The consent recording does not match the reference
                        voice.
                      costTime: 3
                      completeTime: 1794911374000
                      createTime: 1794911371000
                      updateTime: 1794911383000
              schema:
                $ref: '#/components/schemas/GeminiTTSRecordInfoResponse'
          description: >-
            Always HTTP 200. With `code` `200`, `data` is the task (whether the
            task succeeded is `data.state`); any other `code` is an error with
            `data` `null`.
          headers:
            X-Request-Id:
              description: ID of this request; include it when reporting issues.
              schema:
                type: string
components:
  schemas:
    GeminiTTSRecordInfoResponse:
      additionalProperties: false
      description: Response of recordInfo; always HTTP 200.
      properties:
        code:
          description: >-
            Result code: `200` success; `401` missing or invalid API Key; `422`
            unknown task (`msg: recordInfo is null`); `429` too many requests;
            `500` server error.
          format: int64
          type: integer
        msg:
          description: 'Message: `success`, or the English reason of an error.'
          type: string
        data:
          $ref: '#/components/schemas/GeminiTTSTaskRecord'
          description: The task; `null` on error.
      required:
        - code
        - msg
        - data
      type: object
    GeminiTTSTaskRecord:
      additionalProperties: false
      description: A task, as returned by the query endpoint and the callback.
      properties:
        taskId:
          description: Task ID.
          type: string
        model:
          description: Model name of the task.
          type: string
        state:
          description: >-
            Task state; `success` and `fail` are final.


            **Allowed values:**

            - `waiting`: Created and waiting to start

            - `queuing`: Queued

            - `generating`: Generating

            - `success`: Succeeded (final); the audio links are in
            `response.resultUrls`

            - `fail`: Failed (final); the reason is in `failCode` / `failMsg`;
            not charged
          enum:
            - waiting
            - queuing
            - generating
            - success
            - fail
          type: string
        param:
          description: >-
            The create request as a JSON string with `model`, `callBackUrl` (if
            any) and `input`; `input` is itself a JSON string and needs a second
            parse.
          type: string
        resultJson:
          description: >-
            Result JSON string such as
            `{"resultUrls":["https://..."],"resultObject":null}`; `null` until
            the task finishes and an empty string on failure. `response` holds
            the parsed value.
          type:
            - string
            - 'null'
        failCode:
          description: >-
            Failure code (a numeric string such as `"400"`); `null` unless the
            task failed.
          type:
            - string
            - 'null'
        failMsg:
          description: Failure reason (English); `null` unless the task failed.
          type:
            - string
            - 'null'
        costTime:
          description: Generation time in seconds; `null` until the task finishes.
          format: int64
          type:
            - integer
            - 'null'
        completeTime:
          description: >-
            Completion time as Unix milliseconds; `null` until the task
            finishes.
          format: int64
          type:
            - integer
            - 'null'
        createTime:
          description: Creation time as Unix milliseconds.
          format: int64
          type: integer
        updateTime:
          description: Last update time as Unix milliseconds.
          format: int64
          type: integer
        response:
          $ref: '#/components/schemas/GeminiTTSTaskResults'
          description: The parsed result; only present when the task succeeded.
      required:
        - taskId
        - model
        - state
        - param
        - resultJson
        - failCode
        - failMsg
        - costTime
        - completeTime
        - createTime
        - updateTime
      type: object
    GeminiTTSTaskResults:
      additionalProperties: false
      description: Task result.
      properties:
        resultUrls:
          description: >-
            Download links of the generated audio (WAV, 16-bit PCM, 24 kHz,
            mono). They expire (after about 14 days); download and keep the
            audio promptly.
          items:
            type: string
          type: array
        resultObject:
          description: Always `null` for speech tasks.
          type: 'null'
      required:
        - resultUrls
        - resultObject
      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.