{
  "openapi": "3.0.4",
  "info": {
    "title": "Queue OpenAPI for minimax/h3/reference-to-video",
    "version": "1.0.0",
    "description": "The OpenAPI schema for the minimax/h3/reference-to-video queue.",
    "x-fal-metadata": {
      "endpointId": "minimax/h3/reference-to-video",
      "category": "image-to-video",
      "playgroundUrl": "<url-removed>",
      "documentationUrl": "<url-removed>",
      "about": "Reference To Video Hailuo 03"
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Fal Key"
      }
    },
    "schemas": {
      "QueueStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "IN_QUEUE",
              "IN_PROGRESS",
              "COMPLETED"
            ]
          },
          "request_id": {
            "type": "string",
            "description": "The request id."
          },
          "response_url": {
            "type": "string",
            "description": "The response url."
          },
          "status_url": {
            "type": "string",
            "description": "The status url."
          },
          "cancel_url": {
            "type": "string",
            "description": "The cancel url."
          },
          "logs": {
            "type": "object",
            "description": "The logs.",
            "additionalProperties": true
          },
          "metrics": {
            "type": "object",
            "description": "The metrics.",
            "additionalProperties": true
          },
          "queue_position": {
            "type": "integer",
            "description": "The queue position."
          }
        },
        "required": [
          "status",
          "request_id"
        ]
      },
      "H3ReferenceToVideoInput": {
        "properties": {
          "duration": {
            "minimum": 5,
            "maximum": 15,
            "title": "Duration",
            "type": "integer",
            "default": 5,
            "description": "The duration of the video in seconds."
          },
          "sync_mode": {
            "title": "Sync Mode",
            "type": "boolean",
            "default": false,
            "description": "Return the generated video as base64 instead of a CDN URL."
          },
          "reference_video_urls": {
            "maxItems": 3,
            "title": "Reference Video URLs",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files."
          },
          "reference_image_urls": {
            "items": {
              "type": "string"
            },
            "maxItems": 9,
            "title": "Reference Image URLs",
            "type": "array",
            "description": "URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files."
          },
          "enable_safety_checker": {
            "title": "Enable Safety Checker",
            "type": "boolean",
            "default": true,
            "description": "If set to true, the safety checker will be enabled."
          },
          "aspect_ratio": {
            "default": "adaptive",
            "title": "Aspect Ratio",
            "type": "string",
            "enum": [
              "adaptive",
              "21:9",
              "16:9",
              "4:3",
              "1:1",
              "3:4",
              "9:16"
            ],
            "description": "The aspect ratio of the generated video."
          },
          "reference_audio_urls": {
            "maxItems": 3,
            "title": "Reference Audio URLs",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files."
          },
          "seed": {
            "title": "Seed",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Random seed. A random seed is selected when omitted."
          },
          "prompt": {
            "maxLength": 50000,
            "minLength": 1,
            "title": "Prompt",
            "type": "string",
            "description": "Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on."
          },
          "resolution": {
            "default": "2K",
            "title": "Resolution",
            "type": "string",
            "enum": [
              "480P",
              "768P",
              "2K",
              "4K"
            ],
            "description": "The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result."
          },
          "prompt_expansion_mode": {
            "title": "Prompt Expansion Mode",
            "default": "balanced",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt."
          }
        },
        "x-fal-order-properties": [
          "prompt",
          "duration",
          "resolution",
          "seed",
          "enable_safety_checker",
          "sync_mode",
          "prompt_expansion_mode",
          "aspect_ratio",
          "reference_image_urls",
          "reference_video_urls",
          "reference_audio_urls"
        ],
        "required": [
          "prompt"
        ],
        "type": "object",
        "title": "ReferenceToVideoHailuo03Input"
      },
      "H3ReferenceToVideoOutput": {
        "properties": {
          "expanded_prompt": {
            "title": "Expanded Prompt",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API."
          },
          "video": {
            "$ref": "#/components/schemas/File",
            "description": "The generated video"
          }
        },
        "x-fal-order-properties": [
          "video",
          "expanded_prompt"
        ],
        "required": [
          "video"
        ],
        "type": "object",
        "title": "ReferenceToVideoHailuo03Output"
      },
      "File": {
        "properties": {
          "url": {
            "title": "Url",
            "type": "string",
            "description": "The URL where the file can be downloaded from."
          },
          "file_name": {
            "title": "File Name",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name of the file. It will be auto-generated if not provided."
          },
          "file_size": {
            "title": "File Size",
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The size of the file in bytes."
          },
          "content_type": {
            "title": "Content Type",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The mime type of the file."
          }
        },
        "x-fal-order-properties": [
          "url",
          "content_type",
          "file_name",
          "file_size"
        ],
        "required": [
          "url"
        ],
        "type": "object",
        "title": "File"
      }
    }
  },
  "paths": {
    "/minimax/h3/reference-to-video/requests/{request_id}/status": {
      "get": {
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Request ID"
            }
          },
          {
            "name": "logs",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "description": "Whether to include logs (`1`) in the response or not (`0`)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueStatus"
                }
              }
            }
          }
        }
      }
    },
    "/minimax/h3/reference-to-video/requests/{request_id}/cancel": {
      "put": {
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Request ID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request was cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether the request was cancelled successfully."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/minimax/h3/reference-to-video": {
      "post": {
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/H3ReferenceToVideoInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueStatus"
                }
              }
            }
          }
        }
      }
    },
    "/minimax/h3/reference-to-video/requests/{request_id}": {
      "get": {
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Request ID"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result of the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/H3ReferenceToVideoOutput"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://queue.fal.run"
    }
  ],
  "security": [
    {
      "apiKeyAuth": []
    }
  ]
}
