Skip to main content
FilaRank is bring-your-own-key. Add a key under FilaRank SEO → SEO Settings (stored encrypted via Crypt), or fall back to env: OPENAI_API_KEY, GEMINI_API_KEY, ANTHROPIC_API_KEY. Nothing runs unless a key is configured. AI actions hide themselves when AiService::isConfigured() is false. Every call is logged to filarank_ai_logs with provider, model, token counts, and estimated cost, surfaced as a monthly spend figure on the Overview dashboard. Use Test AI connection in Settings to do a real round trip and surface a bad key or unsupported model immediately.

Choosing a model

The model dropdown in SEO Settings is built from config, and that list is the allowlist. Add a model and it becomes selectable, with no code change:
The first entry is the default when nothing has been chosen. A saved selection is validated against the list on every read, so removing a model from config quietly falls back to that first entry rather than erroring. rates are USD per 1M tokens and drive the spend estimate. Key a rate by model name to price it exactly; anything without its own entry uses default. Getting this wrong only skews the dashboard figure, never a request.
Requests are built per provider, not per model. The OpenAI provider sends temperature and a JSON response format, so reasoning-style models that reject a custom temperature will fail with a 400. Because publishing the config replaces the package’s ai block wholesale, a published copy will not inherit providers added in later versions.

Using the service in code

All provider failures are wrapped in AiRequestException with credentials stripped out, so a bad key or rate limit never leaks a secret into your logs or a notification. The fake provider is refused outside local and testing.
Last modified on August 29, 2026