- a safely stored API key
- a clear endpoint choice
- one working request in your app
- the right next pages for routing, SDKs, and production rollout
Before you begin
Make sure you have the following in place:- An AI Stats account with Gateway access.
- At least one API key generated from your dashboard.
- An HTTP client or SDK.
- A model ID supported by the Gateway, such as
google/gemma-3-27b:freefor a zero-deposit start.
1. Create and store an API key
- Log in to the AI Stats dashboard.
- Navigate to Gateway -> API Keys.
- Create a new key, give it a descriptive name, and copy the generated value.
- Store the key securely using your secret manager or environment variables:
Tip Rotate keys regularly and remove any that are no longer needed. This keeps access scoped and auditable.
2. Choose an endpoint and model
Choose the endpoint that best matches the job you are doing:| Endpoint | When to use it |
|---|---|
/v1/chat/completions | Chat interfaces, assistants, and OpenAI-style integrations. |
/v1/responses | New builds, structured outputs, and multi-step text workflows. |
/v1/messages | Anthropic-compatible integrations. |
/v1/moderations | Safety and content policy checks. |
/v1/images/generations | Image generation from text prompts. |
Free-model IDs end with
:free and can be called without depositing credits. Paid-model calls require available wallet balance.3. Send a request
Start with one successful chat request through the integration path you plan to keep.4. Configure environments
Store your API key in environment variables for different environments:Authorization header with your API key:
5. Next steps
- Review Authentication to learn about header formats and workspace tokens.
- Learn how Routing and fallbacks work in production.
- Browse Examples to see complete integrations in popular frameworks.
- Explore the SDK Reference for language-specific usage.