# Galon AI > Call AI models through a chat completions API. Each request is reserved on your prepaid balance and settled at actual usage, with caps per key. Server side only: read the key from the `GALON_API_KEY` environment variable. Call `GET https://api.galon.ai/v1/tools` first: use only what it lists for this key. Send an `Idempotency-Key` with every write and reuse it on retry. On an error, act on `detail.code` and follow `detail.next_action`. ## What it does - An API compatible with chat completions; any OpenAI-compatible (Chat Completions) client works by changing its base URL. - The models endpoint lists the models actually served, with their real names, publisher, licence, context length and price. - Each request is reserved on the prepaid balance before the model is called, then settled at the usage received. - Streaming for models that publish it in the catalogue, with usage in the last chunk; an interrupted stream is billed for what was received only. - A spending cap per key can be set lower than the project limit. ## API - `POST /v1/ai/chat/completions`: Ask an AI model - `GET /v1/ai/models`: List AI models - `POST /v1/ai/embeddings`: Compute embeddings ## MCP tools Server: `https://api.galon.ai/v1/mcp` (Streamable HTTP). - `list_ai_models`: List the AI model ids this project can call. - `create_chat_completion`: Generate a reply from an AI model. ## Docs - [Galon AI guide](/cloud/docs/services/ai) - [OpenAPI 3.1 contract](/cloud/docs/openapi.json): the source of truth for routes and fields - [Complete LLM integration guide](/llms-full.txt)