Skip to content

Connect Codex to ChatGPT Ads

Connect Codex to ChatGPT Ads in 3 steps: 1. Sign in to ApexGenius and connect ChatGPT Ads. 2. Add the ApexGenius plugin. 3. Start using ChatGPT Ads in Codex. Start in Plugins in the ChatGPT desktop app and authorize your connection.

7 days free · No card required

How to connect ChatGPT Ads to Codex

  1. 1Sign in to ApexGenius and connect ChatGPT Ads
  2. 2Add the ApexGenius plugin to Codex
  3. 3Start using ChatGPT Ads in Codex

FirstConnect ChatGPT Ads to ApexGenius

ThenConnect ApexGenius to Codex

ChatGPT Adsads.openai.com/settings1 of 3

Connect ChatGPT Ads. Create an API key in ChatGPT Ads. You paste it into ApexGenius once.

Then ask Codex:

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

Written setup, step by stepShow

Before you start

  • A ChatGPT Ads Manager account with access to the ad account you want to connect.
  • An Ads API key created in Ads Manager under Settings. Each key covers one ad account, and it is not the Conversions API key used by a website pixel.

1. Connect ChatGPT Ads to ApexGenius

  1. Create an Ads API key in Ads Manager. In ChatGPT Ads Manager open Settings, then General. Under API Keys choose Create New Key, name it, and copy the key once. It is the Ads Management key, not a conversion key.
    The full ChatGPT Ads Manager Settings page with account details and existing keys blurred, and a red box and arrow marking the Create New Key button.
    Settings, then General. Create New Key, marked in red, mints an Ads Management key for this ad account. Account details are blurred in this capture.Open full-size image (opens in a new tab)
    The Create New API Key dialog in ChatGPT Ads Manager with a Key Name field and a note that Ads Manager keys are separate from conversion keys.
    Name the key and choose Create. Copy it once; Ads Manager shows it masked afterwards. Conversion keys are managed separately.Open full-size image (opens in a new tab)
  2. Open ChatGPT Ads in Connections. Sign in to ApexGenius, open Connections, choose ChatGPT Ads, and select Connect.
  3. Enter the Ads API key. Paste the key from Ads Manager Settings. ApexGenius supplies the api.ads.openai.com address, checks the key against the ad account, and stores it encrypted.
    The ApexGenius Connect ChatGPT Ads dialog over the connection page, with a red box and arrow marking the API key field and the signed-in account blurred.
    Paste the Ads API key into the field marked in red. It is not the Conversions API key used by your website pixel.Open full-size image (opens in a new tab)
  4. Review the tools. Open Tools. Reads cover the account, campaigns, ad groups, ads and daily insights. Enabled pause and activate tools run when called. Activating starts spend.
  5. Verify the connected ad account. Use Test connection, then ask your AI the question below. Compare the account name and currency with Ads Manager and check Tool Activity.
Connect ChatGPT Ads →

2. Connect ApexGenius to Codex

  1. In the desktop app, open Settings, then MCP servers and Add server.
  2. Name the server ApexGenius, choose Streamable HTTP, and paste the MCP address above.
  3. Save, then select Restart. Choose Authenticate for ApexGenius and complete the browser sign-in.
  4. When ApexGenius asks what this AI client may use, choose Read only for the first test, or Custom to limit it to the tools you need.
  5. Start a new conversation and select ApexGenius from the available tools before asking for live data.

Watch the setup

Follow each step at your own pace.

Codex desktop app with Plugins selected and ApexGenius listed under Available to your account.
Open Codex in the ChatGPT desktop app, then Plugins, and find ApexGenius.Open full-size image (opens in a new tab)

The walkthrough uses the original ChatGPT web plugin captures. After connecting, open Codex in the desktop app and start a new task with ApexGenius. A ChatGPT web connection does not verify Codex access.

A public ApexGenius plugin listing is not verified. Use a plugin shared with you or one you created, subject to your account and workspace policy.

Create a personal plugin

Where Developer mode is available, open ChatGPT Settings, then Security and login, and enable it. In Plugins, select the plus button, enter ApexGenius and a description, then add this URL under Connection. Create the connection, complete OAuth, and review the tools. Return to Codex in the desktop app and start a new task with the plugin enabled.

https://server.autom8.pro/mcp
OpenAI custom connection guide (opens in a new tab)
No plugin available? Use desktop settings
  1. In the ChatGPT desktop app, open Settings, then MCP servers, then Add server.
  2. Name the server ApexGenius, choose Streamable HTTP, and paste the MCP address below.
  3. Save, select Restart, then Authenticate. Sign in to ApexGenius and authorize the intended connections and access.
  4. Start a new Codex task and ask one read-only question. Check the returned result and its matching successful read in Activity.
