Guides

Ads and Validation

Show ads with your content and understand how they keep inference free.

Ads shown in your app help fund token generation. Koah uses the context of the user's query to select relevant ads and keeps them separate from the model's output.

Display ads with the result

Show an ad only when Koah requests one by returning an ad ID. Not every inference response includes an ad ID. If there is no ID, show the generated content without an ad and do not call the renderer.

Place the ad in a visible slot below or beside the generated content. Keep the Sponsored label visible so users can distinguish the ad from the result.

  • In your app: use the Koah SDK to render the ad ID returned with inference.
  • In a coding agent: keep the Koah plugin enabled so it can display the ad alongside the task result.

The SDK or plugin handles ad delivery and measurement. You do not need to build an ad card, fetch its contents, or report impressions yourself. See the quickstart for the planned ad-ID APIs.

Keep ads out of generated text, source files, and tool output. For streaming, wait until the result is complete before showing the ad.

How validation works

Koah compares inference usage with ad delivery and display signals to check that free token generation is supported by visible ads. Valid ad views help fund free inference. A response without an ad ID is expected and does not count as a missed ad display.

Receiving an ad ID or calling the renderer does not, by itself, confirm a valid view. Hidden placements and duplicate reports do not count as additional valid views. The SDK supplies the display signals; Koah validates them.

Users do not need to click an ad. Do not ask them to click to unlock a result or continue using your app.

When ad revenue exceeds inference costs

If your app earns more ad revenue than it uses for inference, Koah pays out the surplus through its publisher payout process. Ads can cover your token costs and generate earnings for your app.

When an ad cannot display

Keep the generated content visible if ad delivery fails. If no ad ID is returned, there is no ad to show.

An occasional display failure is different from repeatedly skipping ads. Check persistent problems with your SDK or plugin setup. Repeated missing displays of requested ads can reduce your rate limits.

Next steps

Was this helpful?