Generate dense embeddings

no
Summary: Generate dense vector embeddings for the given texts using the specified model. Provide either 'instructions' or both 'task' and 'target' alongside 'texts'.

Original Documentation

Documentation Index#

Fetch the complete documentation index at: https://docs.trychroma.com/llms.txt Use this file to discover all available pages before exploring further.

Generate dense vector embeddings for the given texts using the specified model. Provide either ‘instructions’ or both ’task’ and ’target’ alongside ’texts’.

OpenAPI#

openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /embed:
    post:
      summary: Generate dense embeddings
      description: >-
        Generate dense vector embeddings for the given texts using the specified
        model. Provide either 'instructions' or both 'task' and 'target'
        alongside 'texts'.
      operationId: embed_embed_post
      parameters:
        - name: x-chroma-token
          in: header
          required: true
          schema:
            type: string
          description: Chroma API key for authentication.
        - name: x-chroma-embedding-model
          in: header
          required: true
          schema:
            type: string
            enum:
              - Qwen/Qwen3-Embedding-0.6B
              - BAAI/bge-m3
              - prithivida/Splade_PP_en_v1
              - naver/efficient-splade-VI-BT-large-doc
              - naver/efficient-splade-VI-BT-large-query
          description: The embedding model to use.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - required:
                    - instructions
                - required:
                    - task
                    - target
              description: Request body for embedding endpoints.
              properties:
                texts:
                  items:
                    type: string
                  title: Texts
                  type: array
                task:
                  anyOf:
                    - type: string
                    - type: 'null'
                  title: Task
                target:
                  anyOf:
                    - type: string
                    - type: 'null'
                  title: Target
                instructions:
                  anyOf:
                    - type: string
                    - type: 'null'
                  title: Instructions
                fetch_labels:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                  title: Fetch Labels
              required:
                - texts
              title: EmbedRequestBody
              type: object
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DenseEmbedResponse'
        '400':
          description: >-
            Invalid request (missing headers, unsupported model, or malformed
            body)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication failed (invalid or missing API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Input too large (exceeds model token limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '501':
          description: Operation not supported for this model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DenseEmbedResponse:
      properties:
        embeddings:
          items:
            items:
              type: number
            type: array
          type: array
          title: Embeddings
        num_tokens:
          type: integer
          title: Num Tokens
      type: object
      required:
        - embeddings
        - num_tokens
      title: DenseEmbedResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
      type: object
      required:
        - error
      title: ErrorResponse

Built with Mintlify.

Link last verified June 7, 2026. View original ↗
Source: Chroma Docs
Link last verified: 2026-04-05