https://server.autom8.pro/mcp
OpenAI desktop MCP settings (opens in a new tab)
Manual setup for developers

Codex CLI is optional. Run these commands, complete browser authorization, then start a new session. Do not paste bearer tokens or static authorization headers.

Register the remote MCP server

codex mcp add apexgenius --url https://server.autom8.pro/mcp

Authorize in your browser

codex mcp login apexgenius

Inspect registered servers

codex mcp list

The desktop app, CLI, and IDE extension share MCP configuration on the same host. The IDE extension does not install plugins. ChatGPT web does not read local Codex configuration.

3. Verify one safe read

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

List my ChatGPT Ads campaigns with status and daily budget, and name the connected ad account and currency. Do not pause or activate anything.

Confirm the account and campaign list match Ads Manager. Listing campaigns changes nothing and spends nothing; it does not test pause or activate.

What Codex can do in ChatGPT Ads

15 operations. Read looks things up and changes nothing. Write changes ChatGPT Ads and runs only when that tool is enabled.

Read13 operations

Looks things up. Changes nothing.

Account

  • get_ad_accountRead the connected ad account: name, id, currency, time zone and review status.
  • list_ad_accountsList the ad accounts visible to this key. A key covers one account.

Campaigns

  • list_campaignsList campaigns with status, objective and daily budget.
  • get_campaignRead one campaign, including targeting and landing-page template.
  • get_campaign_insightsSpend, impressions, clicks and conversions for one campaign by day.

Ad groups and ads

  • list_ad_groupsList ad groups with their context hints and bids.
  • get_ad_groupRead one ad group.
  • get_ad_group_insightsDaily results for one ad group.
  • list_adsList ads with creative title, body, link and review status.
  • get_adRead one ad.
  • get_ad_insightsDaily results for one ad.

Account insights and conversions

  • get_account_insightsAccount insights by day, grouped by campaign, ad group or ad, with the fields you choose.
  • list_conversion_event_settingsList the conversion events attached to campaigns. Only attached events count as conversions.

Write2 operations

Changes ChatGPT Ads. Runs only when enabled.

Campaign state

  • pause_campaignPause a campaign. Stops spend until it is activated again.
  • activate_campaignActivate a campaign. Starts spend at its daily budget until someone pauses it.

You choose what Codex can use

When you approve Codex, pick Full access, Read only, or Custom. Read only allows the Read operations and nothing else. Custom picks apps and tools one by one.

Limits in ChatGPT Ads

  • · An Ads API key is scoped to one ad account. Connect again for a second account.
  • · Reads never change anything. Pause and activate are the only writes, both run when enabled, and activating starts spend at the campaign budget.
  • · Archive, budget changes, spend limits, key creation and image uploads are not exposed. Image changes happen in Ads Manager.
  • · Disconnecting stops future gateway access. It does not undo a pause or activate that already ran.

What it looks like in Codex

An illustrative read-only request and response. Your results come from the account and dates you choose.

How the route works
Codex
CodexApexGenius MCP route
Name the connected ChatGPT ad account, its currency and time zone.
ApexGenius
Working with ApexGenius3 reads
RequestConnected read
Account scopeAuthorized connections checked
Salesforceapex_call_read_toolsalesforce_read · Find matching recordsComplete
Salesforceapex_call_read_toolsalesforce_read · Read related activityComplete
n8napex_call_read_tooln8n_get_workflow · Check workflow statusComplete
Codex

Three safe example reads returned results. Nothing was changed.

Read-only route
Codex

Try asking

“Name the connected ChatGPT ad account, its currency and time zone.”

“List my ChatGPT Ads campaigns with status and daily budget. Do not change anything.”

“Show spend, clicks and conversions per campaign for the last seven complete days.”

“Pause the campaign I name. Show me the campaign and its daily budget first.”

Questions people ask first

How do I connect ChatGPT Ads?

Create an Ads API key in ChatGPT Ads Manager under Settings, open ChatGPT Ads in ApexGenius Connections, and paste it. ApexGenius checks it against the ad account before saving it encrypted.

Can my AI read spend and conversions?

Yes. Daily insights return spend, impressions, clicks and conversions by campaign, ad group or ad. Conversions count only the events attached to a campaign in Ads Manager.

Can my AI turn a campaign on or off?

It can pause or activate when the tool is enabled. Activating starts spend until someone pauses the campaign again.

Can it create ads or change budgets?

No. Creating campaigns or ads, editing budgets, spend limits, archiving and image uploads are not exposed through ApexGenius. Use Ads Manager for those.

Is this the same key as my website pixel?

No. The Conversions API key belongs to your site. The Ads API key is created separately in Ads Manager Settings and covers one ad account.

Connect ChatGPT Ads to Codex today

Start free

7 days free. No card required. Disconnect any time.