Mixedbread · Schema

Mixedbread Embedding

Schema for the Mixedbread Embeddings API request and response objects. Covers POST /v1/embeddings.

AIArtificial IntelligenceEmbeddingsRerankingSearchRetrievalRAGVector DatabaseMultimodalParsingOpen Weights
View JSON Schema on GitHub

JSON Schema

mixedbread-embedding-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api-evangelist.com/schemas/mixedbread-ai/mixedbread-embedding-schema.json",
  "title": "Mixedbread Embedding",
  "description": "Schema for the Mixedbread Embeddings API request and response objects. Covers POST /v1/embeddings.",
  "type": "object",
  "definitions": {
    "EmbeddingRequest": {
      "type": "object",
      "description": "Request body for creating embeddings.",
      "required": ["model", "input"],
      "properties": {
        "model": {
          "type": "string",
          "description": "Embedding model identifier (e.g. mixedbread-ai/mxbai-embed-large-v1, mixedbread-ai/deepset-mxbai-embed-de-large-v1, mixedbread-ai/mxbai-embed-xsmall-v1, mixedbread-ai/wholembed-v3)."
        },
        "input": {
          "description": "Single string, array of strings, or array of image/text objects to embed.",
          "oneOf": [
            {"type": "string"},
            {"type": "array", "items": {"type": "string"}},
            {"type": "array", "items": {"type": "object"}}
          ]
        },
        "dimensions": {
          "type": "integer",
          "description": "Matryoshka truncation dimension. Optional."
        },
        "prompt": {
          "type": "string",
          "description": "Instruction prefix applied to inputs (e.g. 'Represent this sentence for searching relevant passages')."
        },
        "encoding_format": {
          "description": "Encoding(s) requested.",
          "oneOf": [
            {"type": "string", "enum": ["float", "float32", "int8", "uint8", "binary", "ubinary", "base64"]},
            {"type": "array", "items": {"type": "string"}}
          ]
        },
        "normalized": {
          "type": "boolean",
          "description": "Whether to L2-normalize vectors."
        }
      }
    },
    "Embedding": {
      "type": "object",
      "required": ["object", "embedding", "index"],
      "properties": {
        "object": {"type": "string", "const": "embedding"},
        "index": {"type": "integer"},
        "embedding": {
          "description": "Dense vector (or encoded representation).",
          "oneOf": [
            {"type": "array", "items": {"type": "number"}},
            {"type": "string", "description": "Base64-encoded vector"},
            {"type": "object", "description": "Multi-encoding embedding keyed by encoding format"}
          ]
        }
      }
    },
    "EmbeddingResponse": {
      "type": "object",
      "required": ["model", "data", "usage"],
      "properties": {
        "object": {"type": "string", "const": "list"},
        "model": {"type": "string"},
        "data": {"type": "array", "items": {"$ref": "#/definitions/Embedding"}},
        "usage": {
          "type": "object",
          "properties": {
            "prompt_tokens": {"type": "integer"},
            "total_tokens": {"type": "integer"}
          }
        },
        "normalized": {"type": "boolean"},
        "encoding_format": {
          "oneOf": [
            {"type": "string"},
            {"type": "array", "items": {"type": "string"}}
          ]
        },
        "dimensions": {"type": "integer"}
      }
    }
  },
  "oneOf": [
    {"$ref": "#/definitions/EmbeddingRequest"},
    {"$ref": "#/definitions/EmbeddingResponse"}
  ]
}