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

# Create embeddings

> Embeddings on the OpenRouter-compatible /api/v1 base.


## OpenAPI

```yaml openapi.json post /api/v1/embeddings
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.3.1
servers:
  - url: https://api.plungeai.com
paths:
  /api/v1/embeddings:
    post:
      operationId: post-api-v1-embeddings
      tags:
        - Compat
      summary: Embeddings (proxied to inference-gateway). Same guardrail enforcement as chat completions.
      security:
        - ozkBearer: []
        - skOcean: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EmbeddingsRequest"
      responses:
        "200":
          description: Embeddings result
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EmbeddingsResponse"
        "400":
          description: invalid_json — body is not valid JSON
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
        "401":
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
        "402":
          description: byok_required
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
        "403":
          description: model_not_allowed or content_blocked
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
        "404":
          description: model_not_found — no such model in the catalog
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
        "405":
          description: "method_not_allowed — the path serves one method: the Allow header names it, plus OPTIONS"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
          headers:
            Allow:
              description: The method this path serves, plus OPTIONS
              schema:
                type: string
        "429":
          description: rate_limit_exceeded or spend_cap_exceeded
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CompatError"
components:
  schemas:
    CompatError:
      type: object
      description: "OpenRouter's error envelope, worn by every /api/v1 error (guide 5.0, 5.7): a numeric `code` equal to the HTTP status, the Ocean detail in `metadata`. No X-Error-Code header."
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: The HTTP status
            message:
              type: string
            metadata:
              type: object
              properties:
                error_type:
                  type: string
                  description: "OpenRouter's error type: authentication, payment_required, rate_limit_exceeded, not_found, invalid_request, …"
                ocean_code:
                  type: string
                  description: The /v1 envelope's string error.code
                ocean_type:
                  type: string
                request_id:
                  type: string
                  description: Equals the x-request-id header
              required:
                - error_type
                - ocean_code
                - request_id
              additionalProperties: true
          required:
            - code
            - message
            - metadata
          additionalProperties: true
      required:
        - error
    EmbeddingsRequest:
      type: object
      description: Money plane, ozk_ auth. Same guardrail/cache enforcement as chat completions.
      properties:
        model:
          type: string
          example: openai/text-embedding-3-small
        input:
          description: A string, or an array of strings
          example: The quick brown fox jumps over the lazy dog
      required:
        - model
        - input
      additionalProperties: true
    EmbeddingsResponse:
      type: object
      properties:
        object:
          type: string
        data:
          type: array
          items:
            type: object
        model:
          type: string
        usage:
          type: object
      required:
        - object
        - data
        - model
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
    skOcean:
      type: http
      scheme: bearer
      description: "Legacy sk-ocean- inference key: still accepted on the money plane until the sk-ocean- sunset; new integrations use the ozk_ key"
```
