For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Overview Agent Access Ads ChatGPT + Codex user docs Use cases

API Reference

Ads API overview

Use the Ads API to manage campaigns, ad groups, ads, audiences, and product feeds, and to measure advertising performance in ChatGPT. This reference describes the available endpoints, request parameters, response fields, and HTTP examples.

  1. Set up your ad account and credentials using the Advertiser API overview. If you manage accounts for other advertisers, start with API Partner Setup.
  2. Retrieve your ad account to verify access and check its currency and time zone.
  3. Follow Campaign Management to create a campaign, an ad group, and an ad. For each request, see the endpoint reference for fields and examples.
  4. Set up conversion tracking and use Reporting to measure results.

Send requests to https://api.ads.openai.com/v1. Use the credentials required by the endpoint. Ads API keys use bearer authentication and are scoped to an ad account; use the key associated with the account you want to manage.

Keep credentials on your server. Do not expose them in browser code or commit them to source control. See Authentication for request headers and supported formats, or API Partner Setup for partner access.

A campaign sets the objective, budget, schedule, and targeting. Ad groups configure bidding and group related ads. Ads provide either the creative and destination or a template backed by a product feed.

Each endpoint shows its method, path, authentication requirements, parameters, response schema, and HTTP example. Most requests use JSON; check upload endpoints for their supported formats. For image URL, multipart, and account-icon examples, see Upload creative assets.

Use values appropriate to your account’s currency and time zone. Review Bidding & Budgets and Targeting before activating a campaign.

When retrying a creation request on an endpoint that supports an idempotency key, send the same request with the same key. Use a new key for a new resource. See the endpoint’s parameter descriptions for pagination and other request-specific behavior.

Start with Troubleshooting for authentication, validation, permissions, and delivery issues. Use Audit Logs to investigate changes to account resources.