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

# Get Speech Task

> Retrieve speech synthesis status and audio results without creating a new task.

Look up the `task_id` returned by [Synthesize Speech](https://docs.jogg.ai/api-reference/v2/Voice/SynthesizeSpeech.md)
in the same authorized Space.

```bash theme={null}
curl --request GET \
  --url 'https://api.jogg.ai/v2/audio/tts/tasks/tts_123' \
  --header 'x-api-key: YOUR_API_KEY'
```

The task status is `processing`, `succeeded`, or `failed`. Successful tasks
include the generated audio `url`, `duration_seconds`, and `subtitle_url` when
available. Failed tasks include `error_message`.

This lookup does not start another synthesis. Keep the original task ID when
checking results after a timeout.


## OpenAPI

````yaml GET /v2/audio/tts/tasks/{task_id}
openapi: 3.0.1
info:
  title: JoggAI OpenAPI v2
  description: >
    JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating
    and managing AI-powered video content.


    ## Authentication

    All API requests require authentication using an API key provided in the
    `x-api-key` header.


    ## Base URL

    Production: https://api.jogg.ai/v2


    ## Rate Limiting

    API calls are subject to rate limiting based on your subscription plan.


    ## Error Handling

    All endpoints return standard HTTP status codes along with detailed error
    messages in the response body.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://api.jogg.ai
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Video
    description: Video creation and management operations
  - name: Avatar
    description: Avatar management and creation operations
  - name: Voice
    description: Voice and timbre management operations
  - name: Asset
    description: Asset management including music, scripts, and uploads
  - name: Template
    description: Template management operations
  - name: Product
    description: Product management operations
  - name: User
    description: User account operations
  - name: Webhook
    description: Webhook endpoint management for event notifications
paths:
  /v2/audio/tts/tasks/{task_id}:
    get:
      tags:
        - Voice
      summary: Get speech task
      description: >-
        Retrieve the status and result of an existing speech task in the
        authorized Space without starting another synthesis.
      operationId: jogg_get_audio_tts_tasks_task_id
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task ID returned by speech synthesis.
          schema:
            type: string
            example: tts_123
      responses:
        '200':
          description: Speech task status. Check the business code before reading data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpeechTaskResponse'
components:
  schemas:
    SpeechTaskResponse:
      allOf:
        - $ref: '#/components/schemas/BaseResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/SpeechTask'
    BaseResponse:
      type: object
      required:
        - code
        - msg
      properties:
        code:
          type: integer
          description: |
            Business status code:
            * 0 - Success
            * 10104 - Record not found
            * 10105 - Invalid API key
            * 18020 - Insufficient credit
            * 18025 - No permission to call APIs
            * 40000 - Parameter error
            * 50000 - System error
          example: 0
        msg:
          type: string
          description: Response message
          example: Success
    SpeechTask:
      type: object
      required:
        - task_id
        - status
        - progress
        - url
        - subtitle_url
        - duration_seconds
      properties:
        task_id:
          type: string
          description: Speech task ID to keep for status queries and retries.
          example: tts_123
        status:
          type: string
          enum:
            - processing
            - succeeded
            - failed
          example: succeeded
        progress:
          type: integer
          minimum: 0
          maximum: 100
          example: 100
        url:
          type: string
          description: Generated audio URL when the task succeeds; otherwise empty.
        subtitle_url:
          type: string
          description: Subtitle file URL when available; otherwise empty.
        duration_seconds:
          type: number
          description: Generated audio duration in seconds.
          example: 2.5
        error_message:
          type: string
          description: Failure details when the task fails.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Obtain your key from the JoggAI dashboard.

````

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