Tools can use an internal AI engine ("OpenAI Engine") to analyze content and power platform features — without ever exposing API keys in the frontend.
This is a user manual that describes:
URL:
/admin/openaiRequirements:
openai.manageIn the web UI you can:
The model dropdowns in /admin/openai are no longer hardcoded.
GET /v1/models server-sideallowed_models is configured, the dropdown is intersected with that allowlistThis means the admin model picker is based on what the current provider key can actually use, without exposing any key in the browser.
503, depending on endpoint).Note: provider keys are managed under API Keys and are never shown in plain text.
Users who are allowed to use Tools AI can create a personal bearer token:
/keys/mineUse it like this:
Authorization: Bearer <token>
This token works for AI feature endpoints (e.g. /api/ai/url/analyze) and is tied to your user account + permissions.
Endpoint:
POST /api/ai/url/analyzePurpose:
Form data or JSON:
url (required) — URL to analyzequestion (optional) — analysis focus/questionprofile (optional) — prompt profile name (default: URL Analyzer if it exists, otherwise the engine falls back to a minimal default profile)JSON:
ok — true/falserequest_id — internal request idlatency_ms — approximate latencymodel — model usedresponse — model output (if ok)error — error message (if ok=false)To use the endpoint you need:
401 Unauthenticatedis_admin=1) — always allowedprovider_openaiIf the OpenAI provider isn't configured (missing global provider_openai API key), the endpoint typically returns 503.
curl -X POST "https://tools.tornevall.net/api/ai/url/analyze" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{
"url": "https://example.com",
"question": "What is this page about?",
"profile": "URL Analyzer"
}'
Endpoint:
GET /api/social-media-tools/extension/modelsPurpose:
Response fields include:
models — array of available model optionsdefault_model — effective default model for this user/contextsource — whether the list came from live provider discovery or a configured fallbackwarning — optional fallback/discovery message