DocsAPI reference
Embeddings
OpenAI-shaped embeddings. Billed on input tokens only, so the cost is known before the call and no hold is taken.
POST/v1/embeddings
curl
curl https://velaron.ai/v1/embeddings \
-H "Authorization: Bearer $KREDIT_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "openai/text-embedding-3-small", "input": ["a question", "an answer"] }'Request#
- model
An embedding model. Sending a chat model here answers
400 model_not_supportedwith"<model>" is not an embedding model.- input
One string or an array of strings. For the balance check the array is joined with newlines and estimated at four characters per token.
Response#
The provider's JSON, plus x-vels-credits-charged and x-vels-balance. The charge is computed from the usage the provider reports. There is no streaming.
If the estimated cost is more than your balance, the call is refused before it goes out with 402 insufficient_credits and the message This call needs about N credits, more than your balance covers.
