Skip to content

Noemad Docs

Embeddings

Text vectors, supported dimensions, batching, and retrieval.

Integration guide · planned capabilities. Model-specific capabilities, usage rates, and x402 upto settlement require backend implementation and validation. The preview runs local samples; documented contracts do not imply live availability.

Implementation target. This guide specifies the intended product surface. The current frontend uses local samples; it does not call an inference service or collect funds. An endpoint is enabled only after its adapter, ownership, usage, and payment behavior are qualified.

Planned API origin. Examples use https://noemad.dev/v1, the intended product API path. The API is not connected in this frontend preview. MODEL_ID_FROM_DISCOVERY and NOEMAD_API_KEY are placeholders, not published credentials or model IDs. A product API key identifies an account; a separate payment-aware transport must handle spending authorization.

An endpoint for indexed vectors

POST /v1/embeddings accepts one string or a bounded batch and returns one vector per input in stable order. Discover compatible models with GET /v1/models?type=embedding; a chat model is not automatically an embedding model.

The reference target accepts up to 64 strings per request. Per-item, aggregate size, and token limits must also be enforced by the qualified adapter.

Archived embedding models

Model specification reference. Names and capability limits come from the imported catalog snapshot. Enabled models require fresh qualification. USD rates below are listed only when verified for the exact model against an official source; unverified prices are marked.

Reference modelNative dimensionsLanguages
BGE Small EN
bge-small-en
384en
BGE Base EN
bge-base-en
768en
BGE Large EN
bge-large-en
1024en
BGE-M3
bge-m3
1024multilingual
EmbeddingGemma 300M
embeddinggemma-300m
768multilingual
Qwen3 Embedding 0.6B
qwen3-embedding-0.6b
1024multilingual
voyage-4-lite
voyage-4-lite
1024multilingual
voyage-4
voyage-4
1024multilingual
voyage-4-large
voyage-4-large
1024multilingual
voyage-code-4
voyage-code-4
1024multilingual
voyage-finance-2
voyage-finance-2
1024multilingual
voyage-law-2
voyage-law-2
1024multilingual

Request

json
{
  "model": "MODEL_ID_FROM_DISCOVERY",
  "input": [
    "A document about semantic search.",
    "A note about finding related ideas."
  ],
  "encoding_format": "float",
  "input_type": "document",
  "dimensions": 1024
}
FieldRules
modelRequired, from typed discovery
inputOne string or 1–64 strings
encoding_formatfloat arrays or base64 when supported
dimensionsOnly a selectable dimension advertised by that model
input_typequery or document for models that accept this distinction
userOptional bounded application user reference; never a secret

The archived Voyage 4 series supports 256, 512, 1024, or 2048 dimensions. Finance and law records use 1024. Other archived models retain their native dimension. These values need fresh adapter qualification before becoming live product choices.

Response validation

json
{
  "object": "list",
  "model": "MODEL_ID_FROM_DISCOVERY",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.012,
        -0.034,
        0.021
      ]
    },
    {
      "object": "embedding",
      "index": 1,
      "embedding": [
        0.028,
        0.017,
        -0.009
      ]
    }
  ],
  "usage": {
    "item_count": 2,
    "dimensions": 3,
    "encoding_format": "float"
  }
}

The vectors above are shortened illustrative values, not real embeddings. Validate one output index for every input, the exact selected dimension, finite numeric values, and the declared encoding. A missing item is an incomplete result.

Batching and retrieval

  1. Chunk and normalize documents consistently.
  2. Embed bounded batches with the document mode when supported.
  3. Store the model, version, dimension, and normalization method alongside each vector.
  4. Embed the query using a compatible query mode and dimension.
  5. Retrieve candidates, then optionally rerank them.

Do not mix vectors from different models or dimensions in the same comparison space. Reindex when the representation changes. Retrying a batch preserves operation identity and indexes; it must not double-charge already delivered work.

Token and byte units are distinct

Embedding billing must follow the selected hosted provider’s official USD unit. Tokenization and any UTF-8 counting rules are adapter-specific; a local byte count is not an exact token count for another model.

Use the quote’s pinned unit and any verified minimum, then settle reliable attributable usage. The billing reference shows verified USD rates and clearly marks prices that could not be established. The final USDC payment terms come from a fresh quote.