> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lighton.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create embeddings

> This endpoint can be used to convert text chunks into embeddings.

It is a simple proxy forwarding your requests to the desired model.

**Model resolution:**
The `model` field accepts either a model technical name or an alias technical name. If the value matches an alias technical name for the authenticated user's company, the alias routing is used to resolve the effective model (even if a model with the same technical name exists). Otherwise, the model is resolved directly by technical name.

**Input Format:**
- `input`: Text string to convert to embeddings
- `encoding_format`: Format for returned embeddings (float or base64)
- `dimensions`: Optional dimension specification for output embeddings



## OpenAPI

````yaml /api-reference/openapi-v3.yaml post /api/v3/embeddings
openapi: 3.1.0
info:
  title: LightOn API
  version: 3.15.0 (v3)
  description: >-
    LightOn gives you an API to search, parse, and ingest documents at scale.
    Build knowledge-retrieval pipelines without managing vector databases or OCR
    models.
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Facets
    description: Operations about facets
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Files Processing
    description: Operations about files processing
  - name: Users
    description: Operations about users
  - name: API Keys
    description: Operations about API keys
  - name: User Groups
    description: Operations about user groups
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/embeddings:
    post:
      tags:
        - Models
      summary: Create embeddings
      description: >-
        This endpoint can be used to convert text chunks into embeddings.


        It is a simple proxy forwarding your requests to the desired model.


        **Model resolution:**

        The `model` field accepts either a model technical name or an alias
        technical name. If the value matches an alias technical name for the
        authenticated user's company, the alias routing is used to resolve the
        effective model (even if a model with the same technical name exists).
        Otherwise, the model is resolved directly by technical name.


        **Input Format:**

        - `input`: Text string to convert to embeddings

        - `encoding_format`: Format for returned embeddings (float or base64)

        - `dimensions`: Optional dimension specification for output embeddings
      operationId: api_v3_embeddings_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
            examples:
              BasicEmbeddingExample:
                value:
                  model: multilingual-e5-large
                  input: Hello, world!
                summary: Basic embedding example
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
              examples:
                BasicEmbeddingExample:
                  value:
                    model: multilingual-e5-large
                    input: Hello, world!
                  summary: Basic embedding example
          description: ''
        '503':
          description: >-
            API is under maintenance. Check `GET /api/v3/system/status` for
            active periods and retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceMaintenance503'
      security:
        - bearerAuth: []
components:
  schemas:
    EmbeddingsRequest:
      type: object
      description: Request serializer for embeddings endpoint (OpenAI-compatible).
      properties:
        model:
          type: string
          description: >-
            Model to use for generating embeddings, must exist and be configured
            from the admin
        input:
          type: string
          description: Input text to embed, encoded as a string or array of tokens
        encoding_format:
          allOf:
            - $ref: '#/components/schemas/EncodingFormatEnum'
          default: float
          description: |-
            The format to return the embeddings in

            * `float` - float
            * `base64` - base64
        dimensions:
          type: integer
          description: The number of dimensions the resulting output embeddings should have
        user:
          type: string
          description: A unique identifier representing your end-user
      required:
        - input
        - model
    EmbeddingsResponse:
      type: object
      description: Response serializer for embeddings endpoint results.
      properties:
        object:
          type: string
          default: list
          description: The object type, which is always 'list'
        data:
          type: array
          items:
            $ref: '#/components/schemas/EmbeddingObject'
          description: The list of embeddings generated by the model
        model:
          type: string
          description: The model used for generating the embeddings
        usage:
          allOf:
            - $ref: '#/components/schemas/EmbeddingUsage'
          description: Usage statistics for the embeddings request
      required:
        - data
        - model
    ServiceMaintenance503:
      type: object
      description: >-
        Returned by the maintenance middleware when the requested endpoint is
        blocked.
      required:
        - detail
        - error
        - mode
      properties:
        detail:
          type: string
          example: System is under maintenance.
        error:
          type: string
          example: service_maintenance
        mode:
          type: string
          enum:
            - full_shutdown
            - warning_banner
          description: >-
            `full_shutdown` blocks all traffic; `warning_banner` also blocks and
            shows a dismissible toast.
        reason:
          type: string
          description: Operator-supplied maintenance reason, if any.
        started_at:
          type: string
          format: date-time
        endpoint_category_names:
          type: array
          items:
            type: string
          description: >-
            Non-empty only for category-scoped periods. Empty means all
            endpoints are affected.
    EncodingFormatEnum:
      enum:
        - float
        - base64
      type: string
      description: |-
        * `float` - float
        * `base64` - base64
    EmbeddingObject:
      type: object
      description: Serializer for individual embedding objects.
      properties:
        object:
          type: string
          default: embedding
          description: The object type, which is always 'embedding'
        embedding:
          type: array
          items:
            type: number
            format: double
          description: The embedding vector, which is a list of floats
        index:
          type: integer
          description: The index of the embedding in the list of embeddings
      required:
        - embedding
        - index
    EmbeddingUsage:
      type: object
      description: Serializer for token usage information in embeddings.
      properties:
        prompt_tokens:
          type: integer
          description: The number of tokens in the prompt
        total_tokens:
          type: integer
          description: The total number of tokens used by the request
      required:
        - prompt_tokens
        - total_tokens
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````