AI & MCP API
The AI module is core (always mounted). Provider keys are sealed at rest; reads mask them.
Providers
GET /admin/p/{ref}/ai/providers— list with maskedapi_key_hint(ai:read).POST /admin/p/{ref}/ai/providers—{ name, kind, model?, base_url?, api_key?, capabilities?, is_default? }(ai:write).GET /ai/providers/{id}returns the unmasked key for the edit form;PATCH/DELETE /{id}as expected.
Provider kind: openai, anthropic (claude), deepseek, mistral, qwen, zai — or any OpenAI-compatible endpoint via base_url.
Inline translate
POST /admin/p/{ref}/ai/translate
BYOK translation (ai:read). Body { provider_id?, from, to, text, field? }. Dispatches on the provider kind (native Anthropic /v1/messages, or the OpenAI-compatible driver).
{ "data": { "translation": "…", "provider": "…", "model": "…" } }MCP
Give any MCP client (Claude Desktop, Cursor, claude.ai) an agent-ready endpoint.
POST/GET/DELETE /admin/p/{ref}/ai/mcp/tokens— manage MCP tokens (POSTreturns the plaintext once).POST /mcp— the MCP JSON-RPC endpoint. Auth:Bearer <mcp-token>; the token resolves the project scope on every call.GET /.well-known/oauth-protected-resource,/.well-known/oauth-authorization-serverand/oauth/{register,authorize,token}— OAuth 2.1 discovery + flow (RFC 9728) so a client can connect without a pre-shared token.