'empty' ]; if ( ! empty( $chk['error'] ) ) { echo '

Site Key Error: ' . esc_html( (string)$chk['error'] ) . '

'; unset( $opt['site_token'] ); } else { $opt['site_token'] = $new; echo '

Site Key saved. Pro mode activated!

'; } update_option( 'aatb_settings', $opt ); $token = $opt['site_token'] ?? ''; $mode = function_exists( 'aatb_active_mode' ) ? aatb_active_mode() : 'none'; } /* Alt-Text settings (model + language + custom prompt + auto_generate) */ if ( $action === 'aatb_save_alt_settings' ) { $allowed = ['gpt-4.1-mini','gpt-4o','gpt-4.1']; $chosen = sanitize_text_field( wp_unslash( $_POST['model_choice'] ?? 'gpt-4.1-mini' ) ); $opt['model_choice'] = in_array( $chosen, $allowed, true ) ? $chosen : 'gpt-4.1-mini'; $sel = sanitize_text_field( wp_unslash( $_POST['lang_choice'] ?? 'en' ) ); $opt['lang_choice'] = ( $sel === 'other' ) ? sanitize_text_field( wp_unslash( $_POST['lang_custom'] ?? 'en' ) ) : $sel; $cp = sanitize_textarea_field( wp_unslash( $_POST['custom_prompt'] ?? '' ) ); if ( mb_strlen( $cp ) > 1500 ) { $cp = mb_substr( $cp, 0, 1500 ); } $opt['custom_prompt'] = $cp; $opt['auto_generate'] = ! empty( $_POST['auto_generate'] ) ? '1' : ''; update_option( 'aatb_settings', $opt ); $model = $opt['model_choice']; $lang = $opt['lang_choice']; echo '

Settings saved.

'; } } /* ───────────── PRO MODE: TOKEN / USAGE NORMALIZATION ───────────── */ $usage=$limit=$remain=$site_usage=null; $membership='free'; $allowed_models_ui = ['gpt-4.1-mini','gpt-4o','gpt-4.1']; if ( $token && $mode === 'pro' ) { $st = aatb_check_token_status( $token ); if ( empty( $st['error'] ) ) { $site_usage = (int)($st['site_usage'] ?? 0); $limit = (int)( $st['plan_limit_total'] ?? $st['plan_limit'] ?? $st['token_limit'] ?? 0 ); $usage_total = null; foreach ( ['usage_total','all_usage','total_usage','token_usage','usage'] as $k ) { if ( isset($st[$k]) ) { $usage_total = (int)$st[$k]; break; } } if ( $usage_total === null ) { $usage_total = max(0, (int)$site_usage); } $remain = aatb_status_remaining( $st ); $usage = (int)$usage_total; $membership = strtolower( trim( $st['membership'] ?? 'free' ) ); if ( ! empty( $st['allowed_models'] ) && is_array( $st['allowed_models'] ) ) { $allowed_models_ui = array_values( array_intersect( $allowed_models_ui, $st['allowed_models'] ) ); if ( empty($allowed_models_ui) ) { $allowed_models_ui = ['gpt-4.1-mini']; } } } $canonical = ['gpt-4.1-mini','gpt-4o','gpt-4.1']; $gate = [ 'free' => ['gpt-4.1-mini'], 'starter' => ['gpt-4.1-mini','gpt-4.1'], 'creator' => ['gpt-4.1-mini','gpt-4.1','gpt-4o'], 'expert' => ['gpt-4.1-mini','gpt-4.1','gpt-4o'], ]; if ( isset($gate[$membership]) ) { $allowed_models_ui = array_values( array_intersect($canonical, $gate[$membership]) ); } if ( ! in_array($model, $allowed_models_ui, true) ) { $model = 'gpt-4.1-mini'; $opt['model_choice'] = $model; update_option('aatb_settings', $opt); } } $trial_remaining = (int) ( $opt['trial_remaining'] ?? 0 ); $byok_key_masked = ''; if ( ! empty( $opt['openai_key'] ) ) { $k = $opt['openai_key']; $byok_key_masked = substr( $k, 0, 7 ) . str_repeat( '*', max( 0, strlen($k) - 11 ) ) . substr( $k, -4 ); } $is_pro = $mode === 'pro'; ?>
AI Alt Text Builder

AI Alt Text Builder

Media Library ALT Text Generator

__( 'Free trial', 'ai-alt-text-builder' ), 'byok' => __( 'Own API key', 'ai-alt-text-builder' ), 'pro' => __( 'Pro', 'ai-alt-text-builder' ) ]; ?> v

Getting Started

Choose how you want to generate alt text for your images.

Your plan

Mode, usage and key for this site.

FREE

Free Trial

Start instantly with 25 free alt text generations. No API key needed.

  • 25 free generations
  • Economical quality tier
  • English only
  • One image at a time
  • Alt text quality labels

No credit card required

UNLIMITED

Your Own API Key

Use your own OpenAI API key. You pay OpenAI directly, we don't touch your key.

  • Unlimited generations
  • OpenAI GPT-4.1 mini with your key
  • English only
  • One image at a time
  • Alt text quality labels

Your key stays on your server

PRO

RankPilotAI Pro

Full power with zero API hassle. We handle everything, just use your tokens.

  • No API key needed
  • Bulk generation
  • Auto-generate on upload
  • All quality tiers
  • All languages
  • Custom directives
  • Alt text quality labels

Get a site key

Free Trial Active

of 25 tokens remaining

/ 25

Your trial tokens are used up. Choose one of these options to continue:

Upgrade to Pro

OpenAI API Key Active

Unlimited single image generations

Pro Mode Active

Full access to all features

Connected
Website
Used
Limit
Remaining
% used
8 ? substr( $token, 0, 4 ) . str_repeat( '•', 8 ) . substr( $token, -4 ) : str_repeat( '•', 8 ); ?>

Alt text settings

Configure how AI generates alt text for your images.

Quality tier

Economical only

Alt text language

English only

Select "Other / Custom" and type the language exactly as you'd like it.

English All languages with Pro

Custom directives

PRO

Optional. Add brand or style guidance. Your note is appended to the built-in instructions and takes priority over general rules; the 125-character limit always applies.

Add custom brand or style guidance to your alt text generations.

Available with Pro

Auto-generate on upload

PRO

Automatically generate alt text every time you upload an image.

Available with Pro

Compare modes

See what's available in each mode.

Feature Free Trial Own API Key Pro
No API key needed ✓ ✕ Your OpenAI key ✓ We handle it
One-click generation ✓ ✓ ✓
Bulk generation ✕ ✕ ✓
Auto-generate on upload ✕ ✕ ✓
Alt text quality labels ✓ ✓ ✓
Languages English English All languages
Quality tiers Economical GPT-4.1 mini Economical / Balanced / Premium
Custom directives ✕ ✕ ✓
Generations 25 lifetime Unlimited Plan-based