One endpoint,
every model.
Tare is an OpenAI-compatible gateway in front of every model you use — ours and the ones you bring yourself. One base URL, one key, and every token accounted for.
Quickstart
What this solves: How to send your first successful model request with Tare.
If you don't have an account or key yet, read Before you start first. If you already have an Inference key, just follow the steps below.
What you need to prepare
- A working Tare account.
- An Inference key. Be careful not to use a Provisioning key or a Reconciliation key; the three key types have different permissions, and the wrong type gets rejected outright.
- A working model name, such as one visible in the console or in
GET /v1/models. - Your server can reach
https://tare.jamerly.ai.
The full key plaintext is shown only once, at creation time; the platform stores only a hash, and the list then shows only a mask like ak-…3f2a. Save it in your server-side secret management system, not in browser frontend code.
1. Create an Inference key
Console path:
Console → Tare → API Keys → Create
Choose Inference as the type. Write the name so its purpose is clear, for example support-bot-production. After creating it you'll see the full key; copy and save it.
2. Change two configs, send a request
Any OpenAI-compatible client works by changing these two configs:
| Config | Value |
|---|---|
base_url | https://tare.jamerly.ai/v1 |
api_key | Your Inference key |
curl
curl https://tare.jamerly.ai/v1/chat/completions \
-H "Authorization: Bearer $TARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "GLM 5.1",
"messages": [{"role": "user", "content": "hello"}]
}'
Python (OpenAI SDK)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://tare.jamerly.ai/v1",
api_key=os.environ["TARE_API_KEY"],
)
resp = client.chat.completions.create(
model="GLM 5.1",
messages=[{"role": "user", "content": "hello"}],
)
print(resp.choices[0].message.content)
Which name to put in model
Put the platform-side model name, not the name on the upstream provider's side. Tare is responsible for mapping between the two.
The response always carries the name you requested. Even if a failover switches the upstream mid-flight, you never receive a model name you didn't request.
3. How to tell you're connected
- HTTP returns 200.
- The model produced content.
- The response headers include
X-Generation-Id, or the response contains agen-...ID. - Later you can use
GET /v1/generation?id=gen-...to check this call's cost and latency.
Querying immediately after getting the ID may return 404, because the usage record is written after the response. Treat any 404 within 60 seconds of receiving the ID as "not written yet, check again later".
4. Streaming calls
Pass stream: true in the request; it returns an SSE stream ending with data: [DONE].
Two kinds of upstream API don't natively send this terminator: Anthropic and OpenAI's own Responses API. Tare adds it for you in both cases. Without it, a client that hand-parses SSE (rather than a standard SDK that recognizes each vendor's own end-of-stream signal) will keep waiting after the last frame of real content.
Usage is in the last frame. Tare forces stream_options.include_usage on and overrides your setting, because without usage there's no billing or attribution.
Before the first byte, you may receive several SSE comments (lines starting with :).
For calls with large inputs, the upstream has to finish reading the prompt before it starts generating, so the first byte can take tens of seconds (in measurements, a good number beyond the median exceed 10 seconds, with the slowest approaching 80 seconds). During this time there are no bytes on the connection, and the client and proxies along the way will treat it as a dead connection and kill it. After about 5 seconds of silence, Tare starts sending an SSE comment every few seconds, so every hop knows the connection is still alive.
The SSE spec requires parsers to ignore lines starting with :, so standard SDKs need to do nothing. Only hand-written parsing clients need to pay attention: don't treat comment lines as data frames to JSON-parse. The last frame may also contain only usage, with no renderable text.
Common issues
| Symptom | Common cause | What to do |
|---|---|---|
| 401 | Key doesn't exist, is disabled, or has expired | Reconfirm the key plaintext and its state |
| 403 | Wrong key type, or a quota / budget / source IP / DLP block | First confirm it's an Inference key, then check metadata.refusal_reason |
| 404 | No route configured for the model name, or the record isn't written yet | Check GET /v1/models; generation queries can be retried within 60 seconds |
| 429 | Rate limit triggered | Retry per Retry-After |
| Streaming stalls | Hand-written parser doesn't ignore comment lines, or a proxy timeout | Ignore lines starting with :; check the proxy's SSE config |
Next steps
- To use Tare from coding tools such as Claude Code, Codex or Cursor: read Coding tools.
- To connect your own provider: read Channels.
- To make a given model go through a chosen channel: read Routing.
- To break down cost by customer or business line: read Cost attribution.