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

# Last Frame to Video

> Last frame to video - Specify the last frame image using last_frame

This is the **Grok Video API** last frame to video endpoint. Specify the last frame of the video using `last_frame`. Only supported by `grok-imagine-video-1.5-fast`.

<Callout type="warning">
  **Warning**: NSFW content is not allowed. A single or occasional moderation failure will not incur any charges. However, repeated moderation failures may result in charges.
</Callout>


## OpenAPI

````yaml openapi/en/grok-last-frame-to-video.json POST /grok/generations
openapi: 3.1.0
info:
  title: Grok Video - Last Frame to Video DOCS
  version: 1.0.0
  description: >-
    Grok Last Frame to Video API - Specify the last frame of the video using
    last_frame.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /grok/generations:
    post:
      description: Last frame to video - Specify the last frame image using last_frame
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LastFrameToVideoRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    LastFrameToVideoRequest:
      type: object
      description: Last frame to video request parameters
      properties:
        model:
          type: string
          description: >-
            Model name. Only `grok-imagine-video-1.5-fast` is supported:
            duration 6-30s (6s and 10s are standard durations; 7s and 11s are
            not supported); supports multiple reference images (max 7); supports
            first/last frame control.
          enum:
            - grok-imagine-video-1.5-fast
          default: grok-imagine-video-1.5-fast
          example: grok-imagine-video-1.5-fast
        prompt:
          type: string
          description: Prompt. Supports longer text input.
        aspect_ratio:
          type: string
          default: '16:9'
          enum:
            - '2:3'
            - '3:2'
            - '1:1'
            - '9:16'
            - '16:9'
          description: Video aspect ratio
        video_length:
          type: string
          default: '10'
          description: >-
            Video duration in seconds. Range: 6 to 30, where 6s and 10s are
            standard durations.
        resolution_name:
          type: string
          default: 720p
          enum:
            - 480p
            - 720p
            - 1080p
          description: 'Output resolution. Available options: 480p, 720p.'
        last_frame:
          type: string
          description: >-
            Last frame image URL. Only supported by
            `grok-imagine-video-1.5-fast`. Used to strictly specify the last
            frame of the video.
        hook_url:
          type: string
          description: >-
            Callback URL address. When the task completes or fails,
            notifications will be sent to this address. The notification data
            structure is consistent with the <a href="fetch"
            target="_self">fetch structure</a>. If not set, you need to call the
            <a href="fetch" target="_self">fetch endpoint</a> to query the
            result
          example: https://example.com/callback
      required:
        - prompt
        - last_frame
  responses:
    SuccessResponse:
      description: Request successful
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: jobId
            required:
              - status
              - message
              - data
    400Response:
      description: Parameter error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Authorization failed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        You can obtain your API key from the <a
        href='https://dashboard.ttapi.io' target='_blank'>TTAPI Dashboard</a>.

````