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

# Remix a Video

> Create a remix of a completed video using a refreshed prompt.



## OpenAPI

````yaml /openapi.json post /v1/videos/{video_id}/remix
openapi: 3.1.0
info:
  title: AIHubMix Gateway API
  description: |
    Unified multi-protocol gateway. Exposes three native shapes side-by-side:
      - OpenAI (`/v1/chat/completions`, `/v1/responses`, ...)
      - Anthropic (`/v1/messages`)
      - Gemini (`/v1beta/models/{model}:generateContent`)
    Each vendor's native SDK connects directly. Gateway-only fields are
    marked with `x-source.authority: gateway`.
  contact:
    name: AIHubMix Team
  version: 2.1.1
  x-upstream:
    vendorSpecs:
      packageVersion: 0.1.1
      installedFrom: npm
    sources:
      openai/official:
        version: '2026-05-31'
        hash: >-
          sha256:a203971a0bc0cd3b903b9488e3ac40eaa161a274dfaf172c1da73eee029147a8
      anthropic/official:
        version: '2026-05-31'
        hash: >-
          sha256:f9d488f9290d78a081bed62fa0c040476b5d009f3db92c06c8e279e69df73fc9
    layers:
      - role: L0-base
        source: avs://openai/official
        protocol: openai
        authority: official
      - role: L0-base
        source: avs://anthropic/official
        protocol: anthropic
        authority: official
      - role: gateway-other
        source: gateway/anthropic-mappings.yml
        protocol: all
        authority: gateway
      - role: horizontal-auth
        source: gateway/auth.yml
        protocol: all
        authority: gateway
      - role: horizontal-errors
        source: gateway/errors.yml
        protocol: all
        authority: gateway
      - role: L3-gateway
        source: gateway/openai-gateway.yml
        protocol: openai
        authority: gateway
      - role: gateway-other
        source: gateway/openai-image-mappings.yml
        protocol: all
        authority: gateway
      - role: gateway-other
        source: gateway/openai-mappings.yml
        protocol: all
        authority: gateway
      - role: L2-passthrough
        source: gateway/openai-passthrough.yml
        protocol: openai
        authority: gateway
servers:
  - url: https://aihubmix.com
    description: Production
  - url: https://api.inferera.com
    description: Backup (use when the primary domain is unreachable)
security:
  - gatewayBearer: []
tags:
  - name: OpenAI Compatible
    description: >-
      OpenAI-compatible endpoints (chat, completions, embeddings, images, audio,
      videos, moderations).
  - name: Anthropic Compatible
    description: Anthropic-native endpoints (messages with Anthropic protocol).
  - name: Google Vertex AI Compatible
    description: Google Gemini / Vertex AI endpoints.
paths:
  /v1/videos/{video_id}/remix:
    post:
      tags:
        - OpenAI Compatible
      summary: Remix a Video
      description: Create a remix of a completed video using a refreshed prompt.
      operationId: CreateVideoRemix
      parameters:
        - name: video_id
          in: path
          description: The identifier of the completed video to remix.
          required: true
          schema:
            example: video_123
            type: string
          x-source:
            from: avs://openai/official
            authority: official
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateVideoRemixBody'
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVideoRemixBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoResource'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        5XX:
          description: Server / upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    CreateVideoRemixBody:
      properties:
        prompt:
          type: string
          maxLength: 32000
          minLength: 1
          description: Updated text prompt that directs the remix generation.
      type: object
      required:
        - prompt
      title: Create video remix request
      description: Parameters for remixing an existing generated video.
      x-source:
        from: avs://openai/official
        authority: official
    VideoResource:
      properties:
        id:
          type: string
          description: Unique identifier for the video job.
        object:
          type: string
          enum:
            - video
          description: The object type, which is always `video`.
          default: video
        model:
          $ref: '#/components/schemas/VideoModel'
          description: The video generation model that produced the job.
        status:
          $ref: '#/components/schemas/VideoStatus'
          description: Current lifecycle status of the video job.
        progress:
          type: integer
          description: Approximate completion percentage for the generation task.
        created_at:
          type: integer
          format: unixtime
          description: Unix timestamp (seconds) for when the job was created.
        completed_at:
          anyOf:
            - type: integer
              format: unixtime
              description: >-
                Unix timestamp (seconds) for when the job completed, if
                finished.
            - type: 'null'
        expires_at:
          anyOf:
            - type: integer
              format: unixtime
              description: >-
                Unix timestamp (seconds) for when the downloadable assets
                expire, if set.
            - type: 'null'
        prompt:
          anyOf:
            - type: string
              description: The prompt that was used to generate the video.
            - type: 'null'
        size:
          $ref: '#/components/schemas/VideoSize'
          description: The resolution of the generated video.
        seconds:
          type: string
          description: >-
            Duration of the generated clip in seconds. For extensions, this is
            the stitched total duration.
        remixed_from_video_id:
          anyOf:
            - type: string
              description: Identifier of the source video if this video is a remix.
            - type: 'null'
        error:
          anyOf:
            - $ref: '#/components/schemas/Error-2'
              description: >-
                Error payload that explains why generation failed, if
                applicable.
            - type: 'null'
      type: object
      required:
        - id
        - object
        - model
        - status
        - progress
        - created_at
        - completed_at
        - expires_at
        - prompt
        - size
        - seconds
        - remixed_from_video_id
        - error
      title: Video job
      description: Structured information describing a generated video job.
      x-source:
        from: avs://openai/official
        authority: official
    GatewayError:
      type: object
      description: |
        OpenAI-compatible error envelope. Top-level `error` object carrying
        `message` / `type` / `param` / `code`. `request_id` lives in the
        `X-Request-Id` response header, not in the body. The legacy `upstream`
        field is no longer emitted.
      x-source:
        from: gateway
        authority: gateway
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
              description: Human-readable error message.
            type:
              type: string
              nullable: true
              description: >
                Error category. OpenAI-compatible values include

                invalid_request_error / authentication_error / permission_error
                /

                not_found_error / rate_limit_error, etc. The upstream value is

                passed through verbatim; the enum is not fixed.
            param:
              type: string
              nullable: true
              description: Name of the offending field, when applicable.
            code:
              nullable: true
              description: |
                Sub-error code. May be a string or integer (the gateway treats
                `code` as an arbitrary type).
    VideoModel:
      anyOf:
        - type: string
        - type: string
          enum:
            - sora-2
            - sora-2-pro
            - sora-2-2025-10-06
            - sora-2-pro-2025-10-06
            - sora-2-2025-12-08
      x-source:
        from: avs://openai/official
        authority: official
    VideoStatus:
      type: string
      enum:
        - queued
        - in_progress
        - completed
        - failed
      x-source:
        from: avs://openai/official
        authority: official
    VideoSize:
      type: string
      enum:
        - 720x1280
        - 1280x720
        - 1024x1792
        - 1792x1024
      x-source:
        from: avs://openai/official
        authority: official
    Error-2:
      properties:
        code:
          type: string
          description: A machine-readable error code that was returned.
        message:
          type: string
          description: A human-readable description of the error that was returned.
      type: object
      required:
        - code
        - message
      title: Error
      description: An error that occurred while generating the response.
      x-source:
        from: avs://openai/official
        authority: official
  securitySchemes:
    gatewayBearer:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Gateway-issued API key, formatted as `sk-gateway-xxxxxxxx`.
        Used by OpenAI-shaped endpoints (/v1/chat/completions, etc.).
      x-source:
        from: gateway
        authority: gateway

````