OpenAI: Text Embedding Ada 002 (batch)
Text Embedding Ada 002 Batch submits groups of text-embedding requests as one Ailoot batch. Track each item by custom_id and retrieve the original operation’s complete results.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
Text Embedding Ada 002 Batch uses /v1/batches with the exact openai/text-embedding-ada-002:batch model ID. Set endpoint to /v1/embeddings and supply requests; every item contains custom_id and a body with input as a text string or an array of strings. Keep the identifiers stable so your application can match the results to a collection of new or revised passages.
The batch is asynchronous. Retain the original returned operation ID and use GET /v1/batches/{operation_id} to follow that same operation with the same caller. A completed result set can contain a response or error for each custom_id, so inspect the item outcomes as well as the overall status.
Save all completed results as JSONL while preserving every custom_id and its complete response or error. Associate successful vectors with the submitted document IDs before updating the index. Keep the original operation and item records together so an incomplete or failed item can be investigated without losing the results already returned.
Ailoot Ultra · Batch POST /v1/batches openai/text-embedding-ada-002:batch
openai/text-embedding-ada-002:batch
openai/text-embedding-ada-002:batchOverview
Text Embedding Ada 002 Batch submits groups of text-embedding requests as one Ailoot batch. Track each item by custom_id and retrieve the original operation’s complete results.
- Accepted inputs
- Text
- Results
- embedding
Available in Ailoot · inputs & methods
Ailoot Ultra · Batch POST /v1/batches
- Input types
text- Output types
embedding
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits openai/text-embedding-ada-002:batch Conditions: Use this exact Ailoot routing selector. | Default— |
Fieldendpoint | Typestring | RequirementRequired | Values & limits /v1/embeddings Conditions: | Default— |
Fieldrequests | Typearray | RequirementRequired | Values & limits Conditions: | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, endpoint, requests |
Parameteroptional | Contract |
Parametermaterial_types | Contracttext |
Parameterconditions | ContractUse this exact Ailoot routing selector. |
Lifecycle: asynchronous
GET /v1/batches/{operation_id} · actual original response.id, same caller/key/group
Pricing
Tariff references do not add request options. Supported parameters are listed for the selected method.
- Fast mode
- Not specified When fast mode is selected
- Flex mode
- Not specified When flex mode is selected
- Maximum reasoning effort
- Not specified When maximum reasoning effort uses the default adjustment
- Explicit cache pricing
- Not enabled When explicit cache is requested
Ailoot rates
Prices by configuration
Match each charge to the conditions shown. Use one rate for each set of alternative configurations.
| Configuration | Rate schedule | Context tokens, more than | Context tokens, up to and including | Charge |
|---|---|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Context tokens, more than— | Context tokens, up to and includingNo upper bound | Charge Input · Input tokens $0.0001 / 1K tokens Output · Output tokens $0 / 1K tokens Input · Cache read — / 1K tokens Input · Cache write — / 1K tokens Input · Cache write, 1 hour — / 1K tokens |
| ConfigurationRequest-length tier 1 | Rate schedule— | Context tokens, more than0 | Context tokens, up to and includingNo upper bound | Charge Input · Input tokens $0.0001 / 1K tokens Output · Output tokens $0 / 1K tokens Input · Cache read — / 1K tokens Input · Cache write — / 1K tokens Input · Cache write, 1 hour — / 1K tokens |
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Example requests
Ailoot Ultra · Batch
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"endpoint": "/v1/embeddings", "model": "openai/text-embedding-ada-002:batch", "requests": [{"custom_id": "embedding-1", "body": {"input": "The quick brown fox jumps over the lazy dog"}}]}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/batches \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
# Submit once. Retain the complete result, original identifiers and every response header.
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_BATCH'
import json,os,subprocess
from pathlib import Path
from urllib.parse import quote
r=json.loads(Path("result.json").read_text()); operation=r["id"]
subprocess.run(["curl","--fail-with-body","--silent","--show-error","https://api.ailoot.ai/v1/batches/"+quote(operation,safe=""),"-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"],"-D","status-headers.txt","-o","status.json"],check=True)
s=json.loads(Path("status.json").read_text())
if s.get("status")=="completed": Path("results.jsonl").write_text("".join(json.dumps(x,ensure_ascii=False)+"\n" for x in s.get("results",[])))
# Repeat only this same original GET while pending; never repeat creation.
PY_BATCH
Receive and save results
Ailoot Ultra · Batch
GET /v1/batches/{operation_id}
Keep all completed results
Keep every complete returned response, file and content part.
Preserve original status, every custom_id and full response/error. Save all completed results[] as JSONL; no Files upload/download path is inferred.
If the original response needs checking
Preserve the original operation ID and read only that original batch. A timeout, error or unknown state does not authorize another creation.
Response fields
| Field | Type |
|---|---|
Fieldresults[] | Typearray |
Fieldresults[].custom_id | Typestring |
Fieldresults[].response | Typeobject |
Fieldresults[].error | Typeobject |
Errors and next steps
| Response | Condition | Next step |
|---|---|---|
Response400 · invalid_request_error | ConditionA required field, model selector, type or input representation is invalid. | Next stepInspect the returned validation detail before preparing a separate request. |
Response | ConditionThe original request or result is unknown or requires a check. | Next stepKeep original identifiers and headers; read only supported status/library records. Do not submit creation again. |
Aliases
Model aliases
Ailoot Ultra openai/text-embedding-ada-002:batch
Method path aliases
Use the method paths shown above.
Related caller IDs
FAQ · OpenAI: Text Embedding Ada 002 (batch)
- What inputs and results are available?
POST /v1/batches·openai/text-embedding-ada-002:batch:text→embedding- Which fields does the request use?
POST /v1/batches·openai/text-embedding-ada-002:batch:model,endpoint,requests