Docs

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.

Getting startedQuickstart

Quickstart

1. Create a key

Console → API Keys → Create. The full key is shown once; only a hash is stored, and the list shows ak-…3f2a.

2. Configure the client base URL

Any OpenAI-compatible client needs two settings changed.

Code / Terminal
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"}]
  }'
Code / Terminal
from openai import OpenAI

client = OpenAI(
    base_url="https://tare.jamerly.ai/v1",
    api_key=os.environ["TARE_API_KEY"],
)

reply = client.chat.completions.create(
    model="GLM 5.1",
    messages=[{"role": "user", "content": "hello"}],
)
Code / Terminal
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://tare.jamerly.ai/v1',
  apiKey: process.env.TARE_API_KEY,
});

3. Streaming

Set stream: true. The stream is Server-Sent Events and ends with data: [DONE], as OpenAI's does. When the upstream is Anthropic, Tare appends that terminator — Anthropic does not send it, and a client parsing SSE by hand would wait indefinitely.

[!TIP] Usage arrives in the final chunk. Tare forces stream_options.include_usage on and overrides your setting: without usage there is nothing to bill or attribute.

[!WARNING] You may receive SSE comments (lines beginning with :) before the first chunk.

On large inputs the upstream must read the whole prompt before it starts generating, so the first byte can take tens of seconds — measured in production, a substantial share exceed 10 seconds and the slowest approach 80. Nothing crosses the connection in that window, and clients and intermediate proxies treat it as dead. After about 5 seconds of silence Tare starts sending an SSE comment every few seconds so every hop can see the connection is alive.

The SSE specification requires parsers to ignore lines beginning with :, so standard SDKs need no changes. Only hand-written parsers need care: do not feed a comment line to a JSON parser as if it were a data frame.

The model field

Send the platform-side name, not the upstream's; Tare maps it to whatever the chosen provider calls it. The reply always carries the name you asked for — if failover moves the call to another provider mid-flight, you never see a model name you did not request.

Docs last updated Sep 20, 2026, 06:31 (UTC+8)