Quick start
Connect your first AI API request.
The common setup pattern is simple: API key, base URL, model route, then one minimal request.
Create or receive a key
Use the approved account or console flow. Never expose the secret in screenshots, frontend code, or Git.
Set the base URL
Use the current gateway host confirmed for your account, normally ending in /v1.
Choose a mapped model
Model names must match the enabled route for the account and client.
Test minimally
Start with one small request before changing the whole workflow.
Tutorial center
Five setup guides you can use right away.
These are the first source files for the public setup path. They are short on purpose so customers can choose the right tutorial fast.
Codex Setup
Connect Codex with a base URL, key, mapped model, and one minimal request.
Open source fileCursor Setup
Set the provider path, key, model, and version-aware client settings.
Open source fileClaude Code
Confirm the auth path, base URL, model route, and first test request.
Open source fileOpenAI-compatible SDK
Use the standard SDK pattern with a custom base URL and a minimal request.
Open source fileQuick Start Checklist
Send the shortest useful setup request and avoid exposing secrets.
Open source fileCodex tutorial
Set up Codex with the smallest safe path.
Start with the confirmed base URL, a valid key, the mapped model, and one minimal request. Keep the first test simple.
Confirm the route
Check the current host, model route, and whether the account supports the intended path.
Enter the config
Use the supported Codex config or environment variable path for your version.
Test once
Run one short prompt to confirm the connection before doing anything larger.
Check common errors
Look first at base URL, key placement, model mapping, and account access.
Source file: 01_Codex_Setup_Tutorial.md
Cursor tutorial
Set up Cursor with the correct provider path.
Find the provider settings, set the gateway host, store the key safely, and test one request before expanding the workflow.
Find provider settings
Look for API provider, custom endpoint, or OpenAI-compatible model settings.
Set the base URL
Use the confirmed host ending in /v1.
Protect the key
Use a secret field or environment variable, not public code.
Test one prompt
Keep the first request small and verify the response before deeper use.
Source file: 02_Cursor_Setup_Tutorial.md
Claude tutorial
Set up Claude Code with a version-aware path.
Confirm whether you are using Anthropic login, a gateway route, or another supported setup path, then test one simple request.
Confirm auth path
Do not mix login flow and gateway settings unless the client supports that path.
Set env vars
Use the approved base URL and token variable for your installed version.
Choose the model
Use the mapped route name that matches the current account.
Run one prompt
Test the smallest possible request before any larger workflow.
Source file: 03_Claude_Code_Setup_Tutorial.md
SDK tutorial
Set up an OpenAI-compatible SDK.
This path works well when the SDK can read a key and an optional base URL, then make one minimal request.
Create the key
Use a valid API key and keep it on the server or in protected local config.
Set baseURL if needed
Point the SDK to the confirmed gateway host if the route is not the default provider.
Call one minimal request
Use one model and one short input to verify the path.
Check failures in order
Look at key, base URL, model name, account access, and SDK version.
Source file: 04_OpenAI_Compatible_Setup_Tutorial.md
Checklist tutorial
Use the quick start checklist before you ask for help.
If you do not know which setup file to read first, start here and send the shortest useful message.
Know your tool
Name the client or application you are using.
Know your goal
Describe what you are trying to make work.
Know the issue
Send the current error or the thing that is not working.
Ask for a test key
Say whether you need a limited validation key or just setup guidance.
Source file: 05_Quick_Start_Checklist.md
Model routes
Choose a model route carefully.
The platform snapshot shows model labels such as the examples below. These are observed labels, not a guaranteed live list for every account.
System setup
Choose the guide for your computer.
The same API can be configured differently depending on whether the customer is using Windows, macOS, or Linux. Start with the client you already use, then follow the setup path that matches your system.
Windows
Use environment variables or the client settings folder. Check the tool’s path and secret handling first.
macOS
Use the app settings or shell profile where the tool stores its credentials and configuration.
Linux
Use the shell profile, local config file, or project environment file depending on the tool version.
Rule
Never put a real key in a public repo or screenshot. If you are unsure, send Stefan the tool name and error.
Codex
Configure Codex / Responses API
The observed setup uses a provider configuration with a Responses wire path. The exact schema depends on the installed client version.
Example configuration
model = "YOUR_MODEL"
model_provider = "stefan_gateway"
[model_providers.stefan_gateway]
name = "Stefan API"
base_url = "https://YOUR_HOST/v1"
env_key = "STEFAN_API_KEY"
wire_api = "responses"
Back up your existing configuration first. Prefer the client’s supported login or environment-variable flow when available.
Developer tools
Cursor and compatible tools
Many developer tools follow the same pattern: custom base URL, API key, and model route. The exact menu location depends on the tool version.
Find AI provider settings
Look for API provider, OpenAI-compatible provider, custom endpoint, or model settings.
Set the base URL
Use the confirmed gateway host ending in /v1.
Store the key safely
Use the tool's secret field or environment variable. Do not paste keys into public projects.
Test one request
Use a small prompt first. If it fails, send Stefan the tool name and error message.
Claude Code
Configure Claude Code
Use the gateway base URL and a protected authentication variable supported by your installed version.
ANTHROPIC_BASE_URL=https://YOUR_HOST/v1
ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
Some versions use ANTHROPIC_API_KEY. Confirm the client version and do not set both fields blindly.
Gemini CLI
Configure Gemini CLI
Custom base URL behavior depends on the current Gemini CLI version and gateway channel.
GEMINI_API_KEY=YOUR_API_KEY
GOOGLE_GEMINI_BASE_URL=https://YOUR_HOST/v1
Confirm that your installed client supports a custom base URL before changing the local configuration.
SDK
Use an OpenAI-compatible SDK
The gateway documentation describes common Python and Node.js patterns using a custom base URL.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://YOUR_HOST/v1"
)
response = client.chat.completions.create(
model="YOUR_MODEL",
messages=[{"role": "user", "content": "Hello"}]
)
Do not mix an upstream provider key with the gateway key.
Diagnosis
Run a minimal cURL test
Use a minimal request to separate address, key, model, quota, and client problems.
curl https://YOUR_HOST/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_MODEL","messages":[{"role":"user","content":"Hello"}]}'
Check failures in this order: base URL, API key, model mapping, balance, client version, network, and request path.
Common errors
Check the error before changing everything.
Most setup problems come from a small set of repeatable issues. Start with the error category, then fix one thing at a time.
401 / Unauthorized
Check whether the key is correct, active, and stored in the right place. Verify that the customer is not mixing gateway keys with upstream keys.
Wrong base URL
Confirm the host and the /v1 path. A wrong address can make the request fail even when the key is valid.
Model not found
Make sure the model name matches an enabled route for the account and the client version.
Quota / balance issue
Check whether the account has balance, credits, or a valid plan. Ask Stefan before assuming it is a coding problem.
Client mismatch
Some tools require slightly different fields, environment variables, or base URL support. Check the installed version.
Network / TLS
If the address and key are correct, check firewall, VPN, certificate, or local network issues.
Security notes
Keep API keys private.
Most setup problems can be solved without exposing secrets. Treat every key as a password.
- Never put API keys in frontend code.
- Never post keys in screenshots, logs, Git repositories, public chats, or public forms.
- Use environment variables or protected local configuration.
- Back up existing config before replacing it.
- If a key is exposed, disable it and create a new one.
- When asking Stefan for help, send the error message, not the secret key.