API reference
Embeddings
POST /v1/embeddings — vectors for search and retrieval, billed per input token.
POST /v1/embeddingsOpenAI-compatible. Send one string or an array of strings; get one vector per input, in order.
curl https://api.gamra.dev/v1/embeddings \
-H "Authorization: Bearer $GAMRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-v4",
"input": ["Livraison en 48 heures", "توصيل في يومين"],
"dimensions": 1024
}'| Field | |
|---|---|
model | text-embedding-v4 — the only embedding model today |
input | a string or an array of strings |
dimensions | optional; 1024 is what Gamra Agents uses |
Billing is per input token, in millimes, from the same wallet as chat. An
embedding model cannot be used with /v1/chat/completions (400
model_not_chat), and a chat model cannot be used here (400
model_not_embedding).