{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octen-ai/json-schema/octen-ai-vlembedding-request-schema.json",
  "title": "VLEmbeddingRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/octen-ai-vl-embedding-api-openapi.yml#/components/schemas/VLEmbeddingRequest",
  "type": "object",
  "required": [
    "model",
    "input"
  ],
  "properties": {
    "model": {
      "type": "string",
      "enum": [
        "octen-vl-embedding",
        "octen-vl-embedding-large"
      ],
      "description": "The multimodal embedding model used for this request."
    },
    "input": {
      "$ref": "#/$defs/VLEmbeddingInput"
    },
    "enable_fusion": {
      "type": "boolean",
      "default": false,
      "description": "Whether to generate a fused embedding. When `true`, all elements in `contents` are fused into a single vector; when `false`, each element produces an independent vector."
    },
    "dimension": {
      "type": "integer",
      "description": "The dimensionality of the output embedding vectors. Defaults to the model's max dimension (octen-vl-embedding: 2048, octen-vl-embedding-large: 4096). Any positive integer ≤ the model's max dimension is allowed."
    },
    "fps": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 1.0,
      "description": "Frames sampled per second of video. For example, `0.5` samples one frame every two seconds. Lower values sample fewer frames and reduce video token consumption. Each video is sampled to at most 64 frames."
    },
    "instruct": {
      "type": "string",
      "default": "Represent the user's input.",
      "description": "Custom task description used to guide the model in understanding the query intent. Its length counts toward `input_tokens` and shares the 10,000-character total limit with `contents`."
    }
  },
  "$defs": {
    "VLEmbeddingContent": {
      "type": "object",
      "description": "A single content element. Each object should provide exactly one of `text`, `image`, or `video`. For multiple images, include multiple content objects (one image per object).",
      "properties": {
        "text": {
          "type": "string",
          "description": "Text input. Maximum 10,000 characters per entry."
        },
        "image": {
          "type": "string",
          "description": "Image input. Supports a URL or a Base64 string. Maximum 5MB per image. Supported formats: JPEG, PNG, WEBP, BMP, TIFF, ICO, DIB, ICNS, SGI."
        },
        "video": {
          "type": "string",
          "description": "Video input. URL only. Maximum 50MB per file. Supported formats: MP4, AVI, MOV."
        }
      }
    },
    "VLEmbeddingInput": {
      "type": "object",
      "required": [
        "contents"
      ],
      "description": "The multimodal content to be vectorized. Supports text, images, videos, and combinations. Maximum total elements per request: 20. Maximum images per request: 5. Maximum videos per request: 1.",
      "properties": {
        "contents": {
          "type": "array",
          "maxItems": 20,
          "description": "The list of content elements to process.",
          "items": {
            "$ref": "#/$defs/VLEmbeddingContent"
          }
        }
      }
    }
  }
}