openapi: 3.1.0 info: title: Mixedbread admin Embeddings API version: 0.1.0 description: Mixedbread admin endpoints extracted from the canonical OpenAPI spec at https://api.mixedbread.com/openapi.json servers: - url: https://api.mixedbread.com description: mixedbread ai production server - url: https://api.dev.mixedbread.com description: mixedbread ai development server - url: http://127.0.0.1:8000 description: mixedbread local server - url: http://localhost:8000 description: mixedbread local server tags: - name: Embeddings paths: /v1/embeddings: post: summary: Create embeddings for text and images description: "Create embeddings for text or images using the specified model, encoding format, and normalization.\n\nArgs:\n params: The parameters for creating embeddings.\n\nReturns:\n EmbeddingCreateResponse: The response containing the embeddings." operationId: create_embeddings requestBody: content: application/json: schema: $ref: '#/components/schemas/EmbeddingCreateParams' description: The parameters for creating embeddings required: true responses: '200': description: The embeddings for the input text or image content: application/json: schema: $ref: '#/components/schemas/EmbeddingCreateResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - ApiKeyAuth: [] tags: - Embeddings components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError Usage: properties: prompt_tokens: type: integer title: Prompt Tokens description: The number of tokens used for the prompt total_tokens: type: integer title: Total Tokens description: The total number of tokens used completion_tokens: anyOf: - type: integer - type: 'null' title: Completion Tokens description: The number of tokens used for the completion type: object required: - prompt_tokens - total_tokens title: Usage EmbeddingItem: anyOf: - items: type: number type: array - items: type: integer type: array - type: string title: EmbeddingItem description: The encoded embedding data by encoding format. examples: - 0.1 - 0.2 - 0.3 HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError EncodingFormat: type: string enum: - float - float16 - base64 - binary - ubinary - int8 - uint8 title: EncodingFormat description: Enumeration of encoding formats. EmbeddingCreateParams: properties: model: type: string maxLength: 500 minLength: 1 title: Model description: The model to use for creating embeddings. examples: - mixedbread-ai/mxbai-embed-large-v1 input: anyOf: - type: string maxLength: 64000 minLength: 1 - items: type: string type: array maxItems: 256 minItems: 1 title: Input description: The input to create embeddings for. dimensions: anyOf: - type: integer exclusiveMinimum: 0.0 - type: 'null' title: Dimensions description: The number of dimensions to use for the embeddings. examples: - 768 prompt: anyOf: - type: string maxLength: 32000 minLength: 1 - type: 'null' title: Prompt description: The prompt to use for the embedding creation. examples: - Provide a detailed summary of the following text. normalized: type: boolean title: Normalized description: Whether to normalize the embeddings. default: true examples: - true encoding_format: anyOf: - $ref: '#/components/schemas/EncodingFormat' - items: $ref: '#/components/schemas/EncodingFormat' type: array title: Encoding Format description: The encoding format(s) of the embeddings. Can be a single format or a list of formats. default: float examples: - float - - int8 - float type: object required: - model - input title: EmbeddingCreateParams description: Parameters for creating embeddings. MultiEncodingEmbedding: properties: embedding: $ref: '#/components/schemas/MultipleEncodingsEmbeddingItem' description: The encoded embedding data by encoding format.Returned, if more than one encoding format is used. examples: - float: - 0.1 - 0.2 - 0.3 int8: - 1 - 2 - 3 index: type: integer title: Index description: The index of the embedding. examples: - 0 object: type: string const: embedding_dict title: Object description: The object type of the embedding. default: embedding_dict examples: - embedding_dict type: object required: - embedding - index title: MultiEncodingEmbedding MultipleEncodingsEmbeddingItem: properties: float: items: type: number type: array title: Float int8: items: type: integer type: array title: Int8 uint8: items: type: integer type: array title: Uint8 binary: items: type: integer type: array title: Binary ubinary: items: type: integer type: array title: Ubinary base64: type: string title: Base64 type: object title: MultipleEncodingsEmbeddingItem Embedding: properties: embedding: $ref: '#/components/schemas/EmbeddingItem' description: The encoded embedding. index: type: integer title: Index description: The index of the embedding. examples: - 0 object: type: string const: embedding title: Object description: The object type of the embedding. default: embedding examples: - embedding type: object required: - embedding - index title: Embedding EmbeddingCreateResponse: properties: usage: $ref: '#/components/schemas/Usage' description: The usage of the model examples: - completion_tokens: 10 prompt_tokens: 10 total_tokens: 20 model: type: string title: Model description: The model used data: anyOf: - items: $ref: '#/components/schemas/Embedding' type: array - items: $ref: '#/components/schemas/MultiEncodingEmbedding' type: array title: Data description: The created embeddings. object: type: string const: list title: Object description: The object type of the response default: list normalized: type: boolean title: Normalized description: Whether the embeddings are normalized. examples: - true encoding_format: anyOf: - $ref: '#/components/schemas/EncodingFormat' - items: $ref: '#/components/schemas/EncodingFormat' type: array title: Encoding Format description: The encoding formats of the embeddings. examples: - float dimensions: anyOf: - type: integer - type: 'null' title: Dimensions description: The number of dimensions used for the embeddings. examples: - 768 type: object required: - usage - model - data - normalized - encoding_format - dimensions title: EmbeddingCreateResponse securitySchemes: ApiKeyAuth: type: http description: Api key to access Mixedbreads API scheme: bearer