Use this page when your first real AI Stats integration lives in Python and you want a practical starting point for a CLI, worker, or backend service.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.
Build a Python gateway CLI around AI Stats routes.
Sample project
- GitHub: examples/gateway-python-quickstart
- Local repo path:
examples/gateway-python-quickstart
What this app does
- supports control routes like:
GET /v1/healthGET /v1/modelsGET /v1/providers
- supports generation routes like:
POST /v1/responsesPOST /v1/chat/completionsPOST /v1/embeddings- and several additional endpoints
Why this sample is useful
It gives you:- a Python-first reference without third-party dependencies
- explicit request payloads and response handling
- a practical pattern for workers, scripts, and internal tools
Run the sample
AI_STATS_API_KEY
What to look at in the code
- how the environment is loaded
- how the CLI dispatches commands
- how different request payloads are built
- how async video and music routes are handled separately from one-shot text routes
How to make it your own
- strip it down to only the endpoints your service needs
- keep one shared request helper instead of duplicating headers everywhere
- switch to the Python SDK later if you want a higher-level client