AI Assistant

CartUser ships with an OpenAI-powered AI Assistant โ€” accessible from any admin page via the right-side sliding drawer. Generate product descriptions, rewrite content, translate to any language, or write SEO copy with one click.

What it does

Setup

Step 1 โ€” Get an OpenAI API key

  1. Go to platform.openai.com/api-keys.
  2. Create an account if you don't have one.
  3. Click Create new secret key.
  4. Copy the key starting with sk-.
  5. Add billing info ($5-10 credit is plenty to start).

Step 2 โ€” Configure in CartUser

  1. Admin โ†’ Settings โ†’ AI Configuration.
  2. Paste your OpenAI API key.
  3. Choose model (see model selection below).
  4. Set Status to Active.
  5. Save.
  6. Refresh any admin page โ†’ AI tab appears on the right edge of the screen.
Screenshot ยท drop into documentation/screenshots/ai_config.png

AI Configuration page with model selector.

Model selection

Different models = different cost/quality tradeoffs:

Model Quality Speed Cost (per 1K tokens) Recommended for
GPT-4o Mini (default) โ˜…โ˜…โ˜…โ˜… Fast $0.00015 Most users โ€” great balance
GPT-4o โ˜…โ˜…โ˜…โ˜…โ˜… Fast $0.0025 Premium content, longer text
GPT-4 Turbo โ˜…โ˜…โ˜…โ˜…โ˜… Medium $0.01 Long-form articles, complex prompts
GPT-4 โ˜…โ˜…โ˜…โ˜… Slow $0.03 Legacy compatibility
GPT-3.5 Turbo โ˜…โ˜…โ˜… Fastest $0.00050 Bulk operations, low-cost
O4-Mini โ˜…โ˜…โ˜…โ˜… Slow $0.003 Reasoning tasks, careful analysis

Using the AI Assistant

Open the drawer

Click the purple AI tab on the right edge of any admin page. The drawer slides in from the right.

Generate from scratch

  1. Type your content (or topic) in the prompt box.
  2. Click a quick action: Improve, Grammar, Simplify, More Detail.
  3. AI responds in the chat area.
  4. Click Insert to put result into the textarea/editor below the AI button. Or click Copy to clipboard.

Generate from existing text

Click the Generate with AI button that appears under any textarea once you've typed 2+ words. The AI loads with your current text pre-filled โ€” choose Improve/Rewrite/Translate from there.

Translate

  1. Open drawer โ†’ click Translate.
  2. Choose target language (any of 200+).
  3. AI translates current content.
  4. Click Insert.

Tone adjustment

  1. Open drawer โ†’ click More Options.
  2. Scroll to Adjust Tone.
  3. Pick: Engaging, Formal, Casual, Friendly, Exciting, Confident.

Custom prompts

Type your own instruction at the bottom: "Rewrite this as a tweet under 280 characters" or "Add 5 bullet points highlighting eco-friendly features".

Where the AI button appears

Cost management

Set usage limits

OpenAI dashboard โ†’ Usage limits โ†’ set monthly hard cap (e.g. $20).

Choose cheaper model for bulk operations

If you're translating 1000 products, switch to GPT-3.5 Turbo (10x cheaper than GPT-4o). Switch back to GPT-4o for premium content.

Typical costs

Troubleshooting

AI tab not showing

  1. Verify Status = Active in Admin โ†’ Settings โ†’ AI Configuration
  2. Verify API key starts with sk-
  3. Clear cache: php artisan cache:clear
  4. Hard-refresh page (Ctrl+Shift+R)

"Invalid API key" error

Key is wrong or expired. Generate a new one in OpenAI dashboard.

"Quota exceeded" error

Add billing credit at platform.openai.com/account/billing.

"Rate limit exceeded"

Wait 60 seconds, try again. OpenAI free tier has tight rate limits โ€” upgrade your account if it persists.

Response is generic / not useful

Privacy