Skip to main content
Performance demand by default. Uncertified API integrations serve CPC (filtered) and CPA demand only. If you render ads in a real client and implement the impression pixel correctly, you can certify for Direct and Programmatic CPM demand. The rules are below and in Choosing your integration path.
The REST API is for architectures where an SDK cannot run: server-rendered stacks, proprietary clients, enterprise deployments. You call the serve endpoint, receive an ad payload, and render it yourself. That last part is where integrations succeed or fail, so read the tracking obligations before writing any code.

Authentication

Send your publisher key in either header. They are interchangeable, and the value is the same:
If you send both, x-mcp-api-key is the one that is read. A request with neither is rejected with 401 Authentification failed: no_api_key.

Serve an ad

https://api.adgentek.ai/functions/v1/mcp-ad-server/get-ad is an alias for this endpoint. Both accept the same request and return the same response, so existing integrations do not need to change. Use /ad-server/v1/ for new ones — it matches the click_url and impression_url values the API returns.
Unknown request fields are ignored, not rejected. A misspelled or invented parameter does not produce an error — the request succeeds and your parameter simply has no effect. Check names against the table above rather than relying on a validation error to catch a typo.

Response

A no-fill returns { "ads": [] }. Render nothing — no-fill is a normal outcome on conversational inventory.

Price fields

Both prices are CPM in USD — the price per thousand impressions, not per impression. Per-impression revenue is cleared_price_usd / 1000. Both are always present on a filled ad.
These two fields currently carry the same number. Both are the winning ad’s clearing price. bid_price is the name to read if you are running an auction; cleared_price_usd is the name to read if you are reconciling revenue. Do not treat them as a bid and a separate settlement price that might differ — today they will not.It is a cleared price, not a raw demand-side bid. The value is what the winning bid cleared at after the auction ran, which is the price you will actually be credited for. That is normally what an auction integration wants, but it does mean it is not the gross bid a demand partner submitted.
Rounding: reconcile against cp, not against cleared_price_usd. Both JSON fields are rounded to 2 decimal places, while the cp query parameter on the impression and click URLs carries the same price at higher precision. In a real response, cleared_price_usd read 4.66 while the URLs carried cp=4.6629.For display, use cleared_price_usd. For settlement figures that must tie out, use cp — at CPM scale the rounding is a real difference.

Rendering and tracking obligations

These three rules determine whether your impressions are billable. They are not optional. 1. Fire the impression pixel client-side, as an image request.
2. Never fire it via fetch.
3. Never fire it from your backend.
Clicks must use click_url from the payload. It routes through the Adgentek redirect layer where click-quality filtering runs. Linking users directly to advertiser destinations breaks CPC billing and fails integration review.

Certification for impression-priced demand

Once your client-side impression implementation is live:
  1. Confirm in your own DevTools that the pixel fires from the browser on render.
  2. Email hello@adgentek.ai with your placement IDs to request an integration review.
  3. On approval, Direct and Programmatic demand become eligible for your placements. Certification is per placement and revocable if server-side impression traffic appears.

Full endpoint reference