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

# Create embeddings

> Creates an embedding vector representing the input text. Passes through any additional parameters supported by the chosen model.



## OpenAPI

````yaml /api-reference/openapi.json post /embeddings
openapi: 3.1.0
info:
  title: LLM Router API
  description: >-
    Intelligent AI Gateway with smart routing, Skills, Zero Data Retention, and
    cost optimization. Fully compatible with the OpenAI API.
  version: 1.0.0
  contact:
    name: LLM Router Support
    url: https://docs.llmrouter.app
servers:
  - url: https://api.llmrouter.app/v1
    description: Production Server
security:
  - bearerAuth: []
paths:
  /embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: >-
        Creates an embedding vector representing the input text. Passes through
        any additional parameters supported by the chosen model.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingRequest'
      responses:
        '200':
          description: Successful embedding response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingResponse'
components:
  schemas:
    EmbeddingRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
        input:
          type:
            - string
            - array
      additionalProperties: true
      description: >-
        Accepts any additional properties supported by the upstream embedding
        model.
    EmbeddingResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                example: embedding
              embedding:
                type: array
                items:
                  type: number
                description: The embedding vector as an array of floating point numbers
              index:
                type: integer
                description: The index of the embedding in the input list
            required:
              - object
              - embedding
              - index
        model:
          type: string
          example: openai/text-embedding-3-small
          description: The model used to generate the embeddings
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
              description: Number of tokens in the input prompt
            total_tokens:
              type: integer
              description: Total number of tokens used
            cost:
              type:
                - string
                - 'null'
              nullable: true
              description: >-
                The cost of the embedding request in the smallest currency unit
                (e.g. USD cents)
          required:
            - prompt_tokens
            - total_tokens
      required:
        - object
        - data
        - model
        - usage
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: LLM Router API Key (e.g., sk-llmr-...)

````