API REFERENCE
Embeddings
Turn text into vectors for search, RAG, clustering and classification with the OpenAI-compatible /v1/embeddings endpoint.
POST /v1/embeddings
Send a string, an array of up to 2048 strings, or token arrays. The response follows the OpenAI embeddings shape: data[].embedding with one vector per input, plus usage.prompt_tokens. Use GET /v1/models for enabled model IDs.
curl https://api.tokely.me/v1/embeddings \
-H "Authorization: Bearer $TOKELY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "text-embedding-3-small", "input": ["first chunk", "second chunk"]}'Parameters
Only the fields below are accepted.
| Parameter | Description |
|---|---|
| model | Required. text-embedding-3-small, text-embedding-3-large or text-embedding-ada-002 when enabled. |
| input | Required. Non-empty string, up to 2048 strings, or token arrays. |
| dimensions | Optional. Shorter vectors for text-embedding-3 models, for example 256 or 1024. |
| encoding_format | Optional. float (default) or base64. |
| user | Optional end-user identifier. |
Models and prices
Embeddings are billed per input token; there is no output charge. Usage appears in the dashboard log for each request. Embedding models are not listed in the public model catalog.
| Model | Price per 1M input tokens | Default dimensions |
|---|---|---|
| text-embedding-3-small | $0.01 | 1536 (dimensions supported) |
| text-embedding-3-large | $0.065 | 3072 (dimensions supported) |
| text-embedding-ada-002 | $0.05 | 1536 |