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

# Create embeddings

> Create embedding vectors for input text. Billed on input tokens only. When the workspace has [response caching](/billing/caching) enabled, identical repeat requests are served from cache at a discount (see the `X-Omnia-Cache` response header).



## OpenAPI

````yaml /openapi-inference.json post /embeddings
openapi: 3.1.0
info:
  title: Omnia Inference API
  description: >-
    OpenAI-compatible inference endpoints: chat completions, embeddings, rerank,
    and the Responses API. Authenticated with a workspace API key
    (sk_sovereign_...).
  version: 1.0.0
servers:
  - url: https://gateway.omnia-voice.com/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: >-
        Create embedding vectors for input text. Billed on input tokens only.
        When the workspace has [response caching](/billing/caching) enabled,
        identical repeat requests are served from cache at a discount (see the
        `X-Omnia-Cache` response header).
      operationId: createEmbeddings
      parameters:
        - name: X-Omnia-Cache-Control
          in: header
          required: false
          schema:
            type: string
            enum:
              - no-cache
              - no-store
          description: >-
            Per-request cache control (only meaningful when the workspace has
            response caching enabled — it can reduce caching, never enable it).
            `no-cache`: skip the cache and force a fresh model run, refreshing
            the stored copy. `no-store`: fresh run AND keep this response out of
            cache storage entirely. Either way the response carries
            `X-Omnia-Cache: bypass`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  example: Qwen/Qwen3-Embedding-8B
                input:
                  description: A string, or an array of strings to embed in one request.
                encoding_format:
                  type: string
                  description: The format of the returned embeddings (e.g. float).
                dimensions:
                  type: integer
                  description: >-
                    The number of dimensions the output embeddings should have,
                    if the model supports it.
                user:
                  type: string
                  description: A stable identifier for the end user.
      responses:
        '200':
          description: A list of embeddings.
          headers:
            X-Omnia-Cache:
              schema:
                type: string
                enum:
                  - hit
                  - miss
                  - bypass
              description: >-
                Present when the workspace has response caching enabled: `hit`
                means this response was served from cache (billed at the cache
                discount), `miss` means it was generated fresh and may be
                stored, `bypass` means the request's `X-Omnia-Cache-Control`
                header forced a fresh run. Absent when caching is off.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientBalance'
        '404':
          $ref: '#/components/responses/ModelNotFound'
components:
  schemas:
    EmbeddingList:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            type: object
            properties:
              object:
                type: string
                example: embedding
              index:
                type: integer
              embedding:
                type: array
                items:
                  type: number
        model:
          type: string
        usage:
          $ref: '#/components/schemas/Usage'
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
  responses:
    BadRequest:
      description: Missing a required field (e.g. model, messages/input/query/documents).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, malformed, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: invalid_request_error
              code: invalid_api_key
    InsufficientBalance:
      description: Your wallet can't cover the request's worst-case cost.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Insufficient balance. Please top up your wallet.
              type: insufficient_quota
              code: insufficient_balance
    ModelNotFound:
      description: The model is not offered (or the id is wrong).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: The model 'x' does not exist or is not available.
              type: invalid_request_error
              code: model_not_found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your workspace API key, e.g. sk_sovereign_..., sent as Authorization:
        Bearer <key>.

````