Veo3.1-Pro Video Generation

  • Veo 3.1 Generate Preview supports text-to-video, first-frame image-to-video and more
  • Async processing, use returned task ID to query status
  • Generated video links are valid for 24 hours

OpenAPI

````yaml en/api-manual/video-series/veo3.1/veo-3.1-generate-preview-generate.json post /v1/videos/generations openapi: 3.1.0 info: title: Veo-3.1-Generate-Preview API description: Create video generation tasks using AI models license: name: MIT version: 1.0.0 servers: - url: https://ai.odkkk.com/apiv1 description: Production security: - bearerAuth: [] tags: - name: Video Generation description: AI video generation APIs paths: /v1/videos/generations: post: tags: - Video Generation summary: Veo-3.1-Generate-Preview API description: >- - Veo 3.1 Generate Preview supports text-to-video, first-frame image-to-video and more

    - Async processing, use returned task ID to [query
    status](/en/api-manual/task-management/get-task-detail)

    - Generated video links are valid for 24 hours
  operationId: createVideoGeneration
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '#/components/schemas/VideoGenerationRequest'
        examples:
          text_to_video:
            summary: Text-to-Video
            value:
              model: veo-3.1-generate-preview
              prompt: A cat playing piano
  responses:
    '200':
      description: Task created successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VideoGenerationResponse'
    '400':
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '401':
      description: Unauthorized, invalid or expired token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '402':
      description: Insufficient quota, recharge required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '403':
      description: Access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '404':
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '429':
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '500':
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

components: schemas: VideoGenerationRequest: type: object required: - model - prompt properties: model: type: string default: veo-3.1-generate-preview prompt: type: string description: Prompt, max 2000 tokens maxLength: 2000 image_urls: type: array description: Reference images, max 2, max 10MB each items: type: string format: uri maxItems: 2 generation_type: type: string description: >- Mode:

        - `TEXT`: Text-to-video

        - `FIRST&LAST`: First-last frame, 1-2 images

        - `REFERENCE`: Reference image, max 3 images, duration fixed at 8s,
        aspect ratio fixed at 16:9, except `generate_audio`, other advanced
        params not supported
      enum:
        - TEXT
        - FIRST&LAST
        - REFERENCE
    aspect_ratio:
      type: string
      description: Aspect ratio, default `16:9`
      enum:
        - '16:9'
        - '9:16'
    generate_audio:
      type: boolean
      description: Generate audio (extra cost), default `true`
    duration:
      type: integer
      description: Duration (seconds), default `4`
      enum:
        - 4
        - 6
        - 8
    'n':
      type: integer
      description: Number of videos, default `1`
      minimum: 1
      maximum: 4
    quality:
      type: string
      description: Resolution, default `720p`
      enum:
        - 720p
        - 1080p
    seed:
      type: integer
      minimum: 1
      maximum: 4294967295
    negative_prompt:
      type: string
    person_generation:
      type: string
      description: >-
        Person generation control, default `allow_adult`. `allow_adult`:
        allow adults only; `dont_allow`: no people/faces
      enum:
        - allow_adult
        - dont_allow
    resize_mode:
      type: string
      description: Resize mode (I2V only), default `pad`
      enum:
        - pad
        - crop
    callback_url:
      type: string
      format: uri
VideoGenerationResponse:
  type: object
  properties:
    created:
      type: integer
      example: 1757169743
    id:
      type: string
      example: task-unified-1757169743-7cvnl5zw
    model:
      type: string
      example: veo-3.1-generate-preview
    status:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
ErrorResponse:
  type: object
  properties:
    error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        type:
          type: string

securitySchemes: bearerAuth: type: http scheme: bearer

````


To find navigation and other pages in this documentation, fetch the llms.txt file at: https://ai.odkkk.com/apiv1/docs/llms.txt