Introduction
text-embedding-3-small converts notes, support articles and document passages into numerical vectors for similarity search. It returns 1,536 dimensions unless you request a shorter vector. Choose 3-small when building a new retrieval collection whose storage size and query quality can be measured together; the response is a representation of the input, rather than a written answer.
Key features & highlights
The adjustable output of 3-small lets a notes application compare a compact 256-dimensional index with the default representation. A smaller vector needs less space, but that tradeoff should be checked against the questions people actually ask. Keep the chosen length consistent across the documents and queries belonging to a collection.
Batch submission with 3-small preserves a separate vector for each supplied passage. The result index connects each vector to its original input, so your application can attach its own document ID, source location and access rules. This endpoint accepts up to 128 inputs per request; billing follows measured input tokens across the batch.
Request parameters
| Parameter | Required | Description |
|---|---|---|
dimensions | No | Reduce 3-small output with dimensions from 1 to 1,536; use the same length for indexed passages and queries. |
embedding_input | Yes | For 3-small, embed each passage separately; send a string, strings, token IDs or batches of token ID arrays. |
Pricing
$0.000004 / 1,000 tokens
Use cases
For a personal notebook using 3-small, store short passages with their note IDs and search for related material even when the query uses different wording. Return the original passage alongside each match so readers can inspect its meaning and date.
For a support library using 3-small, compare a customer question with approved help articles and pass the selected sources to a separate writing model. A close vector match is a retrieval signal; your application still decides which articles the customer is allowed to see.
Prompt guide & pro tips
Prepare 3-small input by dividing long documents at useful section boundaries and retaining a small amount of overlapping context where a passage would otherwise become ambiguous. Send the actual text to represent, without an instruction to invent an answer. Empty strings are rejected, each item must fit within 8,192 tokens, and the request total must stay within 300,000 tokens. Pre-tokenized arrays have a 2,048-entry limit.
Before committing a 3-small index to production, evaluate known queries against the default dimensions and at least one shorter setting. Save the model ID, dimensions and chunking version with the index; changing these choices requires rebuilding the affected vectors. Apply account and project access filters when selecting candidates, and remove indexed entries when their source note is deleted.
{
"model": "openai/text-embedding-3-small/embedding",
"input": [
"A notebook about coastal birds.",
"An index of harbor observations."
]
}
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "openai/text-embedding-3-small/embedding",
"input": {
"embedding_input": "The customer asks for a refund after being billed twice."
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.


