Get an OpenAI API key
OpenAI's API powers GPT-4o, GPT-4o-mini, and the rest of the GPT family. TrafficLoopback uses OpenAI for ad creative generation when it's registered as one of your providers. You need an account, billing set up (even if just $5 prepaid), and an API key.
OpenAI does not have a free API tier — even GPT-4o-mini requires billing. Typical ad-gen usage is pennies per generation. If you want a fully-free setup, start with the Google AI Studio key (Gemini has a real free tier) and add OpenAI later as failover.
1. Create an OpenAI account
Go to platform.openai.com/signup. Use a real email — you'll need to verify it. After verification you land on the developer platform dashboard at platform.openai.com.
2. Set up billing
- In the left nav, click Settings.
- Click Billing.
- Add a payment method (credit card).
- Add prepaid credit — $5 is fine to start. OpenAI deducts per request as you use it.
Without billing set up, your API key works but every request returns a quota error. The first $5 typically lasts months for ad-gen workloads.
3. Create the API key
- In the left nav, click API keys (or go directly to platform.openai.com/api-keys).
- Click Create new secret key.
- Give it a name like
trafficloopbackso you can identify it later if you have several. - Permissions: select Restricted and grant only
Model capabilities → Write. This limits the blast radius if the key ever leaks. - Click Create secret key.
- Copy the key immediately. OpenAI never shows it to you again. If you lose it, you have to delete and recreate.
Security: the key starts with sk-... and is fully equivalent to your billing credentials. Don't paste it into chat, screenshots, or git. TrafficLoopback stores it encrypted in our database.
4. Add it to TrafficLoopback
- Sign in at trafficloopback.com/login.
- Go to Settings → API keys.
- Click Add key and pick OpenAI.
- Paste the key. Give it a label (e.g.
Main) and a priority (1 = highest). - Save.
5. Encourage failover — add a second provider
OpenAI's API has scheduled maintenance and occasional outages. If OpenAI is your only provider, generation stalls during those windows. We strongly recommend adding at least one other provider as failover:
- Google AI Studio (Gemini) — has a free tier, fast, good fallback
- Anthropic (Claude) — most reliable for nuanced brand tone
With two providers registered, TrafficLoopback automatically falls through to the secondary on any OpenAI error. See Why multiple AI keys for how failover works.