{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-embeddings-request-schema.json",
  "title": "EmbeddingsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-embeddings-api-openapi.yml#/components/schemas/EmbeddingsRequest",
  "properties": {
    "model": {
      "type": "string",
      "title": "Model",
      "description": "Hugging Face embedding id, or 'auto'. Auto deterministically serves BAAI/bge-small-en-v1.5; other models remain addressable by explicit id."
    },
    "input": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "items": {
            "items": {
              "type": "integer"
            },
            "type": "array"
          },
          "type": "array"
        }
      ],
      "title": "Input"
    },
    "omit_raw_result": {
      "type": "boolean",
      "title": "Omit Raw Result",
      "description": "Compact decision-first face (decision, vector metadata, next_call, weight, receipt) with the vectors omitted. Defaults false here for REST compatibility.",
      "default": false
    },
    "encoding_format": {
      "type": "string",
      "enum": [
        "float",
        "base64"
      ],
      "title": "Encoding Format",
      "description": "OpenAI-compatible embedding encoding. 'float' returns JSON number arrays; 'base64' returns a base64 string of the vector's little-endian float32 bytes, which is what OpenAI SDK decoders expect.",
      "default": "float"
    },
    "task_hint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Task Hint"
    },
    "namespace": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 256
        },
        {
          "type": "null"
        }
      ],
      "title": "Namespace",
      "description": "Private learned-routing namespace used by model='auto'."
    },
    "routing_mode": {
      "type": "string",
      "enum": [
        "default",
        "strict"
      ],
      "title": "Routing Mode",
      "description": "default permits the bounded same-kind fallback; strict requires a live private proof.",
      "default": "default"
    },
    "prefer_warm": {
      "type": "boolean",
      "title": "Prefer Warm",
      "description": "Prefer a resident compatible specialist when model='auto'.",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "model",
    "input"
  ]
}