# ai (https://lazyfrog.dev/docs/tools/ai)

{/* Generated by scripts/generate-docs.ts from the gateway's registered tools. Do not edit. */}

**{"AI gateway"}** · Can change or delete · actions: `settings`, `key_set`, `key_remove`, `cap_set`

<p>{"For reading use ai_read, which is read-only and needs no approval: \"settings\" here is deprecated (still works). The AI gateway for AI features inside the app (not for you: you are the AI that builds it). The app calls http://ai.local with the key in $LAZYFROG_AI_KEY instead of the provider's key, which stays with LazyFrog and never enters the app: OpenAI SDK baseURL $LAZYFROG_AI_URL/openai/v1, Anthropic SDK baseURL $LAZYFROG_AI_URL/anthropic, other OpenAI-compatible providers $LAZYFROG_AI_URL/compatible. Each environment has a monthly spend cap (default $5); at the cap requests fail with a clear error. action \"settings\": keys (last 4 characters), caps, spend this month by model. \"key_set\" (env, provider openai | anthropic | compatible, key; base_url for compatible, e.g. https://openrouter.ai/api/v1): better, send the owner to the link \"settings\" gives, where they paste it themselves (each environment has its own key: env \"production\" for the live site); tell them to set a spend limit at the provider too. \"key_remove\" (env, provider). \"cap_set\" (env, dollars a month)."}</p>
