Gateway in front of an LLM provider's chat API (OpenAI, Anthropic/Claude, or Google Gemini). It can share a single provider API key among many clients, authenticate clients and enforce per-user token limits through a store, apply usage policies, and inject a system prompt; token usage is recorded when the response returns. Place it in the flow of an api whose target is the provider's API. Without a store the gateway is stateless and just forwards requests with the configured key and policies. See the tutorials under tutorials/ai/llm-gateway.
llmGateway:
[ apiKey: <provider-key> ]
claude | openai | google # the provider (required)
[ policies: ... ] # token limits, model rules
[ systemPrompt: ... ]
[ simpleStore | jdbcAiApiUsageStore ] # enables per-user auth and limits
API key for the LLM provider, used for all upstream calls and overriding any key sent by the client. Use the key issued by OpenAI, Anthropic, or Google.