Skip to content

ChatGPT

ChatGPT AI content generation via OpenAI Chat Completions API. Installing and configuring this extension registers ChatGPT as a selectable AI provider platform-wide: admin content generation and prompt templates, AI-assisted SEO (meta and image alt text), the cart's AI order-list parser, and J'AI Chat replies all resolve their provider from the same registry. ChatGPT supports both text and vision (image) requests.

At a glance

Extension id chatgpt
Category ai
Version 0.1.0
Provides AI completion strategy (chatgpt), text + vision
External account OpenAI account with API key

What It Provides

  • AI completion strategy — an AICompletionStrategy implementation registered under the name chatgpt, calling https://api.openai.com/v1/chat/completions with Bearer authentication.
  • Vision supportsupports_vision is True; multimodal requests send the image as a base64 data: URL in an image_url content part alongside the text prompt.
  • Connection testing — a build_test_strategy hook consumed by the testAiProviderConnection GraphQL mutation, so the admin can verify a key without persisting it.
  • Hot reload — a hot_reload(config) hook: saving new config in the admin re-registers the strategy immediately, without an API restart.
  • Settings deep link — the manifest points the Extensions list's Configure action at /settings/ai (AI Providers).

Once registered, the provider appears in the aiProviders GraphQL query (with a live health check) and is eligible for generateAiContent, SEO meta/alt-text generation, cartAiParseToLookupItems, and J'AI Chat — see Building Extensions for the strategy registry.

Setup

  1. Enable the extension for a channel under Settings > Extensions.
  2. Provide credentials — the install hint reads: "Set OPENAI_API_KEY env var or configure via the extension settings." The config-form api_key takes precedence; the OPENAI_API_KEY environment variable is the fallback when no key is saved.
  3. Optionally choose a Model and Max Tokens default in the config form.
  4. Save. The strategy hot-reloads from the decrypted config immediately.
  5. Verify on the AI Providers page (Settings > AI) — the connection test makes a minimal one-token call against the configured model.

Configuration Reference

Key Type Required Secret Description
api_key password Yes Yes OpenAI API key. Falls back to the OPENAI_API_KEY env var when unset.
model select No No Default gpt-4o. Options: GPT-4o (Recommended), GPT-4o Mini (Fast), GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano (Fastest), o3-mini (Reasoning).
max_tokens number No No Default 1024. Default max-tokens budget for completions.

password-type fields are Fernet-encrypted at rest and masked (***) when read back through the admin API.

Permissions

The manifest declares no permissions.

Operational Notes

  • No key, no provider — if neither the config api_key nor OPENAI_API_KEY is set, the strategy is not registered at all (a warning is logged); ChatGPT then does not appear in aiProviders and is skipped by auto provider selection. Saving a key later registers it without a restart.
  • Health check is a real callhealth_check posts a one-token "ping" completion to the configured model with a 10-second timeout, so a failing check can mean a bad key or an invalid model name.
  • Timeouts — 60 s for text generation, 120 s for vision requests, 10 s for health checks.
  • Masked-key test fallback — if the admin posts the masked *** value to the connection test, core falls back to the stored, decrypted key for that provider.
  • Multi-channel config — the strategy is registered once per process; at boot the extension loads the first enabled channel row whose config contains an api_key.