Loading
Loading
POST /v1/embeddings — vectors for search, RAG and clustering. You pay for input tokens only.
input is a string, an array of strings (up to 2048) or arrays of token ids. encoding_format and dimensions are passed to the provider as is if the model supports them.
curl https://llmproxy.org/v1/embeddings \ -H "Authorization: Bearer $LLMPROXY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "openai/text-embedding-3-small", "input": ["first text", "second text"]}'
The response uses the OpenAI format: data[].embedding and usage.prompt_tokens. Embeddings have no output tokens, so the price is based on input only.
input or an array of mixed types returns 400 invalid_request.user field is still honored: .X-MaxAI-Fallback: never header — .