Quickstart
Make your first request to the Troviale gateway in under a minute using curl, Python, or JavaScript.
This guide takes you from an API key to your first model response.
1. Get an API key
Create a key from your dashboard. Copy it when it is shown — the full key is only displayed once.
2. Set the base URL
Troviale exposes a single OpenAI-compatible endpoint:
https://api.troviale.com/v1Point any OpenAI-compatible client at this base URL and authenticate with your Troviale key.
3. Make a request
curl https://api.troviale.com/v1/chat/completions \
-H "Authorization: Bearer $TROVIALE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{ "role": "user", "content": "Say hello in one sentence." }]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.troviale.com/v1",
api_key="YOUR_TROVIALE_KEY",
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.troviale.com/v1",
apiKey: process.env.TROVIALE_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(response.choices[0].message.content);4. Switch models
Change the model field to route to a different provider — nothing else
changes:
response = client.chat.completions.create(
model="claude-sonnet-4-6", # was "gpt-4o"
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)See the model catalog for every available model and its pricing.