Endpoints
Embeddings, rerank, audio, image edits and batch on one key.
The OpenAI endpoints an agent stack needs beyond chat, on the same key, balance and limits. Memory, retrieval, voice notes, product shots and overnight jobs, priced live from the catalog.
From the live catalog
- Embedding models
- 11
- Embeddings from
- $0.024 / M tokens
- Rerank models
- 1
- Transcription models
- 3
- Transcription from
- $0.0013 / minute
- Image edit models
- 43
- Batch API
- 50% of the catalog price
What it does for an agent
- Embeddings
- 11 models on POST /v1/embeddings for agent memory and retrieval, priced per million input tokens.
- Rerank
- POST /v1/rerank in Cohere and Jina’s shape: up to 1,000 documents scored against a query, best first.
- Transcription and translation
- OpenAI’s audio endpoints on Whisper and Parakeet models, billed per audio minute to the second.
- Image edits
- POST /v1/images/edits with files or URLs, on the image models that edit.
- Moderation
- POST /v1/moderations returns OpenAI’s moderation object, for checking what an agent is about to post.
- Batch API
- Upload JSONL to /v1/files, run it with /v1/batches within 24 hours at half the catalog rate, download the output file.
Copy, paste, run
OpenAI SDK: embeddings and rerank
python
1
from openai import OpenAI2
import os3
4
client = OpenAI(5
base_url="https://api.relayswitch.io/v1",6
api_key=os.environ["RELAYSWITCH_API_KEY"],7
)8
9
vectors = client.embeddings.create(10
model="bge-base-en-v1.5",11
input=["refund policy", "shipping times", "warranty claims"],12
)13
print(len(vectors.data[0].embedding))14
15
# Rerank: Cohere and Jina's shape, on the same key.16
import httpx17
ranked = httpx.post(18
"https://api.relayswitch.io/v1/rerank",19
headers={"Authorization": f"Bearer {os.environ['RELAYSWITCH_API_KEY']}"},20
json={"model": "bge-reranker-base", "query": "How long do refunds take?",21
"documents": docs, "top_n": 5},22
).json()["results"]OpenAI SDK: transcription
python
1
from openai import OpenAI2
import os3
4
client = OpenAI(5
base_url="https://api.relayswitch.io/v1",6
api_key=os.environ["RELAYSWITCH_API_KEY"],7
)8
9
with open("standup.m4a", "rb") as f:10
text = client.audio.transcriptions.create(11
model="whisper-large-v3-turbo",12
file=f,13
response_format="text",14
)15
print(text)16
17
# Any language into English text:18
# client.audio.translations.create(model="whisper-large-v3-turbo", file=f)OpenAI SDK: image edit
python
1
from openai import OpenAI2
import os3
4
client = OpenAI(5
base_url="https://api.relayswitch.io/v1",6
api_key=os.environ["RELAYSWITCH_API_KEY"],7
)8
9
result = client.images.edit(10
model="gpt-image-1.5-edit",11
image=open("product.png", "rb"),12
prompt="Put the bottle on a marble counter, soft morning light",13
)14
print(result.data[0].url)OpenAI SDK: Batch API
python
1
from openai import OpenAI2
import os3
4
client = OpenAI(5
base_url="https://api.relayswitch.io/v1",6
api_key=os.environ["RELAYSWITCH_API_KEY"],7
)8
9
# requests.jsonl, one line per request:10
# {"custom_id": "t-1", "method": "POST", "url": "/v1/chat/completions",11
# "body": {"model": "...", "messages": [...]}}12
upload = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")13
job = client.batches.create(14
input_file_id=upload.id,15
endpoint="/v1/chat/completions",16
completion_window="24h",17
)18
done = client.batches.retrieve(job.id)19
if done.status == "completed":20
print(client.files.content(done.output_file_id).text)curl: moderation
bash
1
curl https://api.relayswitch.io/v1/moderations \2
-H "Authorization: Bearer $RELAYSWITCH_API_KEY" \3
-H "Content-Type: application/json" \4
-d '{"input": "text an agent is about to post"}'5
# results[0].flagged, categories, category_scoresEmbedding and rerank models
USD per million input tokens, live.
| Model | Type | Input |
|---|---|---|
bge-base-en-v1.5 | embedding | $0.1665 |
bge-en-icl | embedding | $0.0313 |
bge-m3 | embedding | $0.0295 |
bge-small-en-v1.5 | embedding | $0.0505 |
gemini-embedding-001 | embedding | $0.15 |
multilingual-e5-large-instruct | embedding | $0.0313 |
qwen3-embedding-0.6b | embedding | $0.0295 |
qwen3-embedding-8b | embedding | $0.0313 |
text-embedding-3-large | embedding | $0.13 |
text-embedding-3-small | embedding | $0.024 |
text-embedding-ada-002 | embedding | $0.12 |
bge-reranker-base | rerank | $0.0078 |
Transcription models
USD per audio minute, live.
| Model | Developer | Per minute |
|---|---|---|
parakeet-tdt-0.6b-v3 | NVIDIA | $0.015 |
whisper-large-v3 | OpenAI | $0.015 |
whisper-large-v3-turbo | OpenAI | $0.0013 |
Image edit models
From the lowest tier, USD per image, live.
| Model | Developer | From |
|---|---|---|
gpt-image-1.5-edit | OpenAI | $0.0125 |
kling-o3-image-edit | Kling | $0.0219 |
kling-o1-image-edit | Kling | $0.0219 |
gpt-image-2-edit | OpenAI | $0.024 |
nano-banana-edit | $0.0313 | |
nano-banana-2-lite-edit | $0.0313 | |
seedream-5.0-lite-edit | ByteDance | $0.0313 |
seedream-4.5-edit | ByteDance | $0.0313 |
flux-3-klein-edit | Black Forest Labs | $0.036 |
nano-banana-2-edit | $0.0402 | |
muse-image-edit | Meta | $0.044 |
qwen-image-edit | Alibaba | $0.05 |
Agent setup guides
FAQs
Questions
For agent builders.
Every endpoint your agent stack calls
Chat, embeddings, rerank, audio, image edits and batch on one prepaid key.