DocsGet StartedOverview

Overview

Adtext is a contextual ad network built for LLM-powered apps — chatbots, AI search engines, coding assistants, and any product where the context is a conversation rather than a webpage. Install the SDK, push conversation turns, and earn revenue from ads that are genuinely relevant to what the user is discussing.

Conversation-aware

Ads are targeted from the live conversation context — not cookies or browsing history.

Privacy-first

Raw text is discarded after enrichment. Only enriched metadata (topics, intent) is stored.

One SDK, any stack

JavaScript / Node.js and Python today. Java, Kotlin, Swift coming soon.

Available SDKs

JavaScript / Node.js

stable

npm install @adtext/sdk

Python

stable

pip install adtext-sdk

Java

stable

ai.adtext:sdk:1.0.0

Kotlin / Android

preview

Via Java SDK

Swift / iOS

planned

OpenAPI generator

Flutter

planned

Coming soon

How it works

1
Create an API keySign up and generate an API key from your publisher dashboard.
2
Install the SDKAdd the SDK to your app with npm or pip.
3
Open a context sessionCall createContextSession() at the start of each conversation.
4
Push turnsCall pushTurn() after each user and assistant message.
5
Fetch an adCall getAd() whenever you want to show an ad. The server uses the enriched conversation context to pick the best one.