Set Up Your First Provider
This tutorial walks you through adding your first AI provider to the gateway using the admin dashboard. We will configure OpenAI, but the same steps apply to any of the 38 supported providers.
Prerequisites
- A running Gatewyse instance (server + MongoDB + Redis)
- Admin dashboard accessible (default:
http://localhost:3001) - An OpenAI API key from platform.openai.com
Step 1 — Log in to the Admin Dashboard
- Open the admin dashboard in your browser.
- Enter your admin credentials (email and password).
- After successful login you will land on the main dashboard.
Step 2 — Navigate to the Providers Page
- In the sidebar, click Providers.
- The providers list shows all configured provider connections for your tenant.
- Click the Add Provider button in the top-right corner.
Step 3 — Fill in the Provider Form
The “Add Provider” form has four fields:
- Name — a display name, for example
OpenAI Production. The slug is derived automatically from the name and is used in routing configs and API responses. - Type — select OpenAI from the type dropdown.
- API Key — paste your OpenAI API key. It is encrypted at rest.
- Base URL — leave blank to use the default OpenAI endpoint (
https://api.openai.com/v1). Set a custom URL only if you use an OpenAI-compatible proxy.
There are no separate auth-type, header, timeout, retry, or concurrency fields on the create form — sensible defaults are applied by the adapter.
Step 4 — Save and Discover Models
- Click Save. On save, the gateway automatically discovers the provider’s available models.
- You land on the provider detail page’s Models tab, populated with the discovered models.
- Use Enable/Disable All or per-model toggles to control which models are routable. You can also add a model manually with Add Model (set its capabilities and per-million-token pricing for cost-based routing).
Step 5 — Configure Further Settings (optional)
On the Settings tab you can adjust the name, status (active/inactive), API key, base URL, per-provider rate limit, and free-tier configuration.
Step 6 — Test Connectivity
- On the provider detail page, use the Test Connection control (also available as a Test button on each provider card).
- The gateway sends a lightweight probe to the provider and returns
success,latency(ms), and anerrormessage if it failed. - If the test fails, verify your API key, network access, and base URL.
Step 7 — Verify in the Dashboard
- Navigate back to the Providers list.
- Your new provider should appear with a health indicator.
- The provider’s health status includes the measured latency and last-check information.
What Happens Under the Hood
When you add a provider, the gateway creates a ProviderConfig document in MongoDB that stores:
- Adapter type (e.g.,
openai) — determines which adapter class translates requests - Authentication credentials (encrypted at rest)
- Connection parameters (base URL, rate limits, free-tier config)
- Health status (updated by periodic health checks)
The BaseProviderAdapter class provides shared functionality (HTTP requests, SSE parsing, SSRF validation), while the OpenAIAdapter handles OpenAI-specific request/response translation.
Next Steps
- Create Routing Rules to direct traffic to your provider
- Add a second provider for failover redundancy
- Configure Guards to protect your API traffic