The AI Stats Gateway gives you a single, unified API surface for accessing multiple model providers. Follow this guide to create an API key, send your first request, and adopt the conventions that keep integrations production ready.Documentation Index
Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
Use this file to discover all available pages before exploring further.
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 such as
curl,fetch, oraxios. - A model ID supported by the Gateway (for example
google/gemma-3-27b:freefor 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
Pick the endpoint that matches your use case. The Gateway normalizes payloads across providers, so request shapes are consistent:| Endpoint | When to use it |
|---|---|
/v1/chat/completions | Conversational interfaces, agents, and assistants. |
/v1/responses | Multi-step reasoning and structured responses. |
/v1/messages | Anthropic-compatible messages API. |
/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
Here is a minimalcurl example using the chat completions endpoint:
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.