Prima API
Embeddings
POST /embeddings, one alias, metered per input string rather than per token.
Live Built and working today on the surface this card describes.
What it does
The OpenAI embeddings request and response shape. prima-embed is the alias.
Metering counts requests, not tokens: /usage reports embeddings with the unit requests.
That unit is the reason PrimaChat makes building a semantic index over a repository an explicit action instead of something that happens when a repository is connected. Indexing a few hundred files is several thousand billable requests.
Inputs and outputs
| Request | {"model": "prima-embed", "input": "…"}. input takes one string or an array of strings. |
|---|---|
| Response | The OpenAI embeddings shape, vectors under data[].embedding. |
| Metered as | Requests. /usage reports embeddings with unit: "requests". |
| Vector dimensions | |
| Maximum input length |
Configuration
| Model | prima-embed, or its pinned -2026-08 sibling from GET /models. |
|---|---|
| Batching | Pass an array in input to embed several strings in one request. |
Limits
- Vector dimensions and the maximum accepted input length are not published in
GET /modelsand have not been measured. The two hatched rows above are that gap, not a zero. - Billing is per input string, so a batch of 200 strings in one request is 200 units of work, not one.
- One alias, plus its pinned sibling. There is no way to ask for a different vector size or a different embedding model.
Example
embed one string
curl https://api.prima.li/api/prima/v1/embeddings \
-H "X-API-Key: $PRIMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "prima-embed", "input": "hello"}' Source of truth
philosophers_stone/platform/primaapi.md § The aliases (prima-embed)prima/prima/models/meter.py (`to_dict`: the `embeddings` block carries `unit: "requests"`, chat carries `tokens`)prima-chat/server/search.ts, file header (the gateway bills embeddings by input string; the semantic index is opt-in per repository for that reason)