Documentation

AI (OpenRouter)

Platform LLM gateway for Webku operators. Keys never leave the server; the admin UI only talks to /api/v1/integrations/ai.

Who can see it

Only super_admin sees Integration → AI. Clients never see the menu, including during impersonation.

Flexible providers

The default adapter is OpenRouter (https://openrouter.ai/api/v1). Connection also ships OpenAI and a generic OpenAI-compatible preset. You can change base URL, chat path, models path, default/fallback model, timeout, extra headers, and extra JSON body (for OpenRouter provider routing) without a deploy.

Default model

Completions use a saved default from a cheap catalog (Qwen 3.7 Flash, Mistral Nemo, Gemini 2.5 Flash Lite, Mistral Small 3.2, GPT-4o mini). OpenRouter Auto is not used. Change it on Connection; Playground can override per request.

Connection

Save the key on Connection. Credentials are encrypted at rest. If the database row has no key, the server falls back to AI_API_KEY in .env. OpenRouter attribution headers (HTTP-Referer, X-Title) are sent when that adapter is selected.