Add your app
Open Apps in the app owner account. Enter a name and HTTPS URL. The app will be sent for review.
Open workspaceDOCUMENTATION / INAI.AD
For advertisers: prepare a campaign. For app owners: connect the SDK and check delivery. Choose the section you need.
Open Apps in the app owner account. Enter a name and HTTPS URL. The app will be sent for review.
Open workspaceThe key is shown only once. Store it in your server’s secrets. Do not put it in a prompt, browser code or Git. Rotate a lost key in your account.
CONTEXTA_URL=https://inai.ad
CONTEXTA_PUBLISHER_KEY=ctx_pub_YOUR_SERVER_KEYDownload the SDK files into one server folder and create a client. The ad request runs alongside your app; the main AI response is generated separately.
SDK files
Keep server files together. Add AdCard.tsx for React. Plain websites can use contexta-sdk.js.
import { createContexta } from "./inai/server.ts";
const ads = createContexta({
baseUrl: process.env.CONTEXTA_URL!,
apiKey: process.env.CONTEXTA_PUBLISHER_KEY!,
classifier: classifyWithYourExistingModel,
});Use trusted data for age, ad permission and location. Keep sessionId stable across requests and requestId stable when retrying one operation. In need, supply the specific product, budget stated by the user and required features.
const result = await ads.decideConversation({
context: {
requestId: stableOpportunityUuid,
sessionId: stableRandomAdSessionId,
country: trustedCountry, city: trustedCity,
language: "ru", placement: "chat_card",
age: trustedAge, adsAllowed: trustedConsent,
sensitive: safetyResult.isSensitive,
},
messages: recentConversation,
userTurn: fullSessionUserTurnCount,
});
// Only structured need/context leaves your backend.
// Raw conversation stays with your application.Return ad alongside the response or as a separate stream event. Show one card labeled “Ad”. If the user opts out, stop subsequent ad requests.
After the app is approved and delivery enabled, check: a card visible for at least one second produces one impression; a user click produces one click. Retrying the same event must not create another charge.
Names, descriptions, images, prices and currencies, product features and location, when the page provides them. Check the suggested category and offer type. Clarify price ranges, unclear subscription periods and data available only through JavaScript manually. Google Ads is supported through CSV; direct account connection is not available yet.
This is not always an error. Delivery may be off, request data incomplete, no offer suitable or a limit reached. Check the API response reason and the integration status in your account. Do not retry solely to force an impression.
Integrate inai.ad into the existing backend. Read:
https://inai.ad/sdk/partner-integration.md
https://inai.ad/sdk/integrator-agent.md
https://inai.ad/sdk/context-prompt.md
Keep the current AI provider, auth and independent answer.
Use server-only credentials and structured need.
Verify real visibility, native click navigation and reports.
Never fabricate production integration evidence.