text-embedding-3-small API
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 tokens | per 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
What it is good for
- RAG retrieval: embed document chunks into pgvector, Qdrant, or Milvus at index time, then embed each user query at request time to fetch the most relevant context for a chat model.
- Semantic search over internal knowledge bases, support tickets, or documentation, where keyword search misses paraphrased questions.
- Deduplication and clustering of large text corpora — group near-identical news articles, product listings, or user feedback by vector similarity.
- Lightweight text classification and intent detection: label a few hundred examples, embed them, and classify new inputs with k-nearest-neighbor lookup instead of training a model.
- Content-based recommendations ("related articles", "similar products") computed from embedding distance rather than co-click history.
- Cutting vector storage costs by requesting shortened embeddings via the dimensions parameter when your database or memory budget is tight.
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.