Skip to main content

Documentation

Complete guides for installing, configuring, and using OpttiAI plugins.

Installation

Installing the Plugin

To install OpttiAI plugins, navigate to your WordPress admin dashboard, go to Plugins > Add New, and search for "OpttiAI". Click Install Now and then Activate.

System Requirements

OpttiAI plugins require WordPress 5.0 or higher, PHP 7.4 or higher, and at least 128MB of PHP memory. For optimal performance, we recommend PHP 8.0+ and 256MB of PHP memory.

Setup

Initial Configuration

After activation, go to Settings > OpttiAI to configure your API key. You can obtain your API key from your OpttiAI dashboard. Enter your key and save the settings.

Connecting Your Account

If you don't have an account, you can create one directly from the plugin settings page. Once connected, your API key will be automatically configured.

Token Usage

Understanding Token Usage

Each AI generation (alt text, meta description, etc.) consumes tokens from your monthly allocation. Token usage varies based on the complexity of the task. On average, each generation consumes approximately 100 tokens, with actual usage varying by image complexity and content length.

Monitoring Usage

You can monitor your token usage in the OpttiAI dashboard. The plugin also displays your remaining tokens in the WordPress admin panel. When you're running low, you'll receive notifications.

API Explanation

API Endpoints

OpttiAI plugins use RESTful API endpoints to communicate with our servers. All API calls are made over HTTPS using secure authentication. Your API key is encrypted and stored securely.

Monthly Quotas

Each plan includes a monthly token allocation. Free plans include 50 tokens per month, Pro plans include 1,000 tokens per month, and Agency plans include 5,000 tokens per month. Each AI generation consumes approximately 100 tokens from your monthly allocation (varies by complexity). If you exceed your quota, you'll receive a 403 error and need to wait for the monthly reset (1st of each month at 00:00 UTC) or upgrade your plan.

Plugin API Reference

Required Headers

All plugin API requests require the X-Site-Hash header, which is a unique identifier for your WordPress site. Optionally, you can include X-License-Key header (or licenseKey in the request body) to link your site to a license. The license key format is a UUID (e.g., 335af811-01f3-479e-ba72-04ddf43865ec).

Generate Endpoint

POST /api/generate - Generates AI content (alt text, meta descriptions, etc.). Required headers: X-Site-Hash (required), X-License-Key (optional). Request body should include image_data and service fields. The endpoint uses site-based quota tracking, so all users on the same site share the monthly token allocation.

Usage Endpoint

GET /api/usage - Returns current usage and quota information for your site. Accepts X-Site-Hash and X-License-Key headers. Returns remaining tokens, limit, and plan information. This endpoint checks license quota first, then falls back to site-based quota if no license is found.

Authentication Flow

For free tier sites, only X-Site-Hash is required. The site will use site-based quota (50 tokens/month). License keys are optional but help link the site to a license for paid plans. License keys can be provided either as X-License-Key header or as licenseKey in the request body, with header taking precedence.

Data Privacy

What Data is Sent

When generating alt text or meta descriptions, the plugin sends the following data to our servers: image file (for alt text), post content (for meta descriptions), and your site URL. This data is used solely for AI processing and is not stored permanently.

Data Retention

Processed data is temporarily stored for up to 24 hours for quality assurance and then permanently deleted. We do not use your content for training AI models or any other purpose.

Third-Party Services

OpttiAI uses OpenAI and other AI service providers to process your requests. These services are bound by strict data processing agreements and do not retain your data after processing.

Error Handling

Understanding Error Codes

The API returns specific error codes to help diagnose issues. A 403 Forbidden error indicates you've exhausted your monthly quota - wait for the monthly reset (1st of each month at 00:00 UTC) or upgrade your plan. A 429 Too Many Requests error indicates OpenAI rate limiting (not user quota) - wait a moment and try again. A 401 Unauthorized error means your API key is invalid or expired. Authenticated requests bypass IP-based rate limiting.

Quota Exhaustion

When you run out of monthly tokens, the API returns a 403 error with code "NO_ACCESS". You can check your remaining quota using the usage endpoint. Free tier users get 50 tokens per month that reset automatically on the 1st of each month at 00:00 UTC. Paid plans have higher limits and can purchase additional credits. The reset date is available in the usage endpoint response.

Troubleshooting

Plugin Not Generating Alt Text

If the plugin is not generating alt text, check the following: 1) Verify your API key is correct, 2) Ensure you have remaining tokens, 3) Check that images are properly uploaded, 4) Review error logs in Settings > OpttiAI > Logs.

API Connection Errors

If you're experiencing API connection errors, verify your server can make outbound HTTPS requests. Some hosting providers block outbound connections. Contact your host or check the plugin logs for specific error messages.

Slow Generation Times

Generation times depend on image size and server response times. Large images may take longer to process. Consider optimizing images before upload or using the bulk processing feature during off-peak hours.