Getting started
The shortest path from having access to a first answer from a model — a gateway, a provider credential, a Salyro key, and a request.
Salyro puts one OpenAI-compatible API in front of OpenAI, Anthropic, Google Gemini and Grok. This page is the shortest route from an account to a first answer: four things to set up in the dashboard, and two requests to check that they work.
Everything on this page happens once. After it, sending a request is a matter of naming a model.
Before you start
You need two things:
- A Salyro account. Accounts are provisioned rather than self-registered in this version, so if you are reading this you have most likely been given one. There is no sign-up form to fill in.
- An account with at least one model provider — OpenAI, Anthropic, Google Gemini or Grok — and a key you can copy from it. Salyro does not resell model access: requests are fulfilled against your own provider account, billed by the provider at the provider's rates.
Set it up
Sign in to the dashboard
The dashboard is at
app.salyro.com. Sign in with the email address your account was created for.Create a gateway
From Gateways, choose Create gateway and give it a name that says what it is for —
production,staging, the name of a product surface.A gateway is the unit of isolation: it owns its own provider credentials, its own API keys, and its own logs and costs, and shares none of them with any other gateway. One is enough to start with, and Gateways covers when you want more.
Connect a provider credential
Open the gateway, go to Providers, and connect the key from your provider account. Salyro checks it with the provider before storing it, so a mistyped or already-revoked key is caught here rather than during a real request.
Once saved, the key is encrypted in AWS Secrets Manager and is never shown again — not in the dashboard, not through the API. See Providers.
Issue a Salyro API key
Under API Keys, issue one. This is what your code will authenticate with; it is not your provider key, and it reaches only this gateway.
The full key is shown once, immediately after it is issued. Salyro keeps a one-way hash and cannot show it again. Have somewhere to put it before you click.
Put the key where your code will read it from, as an environment variable rather than a literal:
export SALYRO_API_KEY="sk-sly-..."
Check what your gateway can serve
Before sending a real request, ask the gateway what it has. This confirms three things at once — the key works, it belongs to the gateway you think it does, and the credential you just connected took effect:
curl https://api.salyro.com/v1/models \
-H "Authorization: Bearer $SALYRO_API_KEY"
{
"object": "list",
"data": [
{ "id": "openai/gpt-4o-mini", "object": "model", "owned_by": "openai" }
]
}
The list contains the models this gateway can actually reach: active models whose provider has an active credential connected. A provider you have not connected contributes nothing to it.
Model ids are provider/model — the provider, then the provider's own name for
the model, unchanged. Pick one from the list; you are about to send it.
Send your first request
curl https://api.salyro.com/v1/chat/completions \
-H "Authorization: Bearer $SALYRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini",
"messages": [
{ "role": "user", "content": "Reply with the single word: ready." }
]
}'
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: process.env.SALYRO_API_KEY,
baseURL: 'https://api.salyro.com/v1',
});
const completion = await client.chat.completions.create({
model: 'openai/gpt-4o-mini',
messages: [{ role: 'user', content: 'Reply with the single word: ready.' }],
});
console.log(completion.choices[0].message.content);
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["SALYRO_API_KEY"],
base_url="https://api.salyro.com/v1",
)
completion = client.chat.completions.create(
model="openai/gpt-4o-mini",
messages=[{"role": "user", "content": "Reply with the single word: ready."}],
)
print(completion.choices[0].message.content)
The answer comes back in the OpenAI Chat Completions shape, because that is the shape Salyro speaks:
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "openai/gpt-4o-mini",
"choices": [
{ "index": 0, "message": { "role": "assistant", "content": "ready." }, "finish_reason": "stop" }
],
"usage": { "prompt_tokens": 14, "completion_tokens": 3, "total_tokens": 17 }
}
That is the whole setup. Every subsequent request is this one with a different model or a different message.
If it did not work
Three failures account for almost all first attempts:
| What you get | What it means |
|---|---|
401 invalid_api_key | The key is missing, mistyped, or belongs to another gateway |
A rejected model | The id is not one GET /v1/models returned |
| A provider error | The provider rejected the call — usually its own credential or quota |
Authentication covers the first, Errors the rest, and Debug a failed request is the ordered path from a failure to its cause.
Where to go next
You now have a working request. What is worth reading depends on what you are building:
- Coming from OpenAI? Migrate an existing OpenAI integration — the change is a base URL, a key and a model id.
- Comparing providers? Switch providers without changing your code.
- Building a chat interface? Stream responses.
- Parsing the output? Get structured JSON output.
- Sending images? Send images with vision.
The Public API reference is the full contract behind all of them: the three endpoints, what passes through, and where compatibility ends.
