Bid request and response formats, AI extensions, and protocol details
Register your app, get an API key, and start monetizing in under 5 minutes
Create campaigns, set budgets, and reach users across AI applications
Install the SDK, make a bid request, and display your first ad in three steps.
<script src="https://promptbid.ai/sdk/promptbid.js"></script>
// Or via npm
npm install @promptbid/sdk
const pb = PromptBid.init({
apiKey: 'your_builder_key',
sandbox: true
});
const ad = await pb.getAds({
context: 'hotels in Tokyo',
format: 'native'
});
// Render the ad in your UI
showAd(ad.creative);
// Track clicks (earnings auto-recorded)
ad.on('click', () => {
pb.recordClick(ad.id);
});
// Check your earnings
const stats = await pb.earnings();