# 02 — AI Provider API Setup

AgizoAI Publisher can use several text AI providers for article drafts, research-based articles, rewrites and SEO metadata.

## Supported Text Providers

- OpenAI
- Claude / Anthropic
- Google Gemini
- Custom OpenAI-compatible API endpoint

WEBP image generation is configured separately and uses the image model settings.

## Setup Steps

1. Open **AgizoAI Publisher → Settings**.
2. Choose the **Text AI Provider**.
3. Paste the matching API key.
4. Enter the model name for that provider.
5. Click **Save Settings**.
6. Click **Verify Selected AI Provider**.
7. Generate one draft article and review it before enabling automated workflows.

## OpenAI

Use the OpenAI API key field and an OpenAI text model. If you also want WEBP images, configure the OpenAI image model under the same API section.

## Claude / Anthropic

Use the Claude API key field and enter the Claude model you want to use. Claude is used for text generation, rewrites and SEO packages.

## Google Gemini

Use the Gemini API key field and enter a Gemini model. Gemini is used for text generation, rewrites and SEO packages.

## Custom OpenAI-Compatible API

Use this when your provider supports the OpenAI-style `/chat/completions` endpoint.

Fields:

- Custom API Base URL, for example `https://api.example.com/v1`
- Custom API Key
- Custom model name

The plugin automatically appends `/chat/completions` unless the URL already ends with that path.

## Common Verification Errors

### Missing key
The selected provider key field is empty.

### Invalid model
The model name may not exist, may not be enabled for your account, or may use a different naming format.

### Billing or quota error
The selected provider account may not have active billing, credits or usage permissions.

### Server connection error
Your host may block outbound HTTPS requests. Ask the host to allow requests to the selected AI provider.

## Security Notes

- Only WordPress administrators should access this settings page.
- Do not share API keys with users, authors or contributors.
- Rotate any key that was exposed publicly.
- Use official provider dashboards where possible.


## External AI consent

Before verifying an API key or generating content, open **AgizoAI Publisher > Settings** and tick the external AI consent checkbox. This confirms that selected prompts, post content, research notes, metadata and verification requests may be sent to the chosen provider.
