An OpenAI Ads API key (OPENAI_ADS_API_KEY) is a bearer token that authenticates requests to OpenAI's Advertiser API and Insights API. It is scoped to one ChatGPT Ads account, provisioned in the Settings tab of ads.openai.com, and distinct from the standard OPENAI_API_KEY used for chat completion at platform.openai.com. The Ads API key unlocks programmatic management (campaigns, ad groups, ads, creative files) plus performance reporting across the ad account.
What is the OpenAI Ads API key?
The OpenAI Ads API key is the credential that authenticates requests to OpenAI's advertising platform programmatically rather than through the Ads Manager UI. It is issued in the Settings tab of Ads Manager, scoped to a single ad account, and passed as a bearer token in the Authorization header on every request to the Advertiser API at https://api.ads.openai.com/v1/.
OpenAI launched the ChatGPT Ads platform on February 9, 2026, opened the self-serve Ads Manager beta on April 10, and removed the minimum spend entirely on May 5, 2026. The Advertiser API and Insights API launched alongside the May 5 expansion, giving advertisers and tools (analytics platforms, agencies, integrations like AI-Advisors) a programmatic path to manage and measure campaigns without clicking through the dashboard for every operation.
OpenAI Ads API key vs OpenAI API key (the disambiguation)
The two keys share a name fragment but do completely different things. Confusing one for the other is the most common mistake when developers and marketers first encounter the Ads API. The table below isolates the differences side by side.
| Dimension | OpenAI Ads API key | OpenAI platform API key |
|---|---|---|
| Env-var name | OPENAI_ADS_API_KEY | OPENAI_API_KEY |
| Provisioned at | ads.openai.com → Settings → API keys | platform.openai.com → API keys |
| Base URL | https://api.ads.openai.com/v1/ | https://api.openai.com/v1/ |
| Auth scheme | Bearer token | Bearer token |
| Scope | One ad account per key | Project or organization, multiple permissions |
| What it can do | Manage campaigns + ads + creative files; read insights | Generate completions, embeddings, images, fine-tunes |
| Test endpoint | GET /ad_account | GET /models |
Practical implication: code that imports an OPENAI_API_KEY and tries to call https://api.ads.openai.com/v1/ad_account returns 401 Unauthorized. The reverse fails too. Treat them as two completely separate credentials in your environment, your secrets manager, and your documentation.
What the OpenAI Ads API key lets you do
The Advertiser API exposes five resource families, all scoped inside a single ad account:
| Resource | What you can do |
|---|---|
| Campaigns | Create, list, retrieve, update, change state |
| Ad Groups | Create, list, retrieve, update, change state |
| Ads | Create, list, retrieve, update, change state, monitor review_status |
| Files | Upload creative assets (images, videos) for use in ads |
| Insights | Retrieve performance data across ad_account, campaign, ad_group, and ad scopes |
Insights returns documented metrics for impressions, clicks, spend, CTR, CPC, and CPM. Time bucketing supports daily or none, aggregation level can be set to ad_account, campaign, ad_group, or ad, and the response paginates via cursor-based before / after parameters.
How to provision an OpenAI Ads API key
Sign in to ads.openai.com, open the Settings tab, navigate to API keys, click Create new key, name the key (e.g. "Main account, production"), and copy the value. The key is shown only once at creation. Test it immediately with curl -H "Authorization: Bearer $OPENAI_ADS_API_KEY" https://api.ads.openai.com/v1/ad_account. A successful response returns your ad account's ID, name, timezone, and currency. For the full step-by-step walkthrough plus security best practices, see our companion post on how to get an OpenAI Ads API key.
Scope and rate limits
Each key is scoped to one ad account. Agencies, multi-brand operators, and enterprises with multiple ad accounts need one key per account, or can contact OpenAI directly to enable multi-account access on a single key. The Advertiser API enforces two rate limits in parallel: 600 requests per minute per endpoint and 1,200 requests per minute overall per ad account. Both limits are enforced by ad account AND by IP address, so a request must stay within all four ceilings simultaneously.
Security best practices
- Store as an environment variable. Never hard-code the key in source. Use
process.env.OPENAI_ADS_API_KEY(Node) or equivalent for your runtime. - Keep
.envin.gitignore. Committing the key to a public or private repo creates a permanent leak even after the file is deleted. - Rotate on a schedule. Most teams rotate every 90 days, plus immediately if there is any suspicion the key has been exposed (departing employee, accidental commit, third-party breach).
- Separate dev and production keys. Two keys, two ad accounts, no chance of test traffic affecting production billing or vice versa.
Frequently asked questions
#Is the OpenAI Ads API key the same as my OpenAI platform API key?
No. They are two different credentials issued by two different OpenAI products. The OpenAI Ads API key (OPENAI_ADS_API_KEY) is provisioned in the Settings tab of ads.openai.com and authenticates requests to the Advertiser API and Insights API at https://api.ads.openai.com/v1/. The standard OPENAI_API_KEY is provisioned at platform.openai.com and authenticates chat completion, embedding, image generation, and other model API requests at https://api.openai.com/v1/. They cannot be used interchangeably. A request to the Advertiser API with a platform.openai.com key returns 401 Unauthorized.
#Where in Ads Manager do I find the API key?
Sign in to ads.openai.com, navigate to the Settings tab, and look for the API keys section. Click Create new key, name it, and copy the value. The key is shown only once at creation. If you do not copy it immediately, you have to generate a new key (the old one stays valid but unrecoverable). Each key is scoped to a single ad account; if you need to manage multiple ad accounts via the API, contact OpenAI to enable that.
#What can I do with the OpenAI Ads API key?
Two API surfaces: the Advertiser API (create, list, update, change state on Campaigns, Ad Groups, Ads, and upload creative Files) and the Insights API (retrieve performance data — impressions, clicks, spend, CTR, CPC, CPM — across four scopes: ad_account, campaign, ad_group, ad). You can also build cross-channel reporting that overlays ChatGPT Ads spend and clicks with organic AI citation share, GA4, and Google Search Console traffic.
#Can one API key manage multiple ad accounts?
Not by default. Each OpenAI Ads API key is scoped to exactly one ad account. If you operate multiple ad accounts (agencies managing client accounts, enterprises with separate business units), you need a separate API key per account, OR you can contact OpenAI directly via openai.com/advertisers to request multi-account access on a single key. Until that is enabled for your team, plan on one key per account.
#What happens if I lose my OpenAI Ads API key?
The key value is shown only once at creation. If you lose it, the key itself stays valid but you cannot recover the value. Best practice: generate a new key in the Settings tab, swap it into your environment (env var, secrets manager, or AI-Advisors integration field), then revoke the old key. Treat the key like a password: never commit it to git, never paste it into a public document, and rotate it on a schedule (most teams rotate every 90 days).
#What rate limits does the OpenAI Ads API enforce?
Two limits enforced together: 600 requests per minute per endpoint, and 1,200 requests per minute overall per ad account. Both are enforced by ad account AND by IP address; a request must stay within all four ceilings (per-endpoint per-account, overall per-account, per-endpoint per-IP, overall per-IP). For most marketing workflows the limits are not constraining, but bulk operations like backfilling six months of campaign-level insights can hit the limit if you do not paginate carefully.
