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

# Poll Deck Generation Task Status

> Get the completed deck link and metadata given a task ID.
    Usage:
    1. Use the POST `/v3/generate/deck/task` endpoint to generate a task.
    2. Poll this GET `/v3/generate/deck/task/{task_id}` endpoint to check the status of the task.

    Responses:
    - *200 OK* : If the generated deck is completed. It provides the response including a link to the deck.
    - *202 Accepted* : The deck is still generating. Body is empty. Poll again in ~5 seconds.
    - *404 Not Found* : The task id is not found or not available for your account.
    - *422 Unprocessable Entity* : There is some error with the request.



## OpenAPI

````yaml https://api.flashdocs.ai/openapi.json get /v3/generate/deck/task/{task_id}
openapi: 3.1.0
info:
  title: FlashDocs API
  description: API for FlashDocs application
  version: 1.0.0
servers:
  - url: https://api.flashdocs.ai
    description: Production server
security: []
paths:
  /v3/generate/deck/task/{task_id}:
    get:
      tags:
        - Generate
      summary: Poll Deck Generation Task Status
      description: |-
        Get the completed deck link and metadata given a task ID.
            Usage:
            1. Use the POST `/v3/generate/deck/task` endpoint to generate a task.
            2. Poll this GET `/v3/generate/deck/task/{task_id}` endpoint to check the status of the task.

            Responses:
            - *200 OK* : If the generated deck is completed. It provides the response including a link to the deck.
            - *202 Accepted* : The deck is still generating. Body is empty. Poll again in ~5 seconds.
            - *404 Not Found* : The task id is not found or not available for your account.
            - *422 Unprocessable Entity* : There is some error with the request.
      operationId: check_ready_v3_generate_deck_task__task_id__get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeckGenerationResponse'
        '202':
          description: The deck is still generating. Poll again in ~5 seconds.
        '404':
          description: Task id not found or not available for your account.
        '422':
          description: There is some error with the request.
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    DeckGenerationResponse:
      properties:
        task_id:
          type: string
          title: Task Id
          description: Unique identifier for the task instance of the deck generation.
          example: task_67890
        link_to_deck:
          anyOf:
            - type: string
            - type: 'null'
          title: Link To Deck
          description: URL link to access the generated presentation deck.
          example: https://docs.google.com/presentation/d/abcdefg123456
        runtime:
          type: number
          title: Runtime
          description: Time taken to generate the deck, in seconds.
          example: 4.3778
        success:
          type: boolean
          title: Success
          description: Indicates whether the deck generation was successful.
          example: true
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message in case the generation failed.
          example: ''
      type: object
      required:
        - task_id
        - runtime
        - success
      title: DeckGenerationResponse
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````