Skip to main content

Introduction

OpenAI is one of the broadest providers on the platform. A single key drives:
  • the Image Studio via GPT Image 2,
  • the Copy Studio via the GPT-5.x text models, and
  • an optional alternate image engine inside the Fashion Studio and Product Photoshoot plugins.
This guide walks you through getting an OpenAI key, adding it in MagicAds, and the full list of models it unlocks.

How keys are stored

All AI provider keys live in the AI Settings screen and are stored encrypted in the database. There are no .env edits and no code changes — keys are injected into the drivers at runtime. Users never supply their own key; every generation runs on the admin’s key.
A model only becomes available to users when both are true: the provider’s API key is saved and the model is enabled in the vendor modal.

Before you start

  • Admin access to your MagicAds platform.
  • An OpenAI account with a funded billing balance.
  • Access to the required models (notably gpt-image-2) on your OpenAI account.

Part 1 — Get your OpenAI API key

1

Sign in to the OpenAI platform

Go to platform.openai.com and sign in (or create an account). The API platform is separate from ChatGPT — make sure you’re on platform.openai.com, not chatgpt.com.
2

Set up billing first

Open Settings → Billing and add a payment method. OpenAI’s API runs on prepaid credits or invoiced usage — add a small starting balance so your key can make calls. OpenAI charges you directly for usage; this is separate from your MagicAds platform credits.
3

Open the API keys page

Go to Dashboard → API keys (direct link: platform.openai.com/api-keys). If your account uses projects, pick the project the key should belong to first.
4

Create a secret key

Click Create new secret key, give it a name (e.g. “MagicAds”), optionally scope it to a project, and (if asked for permissions) choose All. Click Create.
The secret key is shown only once. Copy it immediately and store it somewhere safe — you can’t view it again later, only regenerate it.
5

Confirm model access

Make sure your account can use the image model gpt-image-2 and the GPT-5.x chat models. Some models require a minimum spend tier or organization verification on your OpenAI account.

Part 2 — Add the key in MagicAds

1

Open AI Settings

In your platform, go to Admin → AI Settings.
2

Open the OpenAI vendor

Click the OpenAI vendor card to open its configuration modal.
3

Paste the key

Paste your secret key into the API key field. Leaving it blank keeps the existing key unchanged.
4

Enable the models you want

Toggle on the OpenAI models you want to offer and set each model’s credit cost (what a user is charged per generation). For GPT Image 2 you can also set the image quality (see below).
5

Save

Click Save. The OpenAI card now shows as connected, and the enabled models appear in the relevant studios.
There is no “test connection” button. To verify, enable a model and run a quick generation in the matching studio.

Part 3 — Supported OpenAI models

Image Studio

ModelModel IDDefault creditsNotes
OpenAI GPT Image 2gpt-image-22Quality-first image engine. Best-in-class English text rendering, high-fidelity edits, up to 4K. Supports reference-image input and an adjustable render quality.
Image quality knob (GPT Image 2 only): in the vendor modal you can pick auto, low, medium, or high. Quality is the biggest lever on speed — high is slowest, medium is the recommended balance.

Copy Studio

ModelModel IDTierDefault creditsBest for
GPT-5.5gpt-5.5Premium3Flagship quality for complex, high-converting ad copy.
GPT-5.4gpt-5.4Premium2More affordable flagship-tier; excellent all-round copy.
GPT-5.4 Minigpt-5.4-miniStandard1Fast and cost-efficient; great for high-volume runs.
GPT-5.4 Nanogpt-5.4-nanoFast1Smallest/cheapest; ideal for short copy.

Also used by plugins

The Fashion Studio and Product Photoshoot plugins can use OpenAI’s gpt-image-2 as their image engine (selected on each plugin’s own settings page). They read the same OpenAI key, so once it’s configured here those plugins can use it too.
Credit costs shown are the seeded defaults. You can change any model’s credit cost in the vendor modal. These are what your platform charges users in credits — they are not OpenAI’s prices.

Part 4 — Make OpenAI a default (optional)

In the global section of AI Settings you can set the default copy engine to OpenAI and the default image model to OpenAI GPT Image 2, so they’re pre-selected for users. You can also toggle each studio (Image / Video / Copy) on or off and control free-tier access there.

Troubleshooting

SymptomLikely causeFix
OpenAI models don’t appear to usersKey missing or models disabledAdd the key in the OpenAI vendor modal and enable the models, then Save.
”The payload is invalid.” on generateSaved key can’t be decrypted (e.g. after an environment change)Re-enter the OpenAI key in AI Settings and Save to refresh it.
Image generations are slowGPT Image 2 quality set to highLower it to medium in the vendor modal.
OpenAI API errors / 401Invalid key or no model access/billingRe-check the key, billing balance, and gpt-image-2 access in your OpenAI account.
Copy generation fails only for GPT-5.5Account lacks access to that modelDisable that model or enable a tier your account can use.
Keys are stored encrypted and applied at runtime. No .env changes or commands are needed after saving.