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

# Create embeddings

> Input-only embeddings for models with capabilities.embeddings=true. No embedding model is currently enabled. A reviewed model, dimensions, aggregate input bound and input price are required before activation. Float vectors only; batch size and adjustable dimensions depend on the model.



## OpenAPI

````yaml /openapi.json post /v1/embeddings
openapi: 3.1.0
info:
  title: OmniRelay API
  version: 1.0.0
  description: >-
    OpenAI-compatible gateway for reviewed real text models. Access is
    workspace-specific; query your own model list for capabilities and customer
    prices.
servers:
  - url: https://api.omnirelay.ai
security:
  - bearerAuth: []
tags:
  - name: Service
  - name: Models
  - name: Chat
  - name: Management
  - name: Responses
  - name: Embeddings
  - name: Images
  - name: Videos
paths:
  /v1/embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: >-
        Input-only embeddings for models with capabilities.embeddings=true. No
        embedding model is currently enabled. A reviewed model, dimensions,
        aggregate input bound and input price are required before activation.
        Float vectors only; batch size and adjustable dimensions depend on the
        model.
      operationId: createEmbeddings
      parameters:
        - name: X-Gateway-Tags
          in: header
          required: false
          description: >-
            Tags for this call as comma-separated `key=value` pairs, for example
            `client=acme,env=prod`. Merged with the API key's default tags; the
            `tags` body field wins on the same key. `X-OmniRelay-Tags` is the
            same header under its former name and stays accepted.
          schema:
            type: string
          example: client=acme,env=prod
        - name: X-Gateway-Metadata
          in: header
          required: false
          description: >-
            Send `enabled` to receive a `gateway_metadata` block describing what
            the gateway decided. Any other value, or no header, leaves the
            response unchanged. `X-OmniRelay-Metadata` is the same header under
            its former name and stays accepted.
          schema:
            type: string
            enum:
              - enabled
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
      responses:
        '200':
          description: Validated result with settled usage and cost.
          headers:
            X-Request-ID:
              description: >-
                OmniRelay request ID for diagnostics. It is separate from the
                provider trace, header and response IDs.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
        '400':
          description: >-
            Invalid JSON, tags or parameters; unsupported model capabilities; or
            context_length_exceeded. Rejected before dispatch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: unsupported_parameter
                request_id: 2f6c1d0e9a
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: >-
            inference_budget_or_access_denied: wallet, key or platform budget
            cannot cover the reservation; member_budget_exceeded: member cap
            exceeded. Rejected before dispatch.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: insufficient_balance
                request_id: 2f6c1d0e9a
        '403':
          description: >-
            `model_not_allowed`: the API key is limited to other models. Nothing
            is charged.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: model_not_allowed
                request_id: 2f6c1d0e9a
        '404':
          description: >-
            `model_unavailable`: the model does not exist or is disabled in this
            workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: model_unavailable
                request_id: 2f6c1d0e9a
        '413':
          description: >-
            payload_too_large: the request body exceeds 4 MiB (4194304 bytes of
            UTF-8).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: payload_too_large
                request_id: 2f6c1d0e9a
        '429':
          description: 'rate_limited: the effective account request limit was exceeded.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: rate_limited
                request_id: 2f6c1d0e9a
        '502':
          description: >-
            Model provider rejection, transport failure, invalid response or
            missing/invalid usage. A dispatched call may retain a hold pending
            reconciliation; this status does not prove the provider did not
            bill.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            channel_unavailable, live_provider_not_configured,
            live_provider_unavailable, runtime_maintenance, or
            storage_unavailable. Credential and maintenance checks reject before
            dispatch. An ambiguous dispatched request remains pending; do not
            automatically retry a paid call.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: live_provider_not_configured
                request_id: 2f6c1d0e9a
components:
  schemas:
    EmbeddingsRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
        input:
          oneOf:
            - type: string
              minLength: 1
              maxLength: 65536
            - type: array
              minItems: 1
              maxItems: 65536
              items:
                type: integer
                minimum: 0
                maximum: 2147483647
            - type: array
              minItems: 1
              maxItems: 128
              items:
                type: string
                minLength: 1
                maxLength: 65536
            - type: array
              minItems: 1
              maxItems: 128
              items:
                type: array
                minItems: 1
                maxItems: 65536
                items:
                  type: integer
                  minimum: 0
                  maximum: 2147483647
        encoding_format:
          type: string
          enum:
            - float
          default: float
        dimensions:
          type: integer
          minimum: 1
          maximum: 16384
          description: >-
            Requires verified adjustable dimensions on the selected embedding
            model.
        tags:
          type: object
          description: >-
            Tags for this call. At most 10 after merging with the header and the
            key's default tags. Keys are 1 to 64 characters and stored in
            lowercase; values are 1 to 128 characters. Both use only letters,
            digits and `- _ . : /`. Keys starting with `gateway:` or
            `omnirelay:` are reserved. A `tags` field that is not an object is
            ignored.
          additionalProperties:
            type: string
          example:
            client: acme
            project: invoices
    EmbeddingsResponse:
      type: object
      required:
        - object
        - model
        - data
        - usage
        - cost_microusd
      properties:
        object:
          type: string
          enum:
            - list
        model:
          type: string
        data:
          type: array
          items:
            type: object
            required:
              - object
              - index
              - embedding
            properties:
              object:
                type: string
                enum:
                  - embedding
              index:
                type: integer
                minimum: 0
              embedding:
                type: array
                items:
                  type: number
        usage:
          type: object
          properties:
            prompt_tokens:
              type: integer
              minimum: 0
            total_tokens:
              type: integer
              minimum: 0
        cost_microusd:
          type: integer
          description: >-
            Settled customer charge in micro-USD, using frozen prices, token
            partitions, tiers and discount. Round the full sum, apply the
            discount and round up again. This is the final charge, not the
            maximum hold.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              example: model_unavailable
            message:
              type: string
              example: The model does not exist or is disabled.
              description: >-
                Short English description for logs and SDK exceptions. Its
                wording can change; branch on code.
            type:
              type: string
              example: not_found_error
              description: >-
                Error family by HTTP status: invalid_request_error,
                authentication_error, insufficient_quota, permission_error,
                not_found_error, conflict_error, rate_limit_error,
                service_unavailable or api_error.
            param:
              type: string
              maxLength: 200
              description: >-
                Rejected request field path when identifiable; never a parameter
                value. Responses uses native field names.
        request_id:
          type: string
          description: Present on chat completion, Responses and embeddings errors.
  responses:
    Unauthorized:
      description: '`unauthorized`: the API key is missing, revoked, or invalid.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key created in the OmniRelay console. The owner can view it again
        in the console after confirming their identity.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.