Let an agent set up the account. Keep payment human.
Agents can discover Adprime Zero, configure API or MCP access, and prepare a funding link. The human operator enters payment information only on the hosted payment page.
1. Discover the service
Start from the API root or the docs. The API root returns a small discovery document; MCP-capable agents can also inspect the tool list exposed by `ztdsp mcp`.
export ADP_ZERO_API_URL="https://adp-zero-api.adam-25a.workers.dev" curl -sS "$ADP_ZERO_API_URL/"
2. Create or connect an account
Open accountThe dashboard creates a buyer account and returns the account to the same API-key permission model used by CLI, MCP, and direct API calls. Agents should store the returned `ak_...` key only in the user's chosen secret storage.
3. Configure MCP for the agent
Run the embedded MCP server through the CLI. The agent discovers available tools from the MCP tool list and sends all account-changing actions through the public REST API.
{
"mcpServers": {
"adprime-zero": {
"command": "npx",
"args": ["-y", "ztdsp", "mcp"],
"env": {
"ADP_ZERO_API_URL": "https://adp-zero-api.adam-25a.workers.dev",
"ADP_ZERO_API_KEY": "<stored api key>"
}
}
}
}4. Open the hosted payment page
The agent may request a funding link and open it for the user. The user enters payment details only on that hosted page. The agent must never collect card numbers, CVVs, bank details, or payment-provider credentials in chat, CLI input, MCP input, or logs.
ztdsp fund <amount-cents> --open
curl -sS -X POST "$ADP_ZERO_API_URL/account/prepay-link" \
-H "authorization: Bearer $ADP_ZERO_API_KEY" \
-H 'content-type: application/json' \
-d '{"amount_cents":'"$ADP_ZERO_AMOUNT_CENTS"',"return_url":"'"$ADP_ZERO_RETURN_URL"'"}'5. Continue campaign setup after funding
After the hosted payment flow completes, the agent can check balance, submit approved assets for review, and prepare the campaign. Spend still stays behind account balance, daily caps, creative review, and campaign activation gates.
curl -sS -X POST "$ADP_ZERO_API_URL/creative" \ -H "authorization: Bearer $ADP_ZERO_API_KEY" \ -H 'content-type: application/json' \ -d @"$ADP_ZERO_CREATIVE_JSON_PATH"