Advancedv1.2.0

Register a Custom AI Provider

Formcierge ships with OpenAI, Gemini, and a free built-in provider. If you want to use a self-hosted LLM, Anthropic Claude, or any other model, you can register a custom AI provider using the formcierge_register_ai_providers hook.

Implement ProviderInterface

Create a PHP class that implements FormciergeAPIAIProviderInterface. The interface requires two methods: get_id() and generate().

Register the provider

Hook into formcierge_register_ai_providers to add your provider to the list. This hook fires after formcierge_init.

Select the provider in Settings

Go to Formcierge → Settings → AI. Your custom provider now appears in the AI Provider dropdown. Select it, enter any required credentials, and save.

Custom providers integrate fully with the AI chat UI, the screenshot analyser, and the form generation pipeline. All of the same prompt-engineering features (field type detection, label normalisation, required/optional inference) are applied to your provider's output.