Claude Desktop / ChatGPT (OAuth — recommended)
Add AdStellar to yourclaude_desktop_config.json with no key at all:
API key (for your own agents)
Create a key in Settings → Developers (or viaPOST /api/settings/api-keys), then:
“What’s my current credit balance and which ad accounts are connected?”
“Generate 5 headline variants for my default brand kit, bold tone, goal: drive trial signups.”
“Generate a 9:16 image ad for my product, 2 variations” — then “check the status of batch <id>”
“How did my campaigns perform over the last 7 days, grouped by campaign?”
REST API
Every MCP tool is also a REST endpoint —POST /api/v1/tools/{toolName} with the same bearer credential:
GET /api/v1/openapi.json).
Raw JSON-RPC (for debugging)
initialize, ping, tools/list, tools/call (single or batched). The server is stateless — every POST is self-contained.
Building your own agent
- Create a key with only the scopes your agent needs.
- On startup, call
tools/listto discover the tools visible to that key. - Call
get_team_infoto confirm which team you’re acting on. - Use
list_modelsbefore any generation call so you can pass an explicitmodelid (or omit it for the default router). - Generation is async: call
generate_image/generate_video, then pollget_generation_statusuntilcomplete: true.