Skip to main content
The openai.toml file is the entry point for your entire OpenAI Ads configuration. Every campaign file flows through this single root file via the imports array. When Adjar reads or writes your account, it starts here — resolving imports, validating structure, and assembling a complete picture of your account before making any changes.

Full Example


Top-Level Fields

string
required
Identifies the ad platform this config file targets. Must be "openai" for OpenAI Ads accounts. Adjar reads this field to pick the right driver, so a single --config is all the CLI needs.
array of strings
A list of file paths (relative to the importing file’s own directory, not the repo root) that Adjar loads and merges into this account config. Paths support glob patterns — use *.toml to include all TOML files in a directory. Imports nest: an imported file may itself declare imports, resolved relative to its own location.Within each section, fragments merge in sorted order. Imported fragments may only contain the top-level array section [[campaigns]]; the singletons platform and [account] must stay in the root file. See File Organization for the full rules.

[account] Section

string
required
Your OpenAI Ads account ID, e.g. adacct_6a44ee8e025c819fbd6057719ccb8545. Your API key already scopes every call to a single account, so this value is mainly a human-facing label and a cross-check — Adjar reads the live account ID from the API and confirms it matches. Get it from the OpenAI Ads dashboard or the ad_account endpoint (see OpenAI Ads API access).
Unlike Google Ads, OpenAI Ads has no account-level asset library (sitelinks, callouts, structured snippets). It does have account-level conversion event settings — the [[conversions]] block — which campaigns reference by ID; everything else lives inside the campaign tree.

File Layout

Adjar does not enforce a specific directory layout. A config can stay a single file or be split across many via the imports directive above — the recommended convention is one file per campaign. See File Organization for when to split, how imports composes and resolves files, and the write-back rules that follow.
  • Campaigns — budgets, bidding, targeting, and ad groups inside each campaign file
  • Creatives — the chat_card ads nested inside ad groups
  • OpenAI Ads API access — producing the openai.json credentials file