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

# Create embeddings

> Embed up to 96 texts with the same self-hosted model that indexes
memories, so your own vector features live in the exact representation
Conare retrieves with.

- Stateless: nothing is stored, and no `endUserId` is involved.
- Vectors are unit-normalized and returned in input order; each input
  is at most 8,192 characters. Metered as embed tokens (~4 characters
  per token).
- `model` is a pin, not a selector: the endpoint serves exactly one
  model (named in every response), and any other name is a `400`
  (`model_not_served`). Pin it whenever vectors must stay compatible
  with an existing index.




## OpenAPI

````yaml /api/openapi.yaml post /api/v1/embeddings
openapi: 3.1.0
info:
  title: Conare API
  version: 1.2.0
  summary: Per-end-user memory for AI applications.
  description: >
    The Conare API gives your application a persistent, personalized

    memory layer. Production applications authenticate as an organization-owned

    Integration. Every request names an `endUserId`, and

    that end user's memory lives in its own isolated ConareDB namespace. The

    physical tenant is an opaque HMAC derived from the Integration and end-user

    ID; clients cannot select namespaces or address another tenant.


    On top of storage the API provides hybrid retrieval (vector + BM25, fused
    and

    reranked, sub-second), LLM-synthesized **deep recall**, and **proactive

    suggestions** grounded in a user's memory.


    Authentication uses a scoped server-side Integration Bearer key
    (`cint_...`).

    The secret is shown once and persisted by Conare only as a SHA-256 digest.

    Keep it in a server-side secret manager; never ship it to the browser.

    Legacy personal `cmem_...` keys remain accepted during migration.


    Every response includes `X-Request-Id`. Send a caller-generated safe value

    (1–128 characters; first alphanumeric, then `A-Za-z0-9._:-`) to correlate

    one request through the Conare edge and memory plane; otherwise Conare
    generates one. Errors use a

    stable `{ statusCode, code, message, requestId, details? }` envelope and

    never include internal tenant IDs or backend error text.
  contact:
    name: Conare
    url: https://conare.ai
    email: artem@conare.ai
servers:
  - url: https://api.conare.ai
    description: Production (dedicated partner-API host)
  - url: https://conare.ai
    description: Production (alias — same API, on the main host)
security:
  - bearerAuth: []
tags:
  - name: Integration
    description: Credential, configuration, and backend readiness.
  - name: Memories
    description: Write and search a single end user's memory.
  - name: Recall
    description: LLM-synthesized personalization primitives.
  - name: Embeddings
    description: Embed text with Conare's own retrieval embedding model.
  - name: Connectors
    description: >-
      Let end users connect any of ~200 data sources that flow into their
      memory.
  - name: Users
    description: End-user lifecycle (GDPR).
paths:
  /api/v1/embeddings:
    post:
      tags:
        - Embeddings
      summary: Create embeddings
      description: |
        Embed up to 96 texts with the same self-hosted model that indexes
        memories, so your own vector features live in the exact representation
        Conare retrieves with.

        - Stateless: nothing is stored, and no `endUserId` is involved.
        - Vectors are unit-normalized and returned in input order; each input
          is at most 8,192 characters. Metered as embed tokens (~4 characters
          per token).
        - `model` is a pin, not a selector: the endpoint serves exactly one
          model (named in every response), and any other name is a `400`
          (`model_not_served`). Pin it whenever vectors must stay compatible
          with an existing index.
      operationId: createEmbeddings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddingsRequest'
            examples:
              default:
                value:
                  input:
                    - User prefers smaller islands, wants to avoid crowds.
                    - ASA 104 certified, comfortable with bareboat charters.
      responses:
        '200':
          description: One vector per input, in input order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddingsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    EmbeddingsRequest:
      type: object
      required:
        - input
      properties:
        input:
          type: array
          minItems: 1
          maxItems: 96
          description: Texts to embed, each at most 8192 characters.
          items:
            type: string
            minLength: 1
            maxLength: 8192
        model:
          type: string
          minLength: 1
          description: >-
            Optional pin on the expected embedding model. The endpoint serves
            exactly one model; naming any other is a 400 (`model_not_served`),
            never a silent substitution.
    EmbeddingsResponse:
      type: object
      required:
        - success
        - model
        - dims
        - embeddings
        - usage
      properties:
        success:
          type: boolean
        model:
          type: string
          description: Identifier of the serving embedding model.
        dims:
          type: integer
          description: Dimensionality of every returned vector.
          example: 1024
        embeddings:
          type: array
          description: One unit-normalized vector per input, in input order.
          items:
            type: array
            items:
              type: number
        usage:
          type: object
          required:
            - totalChars
            - approxTokens
          properties:
            totalChars:
              type: integer
              description: Total characters across all inputs.
            approxTokens:
              type: integer
              description: Billed embed-token quantity (~4 characters per token).
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        code:
          type: string
          description: Stable snake_case machine error code.
        message:
          type: string
        requestId:
          type: string
          description: Correlates this response through Conare services and logs.
        details:
          type: object
          additionalProperties: true
      required:
        - statusCode
        - code
        - message
        - requestId
  responses:
    BadRequest:
      description: Missing or invalid fields (e.g. bad `endUserId`, empty `query`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid Bearer key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The Integration credential does not include the required operation
        scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: Integration namespace routing or the memory backend is not ready.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RequestId:
      description: Caller-provided or generated request correlation identifier.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cint_
      description: |
        A scoped Integration key, prefixed `cint_`. Send as
        `Authorization: Bearer cint_...` on every request. Server-side only.
        Legacy personal `cmem_...` keys remain accepted during migration;
        team/org-scoped `cmem_...` keys are not valid on this API.

````