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

# Embeddings

> OpenAI-compatible embeddings endpoint.



## OpenAPI

````yaml post /v3/compat/embeddings
openapi: 3.1.0
info:
  description: Schema-driven generative API that orchestrates LLM-powered workflows.
  title: Task API
  version: 3.0.0
servers:
  - description: Production
    url: https://api.opper.ai
  - description: Local development
    url: http://localhost:8080
security:
  - BearerAuth: []
tags:
  - description: Schema-driven function management and execution
    name: Functions
  - description: OpenAI-compatible chat completions
    name: Chat
  - description: OpenAI Responses API compatible endpoint
    name: Responses
  - description: Google-compatible interactions endpoint
    name: Interactions
  - description: Model registry and capabilities
    name: Models
  - description: Synchronous image generation
    name: Images
  - description: Text-to-speech and speech-to-text
    name: Audio
  - description: Asynchronous video generation
    name: Videos
  - description: Reusable file storage for media inputs and generated outputs
    name: Files
  - description: Async generation status and downloads
    name: Artifacts
  - description: OpenAI-compatible embeddings
    name: Embeddings
  - description: Recorded HTTP request/response generations
    name: Generations
  - description: System health and status
    name: System
  - description: Roundtable endpoint — fan out a query to multiple LLMs and combine results
    name: Roundtable
  - description: Web search, fetch, and other utility tools
    name: Tools
  - description: Caller identity, credits, and usage
    name: Account
paths:
  /v3/compat/embeddings:
    post:
      tags:
        - Compatibility
      summary: Embeddings API
      description: OpenAI-compatible embeddings endpoint.
      operationId: createEmbeddings
      parameters:
        - description: >-
            Function name for tracing and project-level guardrail function-scope
            filtering.
          in: header
          name: X-Opper-Name
          schema:
            type: string
        - description: Parent span ID for distributed tracing context.
          in: header
          name: X-Opper-Parent-Span-Id
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
          description: Successful response
          headers:
            X-Opper-Cost:
              description: Execution cost of the request as a floating-point number.
              schema:
                format: double
                type: number
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
components:
  schemas:
    EmbeddingsRequest:
      properties:
        dimensions:
          type: integer
        encoding_format:
          type: string
        input:
          description: Any value
        model:
          type: string
        user:
          type: string
      required:
        - input
        - model
      type: object
    EmbeddingsResponse:
      properties:
        data:
          items:
            properties:
              embedding:
                items:
                  type: number
                type: array
              index:
                type: integer
              object:
                type: string
            required:
              - object
              - index
              - embedding
            type: object
          type: array
        model:
          type: string
        object:
          type: string
        usage:
          properties:
            prompt_tokens:
              type: integer
            total_tokens:
              type: integer
          required:
            - prompt_tokens
            - total_tokens
          type: object
      required:
        - object
        - data
        - model
        - usage
      type: object
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              description: Any value
            message:
              type: string
          required:
            - code
            - message
          type: object
        meta:
          type: object
      required:
        - error
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http

````