text-embedding-3-small API

embedding

text-embedding-3-small is OpenAI's compact text embedding model, priced at $0.12 per 1M tokens on CaMeL Hub via the OpenAI-compatible /v1/embeddings endpoint (base_url https://api.camel-hub.com/v1). It turns up to 8,192 tokens of text into a 1,536-dimension vector for semantic search and RAG — keep your existing OpenAI SDK code, change only the base_url.

Pricing

per 1M input tokensper 1M output tokens
CaMeL Hub$0.12$0.12
Provider list price$0.02

Prices are the public default-group rate in USD per 1M tokens; input and output are billed separately. · Provider list price · verified 2026-07-11

Specifications

Provider
OpenAI
Context window
8192 tokens
Capabilities
embedding
Endpoints
openai, anthropic
text-embedding-3-small is the smaller of OpenAI's third-generation embedding models. It maps text to 1,536-dimension vectors whose cosine similarity tracks semantic relatedness, with markedly better multilingual retrieval quality than the older text-embedding-ada-002 it replaced. Because embeddings are the highest-call-volume, lowest-unit-cost operation in most retrieval stacks, the "small" tier is the default workhorse: fast enough to embed user queries synchronously at request time, cheap enough to re-index entire corpora. Two behaviors set it apart from generic embedding endpoints. First, it supports OpenAI's dimensions parameter: you can ask for shortened vectors (for example 512 instead of 1,536) and the model front-loads the most informative components, so you trade a small amount of retrieval quality for a large cut in vector-database storage and query cost. Second, its 8,192-token input limit means most document chunks — and even whole short documents — fit in a single call, and you can batch many inputs into one request by passing an array. On CaMeL Hub the model is billed at $0.12 per 1M tokens and, like all embedding calls, effectively consumes input tokens only — the response is a vector, not generated text — so costs are predictable straight from your corpus size. A practical advantage of calling it here: the same API key and base_url that serve your chat and reasoning models also serve embeddings, so a full RAG pipeline (embed, retrieve, generate) runs against one endpoint with one bill, no separate embedding account to manage.

What it is good for

Quickstart

OpenAI-compatible: set base_url to https://api.camel-hub.com/v1 and use your CaMeL Hub API key. No SDK changes needed.

cURL

curl https://api.camel-hub.com/v1/embeddings \
  -H "Authorization: Bearer $CAMEL_HUB_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "The quick brown fox jumps over the lazy dog"
  }'

Python

from openai import OpenAI

client = OpenAI(
    api_key="$CAMEL_HUB_KEY",
    base_url="https://api.camel-hub.com/v1",  # <-- the only change vs. the OpenAI default
)

resp = client.embeddings.create(
    model="text-embedding-3-small",
    input="The quick brown fox jumps over the lazy dog",
)
print(resp.data[0].embedding[:8])

Get an API key Browse integration guides

Frequently asked questions

How is text-embedding-3-small billed on CaMeL Hub?

Input tokens are billed at $0.12 per 1M tokens and output tokens at $0.12 per 1M tokens. In practice an embeddings request only consumes input tokens — the API returns vectors, not generated text — so your cost is simply the number of tokens you embed times $0.12 per 1M. Embedding 1,000 documents of 500 tokens each (500K tokens) costs about $0.06.

What can this model do — does it support chat, streaming, or function calling?

It is an embedding-only model. It converts text into numeric vectors via the /v1/embeddings endpoint and cannot generate text, chat, stream responses, or call functions. For generation, pair it with a chat model on the same CaMeL Hub endpoint.

What is the maximum input length?

Up to 8,192 tokens per input, as documented by OpenAI. You can also pass an array of strings to embed many inputs in a single request, which is the efficient way to index a corpus.

How large are the vectors, and can I make them smaller?

The default output is a 1,536-dimension vector. The model supports the dimensions request parameter, which shortens the vector (e.g. to 512) while preserving most of its semantic quality — useful for reducing vector-database storage and search latency.

How do I start using it?

Create an account and API key in the CaMeL Hub console at https://api.camel-hub.com/console, then point any OpenAI SDK at base_url https://api.camel-hub.com/v1 and call client.embeddings.create(model="text-embedding-3-small", input="your text"). No other code changes are needed.

More from OpenAI

OpenAI

gpt-5.5

OpenAI

gpt-5.4