Change one base URL
Otium speaks the OpenAI Files and Batch API. If you already submit batch work to OpenAI, integration is a base-URL swap and a wider completion window. No new SDK, no rewrite.
Quickstart
- 1. Create an API key in the customer portal, under Developers.
- 2. Point your OpenAI client at
https://api.getotium.ai/v1. - 3. Upload all your work as one JSONL file, create a batch, poll for the result.
Send everything at once rather than a few requests at a time: Otium is your queue. A file can hold up to 200 MB, requests that share instructions are served from cache for free, and a big batch fills a machine sooner. No rate limiter or retry loop on your side.
from openai import OpenAI
client = OpenAI(
base_url="https://api.getotium.ai/v1",
api_key=OTIUM_API_KEY,
)
# 1. Upload a JSONL file of requests, one per line.
f = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")
# 2. Create the batch. The completion window is the price lever:
# the wider it is, the cheaper the work runs.
batch = client.batches.create(
input_file_id=f.id,
endpoint="/v1/chat/completions",
completion_window="7d",
)
# 3. Poll, then download the output file when it reports completed.
batch = client.batches.retrieve(batch.id)
print(batch.status)Good to know
Reruns aren’t byte-identical
Even at temperature 0, the same input can come back slightly different: batching reorders
the floating-point maths, and a retry may run on other hardware. Every provider that
batches works this way. Key results on custom_id, keep
downstream steps idempotent, and don’t compare two runs for equality.
Getting a key
Create one in the customer portal, under API keys. Otium is in beta, so keys are issued once your account is created. Before you spend anything, the demo model runs the same API free, so you can check your integration end to end.
Try the free demo →Background reading
The concepts behind the API: why a deadline lowers the price, and how to shape a batch job well.
Get an API key.
Otium is in beta. Leave your email and we’ll send you a link to create your account.
Free to try on our demo model. No credit card, no spam: we email you a link to finish.
Otium is in beta and open to everyone. Already have an account? Sign in.