In-Chat Ads¶
An in-chat ad is a single sponsored message that a chatbot or AI assistant shows in its conversation, clearly labeled and chosen to fit what the conversation is about. Your bot asks for an ad at a natural pause, and the network returns one ad or nothing. This page describes the credential your bot uses, the serving loop, and the responsibilities that come with hosting ads.
Fetch keys¶
A fetch key is the credential that identifies your application when it
requests ads. Each fetch key is bound to one application, so requests with
it need no application parameter. The console creates one for each new account, labeled
Default fetch key. To find it, open the Monetize section of the
console and click Get Started. The
key is under 1 ยท Your fetch key.
A request with a fetch key and no adUnit serves into the key's
application's default ad unit, so a first integration needs no setup in the console. Keep
the key on your server, except in the web embed, where the
key appears in the page like any ad tag.
The serving loop¶
Every integration, whatever its client, runs the same loop against the Fetch API:
- Fetch. At a pause in the conversation, your bot requests an ad and
sends a short summary of the conversation as
context. - Render. A
200response contains one ad. Your bot shows it on its channel, labeled Sponsored. A204response means no ad fits this moment, and your bot continues without one. - Track clicks. The links in the ad are click-tracking URLs. Present them unchanged, and each tap is recorded before the person reaches the advertiser.
- Report. Your bot reports deliveries, reads, and conversions with the
ad's
messageId. See the Events API.
Your responsibilities¶
Hosting ads in a conversation comes with three duties:
- Disclose. Label every ad Sponsored, or the equivalent in the conversation's language. The AdKit tools and render helpers add the label. If you render the card yourself, you add it.
- Choose the moment. Fetch after you have finished helping, such as after an answer, at the end of a task, or at a farewell. Don't fetch in the middle of a task or in sensitive conversations about health, grief, or distress. The network also runs its own appropriateness check and returns no ad when the moment is wrong.
- Report honestly. Report a conversion only when one happens.
Context and privacy¶
The context you send selects a relevant ad, and is then discarded. It is
never written to journals, analytics events, or logs. The network keeps only
a one-way hash of it and its length. Selection uses no cookies and builds no
profile of the person in the conversation. The subscriber identifier you
send is an opaque value you choose, used for frequency caps.
What's next¶
- Serve your first ad with the MCP quickstart or the REST quickstart.
- Learn the client tools in AdKit.
- Read every request parameter in the Fetch API reference.