Five steps. Every request runs on your own provider key (step 4), with one exception: where this deployment serves the free models without a key, your first request can go to one of those before step 4 — step 3 says how to tell.
1. Get a management key
Sign in at autonomousrelay.com/signin with Google, GitHub or a wallet. Your first management key is created with your account and is shown once, in Workspace → API keys.
2. Create an inference key
A management key administers the account and cannot make inference requests. Create a separate inference key for your application:
curl -X POST https://autonomousrelay.com/v1/keys \
-H "Authorization: Bearer $AUTONOMOUSRELAY_MANAGEMENT_KEY" \
-H 'content-type: application/json' \
-d '{"name":"my-app","class":"inference"}'3. Free models, and whether they need a key
The free models — every price zero, listed by GET /v1/models?free=true — cost nothing on your own provider key. A deployment may also serve them without a key of your own, on its key: GET /v1/free-tier answers available, the daily limit and the models it applies to. When available is true, a request like this works before step 4 (use a model it names); when it is false, go on to step 4 first. Nothing is charged either way.
curl -X POST https://autonomousrelay.com/v1/chat/completions \
-H "Authorization: Bearer $AUTONOMOUSRELAY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"model": "minimax/minimax-m3:free",
"messages": [{"role": "user", "content": "Hello"}]
}'daily_limit requests a day per organisation, across all of them. Past that the answer is a 429 with metadata.reason: free_model_daily_limit and the time it resets; add your own key for unlimited use. The provider’s own free-tier limits still apply.4. Add a provider key
Every other model is BYOK-only: it runs on your own credential for the provider that serves it — your existing OpenAI, Anthropic or Google key is fine. Once you add a key for a provider, its free models use your key too, with no daily limit.
curl -X POST https://autonomousrelay.com/v1/byok \
-H "Authorization: Bearer $AUTONOMOUSRELAY_MANAGEMENT_KEY" \
-H 'content-type: application/json' \
-d '{"provider":"anthropic","api_key":"sk-ant-...","name":"prod"}'Or run ./deploy/byok.sh, which prompts without putting the key in your shell history. The key is encrypted before storage and is never returned by any endpoint — listing your credentials gives you a four-character hint and nothing else.
5. Make a request on any model
curl -X POST https://autonomousrelay.com/v1/chat/completions \
-H "Authorization: Bearer $AUTONOMOUSRELAY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello"}]
}'From the OpenAI SDK: two lines change
The API speaks OpenAI’s Chat Completions format, so the official SDKs work as they are: point base_url at https://autonomousrelay.com/v1 and use your inference key. Model ids are author/slug, and any model in the catalogue works, not only OpenAI’s. The OpenAI SDK guide covers the rest of the SDK.
Python
pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://autonomousrelay.com/v1", # 1
api_key=os.environ["AUTONOMOUSRELAY_API_KEY"], # 2
)
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Streaming works unchanged: pass stream=True and iterate over the chunks.
Node.js and TypeScript
npm install openai
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://autonomousrelay.com/v1',
apiKey: process.env.AUTONOMOUSRELAY_API_KEY,
});
const resp = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-5',
messages: [{ role: 'user', content: 'Hello' }],
});
console.log(resp.choices[0].message.content);curl, or any HTTP client
Any client that can POST JSON works: the request in step 5 is the whole protocol. With "stream": true the answer arrives as server-sent events; -N prints them as they come.
curl -N https://autonomousrelay.com/v1/chat/completions \
-H "Authorization: Bearer $AUTONOMOUSRELAY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"model": "anthropic/claude-sonnet-5",
"stream": true,
"messages": [{"role": "user", "content": "Hello"}]
}'Claude, Gemini or any model through the OpenAI SDK
The same client calls every provider’s models: only the id changes. Each provider needs its own key (step 4); without it, the request answers 404 naming the provider.
for model in ["anthropic/claude-sonnet-5", "google/gemini-3.1-pro", "openai/gpt-5.5"]:
resp = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Hello"}],
)
print(model, resp.choices[0].message.content)For a fallback chain, pass models: if the first cannot be served, the next is tried (up to three attempts, see Fallbacks and provider failover). The Python SDK sends it through extra_body; in Node, add models to the request object (TypeScript needs a cast, since the SDK does not know the field). When models is present, it takes the place of model.
resp = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}],
extra_body={"models": ["anthropic/claude-sonnet-5", "openai/gpt-5.5", "google/gemini-3.1-pro"]},
)404 with “is BYOK-only and you have no <provider> credential”? Step 4 has not been done for the provider that serves that model. The error names which one — or pick a free model instead.