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.

ParameterDescription
modelRequired. text-embedding-3-small, text-embedding-3-large or text-embedding-ada-002 when enabled.
inputRequired. Non-empty string, up to 2048 strings, or token arrays.
dimensionsOptional. Shorter vectors for text-embedding-3 models, for example 256 or 1024.
encoding_formatOptional. float (default) or base64.
userOptional 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.

ModelPrice per 1M input tokensDefault dimensions
text-embedding-3-small$0.011536 (dimensions supported)
text-embedding-3-large$0.0653072 (dimensions supported)
text-embedding-ada-002$0.051536

EXPLORE DOCUMENTATION

IntroductionConnect your app to AI models through one familiar API. This is your guide to building with Tokely.QuickstartMake your first Tokely request in three steps.API keysConnect securely with a key from your Tokely dashboard.ModelsChoose an available model and use its exact ID in your request.PlaygroundUse the Tokely Playground to test prompts before writing code.Use your existing appConnect an existing OpenAI-compatible application to Tokely.Chat CompletionsGenerate responses from text messages and supported inline images or PDFs.ResponsesUse stateless text and supported multimodal input with the Responses API.EmbeddingsTurn text into vectors for search, RAG, clustering and classification with the OpenAI-compatible /v1/embeddings endpoint.Claude Code and the Messages APIPoint Claude Code or the Anthropic SDK at Tokely. Use the native /v1/messages endpoint with streaming, tools and prompt caching.Images and PDFsSend inline images and PDFs to compatible models through Chat Completions or Responses.Images, video & audioGenerate media with your Tokely API key and account balance.Errors & limitsDiagnose failed requests and keep your integration within service limits.StreamingDisplay generated text as it arrives with server-sent events.Function callingLet a model request a function, then execute it in your application.Structured outputRequest JSON output or a defined schema from a compatible model.Usage & billingModel prices, account balance and output reservations.WebhooksTokely webhook events, HMAC signature verification, delivery retries and replay behavior.
Use Tab to browse results ESC to close