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, custom audiences, product feeds, and conversion setup) plus performance and conversion 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 account minimum 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 has since added conversion setup and reporting endpoints (June 3, 2026) and selectable click and view attribution windows in reporting (September 30, 2026).
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.
A third credential sits next to these two: the Conversions API key. It sends server-side conversion events to a separate OpenAI host and is created in the conversions tab of Ads Manager (approved API partners can also create one through the Ads API). The Ads API key sets up conversion tracking and reads the results back; it does not send the events.
What the OpenAI Ads API key lets you do
OpenAI describes the Advertiser API as the way to create and manage campaigns, ad groups, ads, product feeds, conversion tracking, and reporting. Everything it touches is 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, preview, monitor review_status |
| Files | Upload creative images for use in ads |
| Custom audiences | Create audiences; add, remove, or replace members; merge audiences |
| Product feeds | Create product feeds and send delta updates |
| Conversion setup | Create pixels, Conversions API keys, and conversion event settings (where enabled for the account) |
| Insights | Retrieve delivery and conversion reporting across ad_account, campaign, ad_group, and ad scopes |
| Bulk jobs and audit logs | Run bulk operations; review recorded changes to account resources |
Insights returns delivery metrics (impressions, clicks, spend, CTR, CPC, and CPM) and conversion metrics (conversions, cpa, post_click_cvr, attributed sales, and ROAS). Conversion counts follow a selectable click window of 7, 14, or 30 days (default 30) and a view window of 0 or 1 day (default 1); the windows change reporting only, not a campaign's conversion goal or optimization settings. Time bucketing supports hourly, daily, monthly, 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, URL, status, timezone, currency, and brand review status. 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; OpenAI's API Partner Setup guide tells partners to use the key associated with each client account. 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. Creating bulk jobs has a separate limit of 10 requests per 10 seconds per ad account.
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; agencies and API partners use the key associated with each client account.
#What can I do with the OpenAI Ads API key?
Manage and report on one ad account in code. OpenAI describes the Advertiser API as the way to create and manage campaigns, ad groups, ads, product feeds, conversion tracking, and reporting. That covers campaigns, ad groups, and ads, creative image uploads, custom audiences, product feeds, bulk jobs, audit logs, and conversion setup (pixels, Conversions API keys, and event settings). The Insights endpoints report impressions, clicks, spend, CTR, CPC, and CPM across four scopes (ad_account, campaign, ad_group, ad), plus conversions, cost per action (CPA), post-click conversion rate, attributed sales, and ROAS with selectable click and view attribution windows. You can also build cross-channel reporting that overlays ChatGPT Ads spend and conversions with organic AI citation share, GA4, and Google Search Console traffic.
#Can one API key manage multiple ad accounts?
No. 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. OpenAI's API Partner Setup guide tells partners to use the API key associated with each client ad account and to confirm it with GET /ad_account before configuring anything.
#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). Creating bulk jobs has its own limit of 10 requests per 10 seconds per ad account. 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.
