← Back to Help Center
For AI Platforms
How it works
Gravity delivers sponsored suggestions that match what users are already interested in. Add a few lines of code, and your AI product starts earning revenue on a CPM or CPC basis, depending on the campaign.
- A user interacts with your AI product. A chat message, a search query, a prompt.
- Your app requests an ad from Gravity. Gravity fetches sponsored suggestions in parallel with your LLM call, so the AI response is not held back waiting for the ad.
- The ad appears alongside the AI response. The SDK displays it and logs the impression.
- You get paid. CPM or CPC revenue, depending on the campaign.
Integration
Two SDKs cover the full integration:
- Request Ads (Server): @gravity-ai/api for Node.js / TypeScript, or gravity-sdk for Python
- Show Ads (Client): @gravity-ai/react renders ads with automatic impression tracking and click handling
Why Gravity
- Parallel ad requests. Gravity fetches sponsored suggestions in parallel with your LLM call, so the AI response is not held back waiting for the ad.
- Contextual matching. Gravity uses the conversation context to match ads to what users are actively interested in.
- CPM or CPC revenue, depending on the campaign.
Supported platforms
Gravity works with any AI product:
- AI chat products
- AI search engines
- Coding assistants and IDEs
- AI-powered consumer apps
- Autonomous agents
Analytics
Your dashboard tracks everything in real time:
- Impressions
- Fill rate
- CTR
- Revenue