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

# Create embeddings

> OpenAI-compatible. The PII firewall never applies here, because pseudonymizing
text changes the vectors it produces, so send only text you are willing to embed
as it stands.



## OpenAPI

````yaml /api-reference/openapi.json post /embeddings
openapi: 3.1.0
info:
  title: Akumi
  version: 0.0.1
servers:
  - url: https://api.akumi.eu/v1
    description: Production
security:
  - http: []
tags:
  - name: Audit log
  - name: Chat completions
  - name: Embeddings
  - name: Models
  - name: Recall
  - name: Scores
paths:
  /embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: >-
        OpenAI-compatible. The PII firewall never applies here, because
        pseudonymizing

        text changes the vectors it produces, so send only text you are willing
        to embed

        as it stands.
      operationId: v1.embeddings.create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                          const: embedding
                        index:
                          type: integer
                        embedding:
                          type: array
                          items:
                            type: number
                      required:
                        - object
                        - index
                        - embedding
                  model:
                    type: string
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                      total_tokens:
                        type: integer
                    required:
                      - prompt_tokens
                      - total_tokens
                required:
                  - object
                  - data
                  - model
                  - usage
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    EmbeddingsRequest:
      type: object
      description: >-
        Validates and normalizes the POST /v1/embeddings request body.


        `input` accepts a bare string or an array of strings. A bare string is

        promoted to a one-element array by {@see self::prepareForValidation()}.

        An empty array is rejected by {@see self::withValidator()}.


        Authorization is handled by the Sanctum `ability` middleware on the
        route;

        this class always returns `true` from `authorize()`.
      properties:
        model:
          type: string
        input:
          type: array
          items:
            type: string
          minItems: 1
        encoding_format:
          type:
            - string
            - 'null'
          enum:
            - float
            - null
        dimensions:
          type:
            - integer
            - 'null'
          minimum: 1
        user:
          type:
            - string
            - 'null'
          maxLength: 255
      required:
        - model
        - input
      title: EmbeddingsRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````