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

# Video Generation

> Generates a video from a text prompt, optionally guided by reference images.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/videos
openapi: 3.1.0
info:
  title: Octen API
  description: >-
    Octen API provides Broad Search, Web Search, Image Search, Video Search,
    Extract, Embeddings, VL Embeddings, Answer, and Deep Research services. The
    Web Search API searches ranked web results with optional filters,
    highlights, and full content. The Image Search API searches for images from
    a text query or an image, with an optional design mode that returns a
    structured summary and a reusable HTML snippet for each result. The Video
    Search API searches for videos from a text query. The Broad Search API
    decomposes a query into multiple sub-queries, searches them in parallel, and
    returns results grouped by sub-query. The Extract API extracts clean content
    from URLs, with optional query-focused highlights, page classification, and
    multimedia resources. The Embeddings API converts text into vector
    representations. The VL Embeddings API converts multimodal inputs into
    vector representations. The Answer API decomposes queries into multiple
    sub-queries for comprehensive search and synthesis. The Deep Research API
    runs a multi-round adaptive research pipeline that produces a structured
    research plan, executes iterative searches, and streams a final long-form
    report.
  version: 1.0.0
servers:
  - url: https://api.octen.ai
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /v1/videos:
    post:
      summary: Generate a video
      description: >-
        Generates a video from a text prompt, optionally guided by reference
        images.
      operationId: post-video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
      responses:
        '200':
          description: Successful video generation response. The task starts in `queued`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: Missing or invalid parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Insufficient balance in account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '404':
          description: Model or resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '429':
          description: Exceeding the rate limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    VideoGenerationRequest:
      type: object
      required:
        - model
        - prompt
      description: JSON request body for the Video Generation API.
      properties:
        model:
          type: string
          enum:
            - minimax/minimax-h3
            - bytedance/seedance-2.5
            - google/veo-3.1
            - google/veo-3.1-fast
            - google/veo-3.1-lite
          description: The model to use.
        prompt:
          type: string
          description: The text description of the video.
        duration:
          type: integer
          description: Video length in seconds. When omitted, the model default applies.
        resolution:
          type: string
          enum:
            - 480p
            - 720p
            - 768p
            - 1080p
            - 2K
          description: Output resolution. When omitted, the model default applies.
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - '21:9'
            - adaptive
          description: >-
            Aspect ratio. `adaptive` lets the model follow the input. When
            omitted, the model default applies.
        frame_images:
          type: array
          items:
            $ref: '#/components/schemas/VideoFrameImage'
          description: Images to use as the first and last frames of the video.
        input_references:
          type: array
          items:
            $ref: '#/components/schemas/VideoInputReference'
          description: >-
            Reference images that guide generation without locking specific
            frames.
        generate_audio:
          type: boolean
          default: true
          description: Whether to generate audio along with the video.
        seed:
          type: integer
          description: Random seed, for more reproducible results.
        extra_params:
          type: object
          additionalProperties: true
          description: >-
            Vendor-specific parameters, passed through to the upstream model
            without validation. Keys that duplicate a unified parameter, or that
            control upstream storage, notification, sample count, or platform
            behavior, are rejected.
    VideoGenerationResponse:
      type: object
      required:
        - id
        - model
        - status
        - created
      properties:
        id:
          type: string
          description: Unique task id, used to download the video.
        model:
          type: string
          description: The model used for this task.
        status:
          type: string
          enum:
            - queued
          description: Task state.
        created:
          type: integer
          description: Unix timestamp in seconds when the task was created.
    OpenAIErrorResponse:
      type: object
      description: Error body in the OpenAI protocol format.
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: A human-readable description of the error.
            type:
              type: string
              description: The error category, e.g. `invalid_request_error`.
            param:
              type: string
              nullable: true
              description: The parameter related to the error, if any.
            code:
              type: string
              nullable: true
              description: A machine-readable error code, if any.
          required:
            - message
            - type
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Business status code. Non-zero values indicate an error.
        msg:
          type: string
          description: A message describing the error.
        request_id:
          type: string
          description: Unique identifier for the request.
      required:
        - code
        - msg
        - request_id
    VideoFrameImage:
      type: object
      required:
        - image
        - frame_type
      properties:
        image:
          type: string
          description: Image URL or base64 data.
        frame_type:
          type: string
          enum:
            - first_frame
            - last_frame
          description: Whether the image is the first or the last frame.
    VideoInputReference:
      type: object
      required:
        - image
      properties:
        image:
          type: string
          description: Image URL or base64 data.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token used for request authentication. Alternatively, you can
        send the API key in the `x-api-key` header. Note: A payment method is
        required to use the API.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key used for request authentication. Alternatively, you can send the
        key as a Bearer token in the `Authorization` header. Note: A payment
        method is required to use the API.

````