API reference
Embeddings
Vectors for text, billed per input token.
On this page
POST/
Returns one vector per input.
Auth: API key, or pay per request under https:/
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | An embedding model id. |
input | string or array | Yes | The text, or a list of texts, to embed. |
POST /v1/embeddings
curl
curl -X POST https://api.usdf.fi/v1/embeddings \ -H "Authorization: Bearer $USDF_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "bge-base-en-v1.5", "input": ["The first text", "The second text"] }'
Response, trimmed
{
"object": "list",
"data": [{ "object": "embedding", "index": 0, "embedding": [ … ] }, … ],
"model": "bge-base-en-v1.5",
"usage": { "prompt_tokens": …, "total_tokens": … },
"receipt": { "request_id": "<request_id>", "cost": { … }, … }
}Foundry documentation