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

# Download the last frame

> Download the final JPEG frame requested at task creation.

Available for tasks created through [Ark](/en/api/video-ark) with `return_last_frame: true`. Wait for `status: succeeded` before downloading the JPEG.

Use the task ID and an API key belonging to the account that created it. Like the video file, the frame expires 72 hours after success and returns 410 afterward.


## OpenAPI

````yaml openapi/relay.en.json GET /v1/videos/{task_id}/last-frame
openapi: 3.0.1
info:
  title: AIOHub API
  description: AIOHub public API
  version: 1.0.0
servers:
  - url: https://api.aiohub.org
security:
  - BearerAuth: []
tags:
  - name: List models
  - name: OpenAI Chat
  - name: OpenAI Responses
  - name: Image generation
  - name: OpenAI Images
  - name: Video generation
  - name: Claude Messages
  - name: Gemini API
  - name: OpenAI Embeddings
  - name: Text completions
  - name: OpenAI Audio
  - name: Realtime API
paths:
  /v1/videos/{task_id}/last-frame:
    get:
      tags:
        - Video generation
      summary: Get the last frame
      description: >
        Returns the final frame of the video as JPEG. Available for tasks
        created with `return_last_frame: true`, under the same retention as the
        video file.
      operationId: getVideoLastFrame
      parameters:
        - name: task_id
          in: path
          required: true
          example: task_ADQ5XK6AKWg36WePoJ3sZRyDvWl1ogGZ
          schema:
            type: string
          description: The `id` returned when the task was created
      responses:
        '200':
          description: JPEG image
          headers: {}
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
        '404':
          description: >-
            Task not found, not succeeded, or created without
            `return_last_frame`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
        '410':
          description: The 72 hour retention has passed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameters
              nullable: true
            code:
              type: string
              description: Error code
              nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key (sk-xxx)

````

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