Introduction
text-embedding-ada-002 supplies fixed 1,536-dimensional vectors for applications that already depend on an ada retrieval index. It accepts text and pre-tokenized inputs through the embeddings endpoint. Keep ada-002 available when maintaining an existing collection or measuring a migration; the fixed vector length does not make its output interchangeable with another model that also happens to use 1,536 dimensions.
Key features & highlights
The stable output shape of ada-002 lets an existing application continue reading and writing its established vector columns without introducing a dimensions setting. Its role here is compatibility with that collection. Changing the chunking rules or preprocessing still changes the represented text, so those choices should remain versioned with the model identity.
A request to ada-002 may contain one input or a batch whose results retain their input indexes. A real pre-tokenized request returned one 1,536-dimensional vector and measured token usage. The platform limits an ada-002 batch to 128 items so synchronous responses and stored task results remain bounded.
Request parameters
| Parameter | Required | Description |
|---|---|---|
embedding_input | Yes | For ada-002, preserve the original chunk boundaries and embed queries with the same model as the stored passages. |
Pricing
$0.00002 / 1,000 tokens
Use cases
For a deployed help-center search service on ada-002, continue generating new article and query vectors with the existing model while reviewing retrieval quality. Keep publication state and customer permissions outside the similarity score so draft or restricted documents do not become searchable by accident.
For an ada-002 migration, create a separate candidate index from the original source texts and compare both indexes on representative queries. Match documents by source ID rather than comparing numerical coordinates across models, then switch the collection only after checking the retrieved passages.
Prompt guide & pro tips
Before sending text to ada-002, preserve the normalization and passage boundaries used by the existing index. Represent the actual passage rather than asking for a summary; a writing request still produces a vector, not an explanatory response. Each input must remain within 8,192 tokens, the batch total must stay within 300,000 tokens, and token ID arrays may contain at most 2,048 entries.
Do not send dimensions to ada-002: its output is fixed at 1,536 values. For batched requests, associate each result index with the corresponding source item and retain the measured input token count for your usage records. If you later adopt a different embedding model, regenerate stored document vectors and process incoming queries with that same new model before searching the replacement index.
{
"model": "openai/text-embedding-ada-002/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-ada-002/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.


