# Jutera — Free AI for your users, rewards included > Jutera's AIRewards SDK adds free AI chat to web and mobile apps. End users ask a > question, compare two anonymous AI answers, pick the better one, and can earn in the > publisher's own points, coins, or cash. Publishers earn a share of net ad revenue. ## Pages - [Home](https://jutera.com/): product overview for publishers - [Docs](https://jutera.com/docs): complete integration reference - [SearchRewards Docs](https://jutera.com/docs/search): SearchRewards integration reference - [Changelog](https://jutera.com/docs/changelog): developer-facing SDK changes, newest first - [Create a publisher account](https://jutera.com/dashboard/register) - [Terms of Use](https://jutera.com/terms) - [Privacy Policy](https://jutera.com/privacy) ## AIRewards SDK — integration summary for implementers and agents Product: free AI chat widget for third-party publishers. End users ask a question, get two anonymous AI answers, and pick one plus at least one reason chip. When the pick earns, that creates a reward.earned event and the publisher credits the user from the server webhook. Full human docs: https://jutera.com/docs — implement from there; this file is an index. ## Keys - pk_... publishable: client-safe, identifies the publisher. - sk_... secret: server only. Signs launch tokens; Bearer auth for /v1 APIs. - whsec_... webhook secret: server only. Verifies webhook signatures. ## Flow 1. (Optional, no code) Test: open https://jutera.com/widget?pk=&test=1 — pick + chip creates a test event. 2. Server: mint a launch token per user. JWT-shaped HS256: base64url({alg:HS256,typ:JWT}) + "." + base64url({pk, user_id, metadata, test_mode, iat, exp}) signed HMAC-SHA256 with sk_... . iat (issued at) and exp (expires at) are Unix seconds; exp-iat <= 900s, and a past exp is token_expired. user_id opaque, never an email. metadata.placement is required (1-32 of letters, numbers, underscore, hyphen); other metadata keys are optional. Copy-paste Node, Python, and PHP (all three are in the HTML; language tabs are visual only): https://jutera.com/docs#token Native webviews — iOS, Android, React Native, and Flutter, same rule, all in the HTML: https://jutera.com/docs#native Webhook verify — Node, Python, and PHP: https://jutera.com/docs#verify 3. Browser/native webview: load https://airewards.b-cdn.net/loader@1.js, then AIRewards.init({ publishableKey, launchToken, container, theme, onPick, onEarn, onTokenExpired, onRewardIneligible, trivialGate }). Theme tokens: primaryColor, accentColor, background, textColor, fontFamily, borderRadius, elementRadius, colorScheme, showPoweredBy, typingIndicator ('dots' default, 'bars', 'pulse', 'bloom', 'fade', 'spinner', 'caret', or 'slide'), pickAlignment ('left', 'center' default, or 'right'), headerText ('' hides it; default "Ask anything"), headerLogoUrl / headerLogoUrlDark (https image URL), headerLogoHeight (16-48 px), headerLogoAlt. Saved dashboard Appearance always applies; keys passed in theme override it per launch. 4. Pick moment: onPick / window event "airewards:pick-confirmed" / native bridge {source:"airewards", type:"airewards:pick-confirmed", conversation_id, duel_id, rewarded, reward_eligible, reason, event_id, test_mode} — fires when a pick is confirmed, rewarded or not (event_id is null when it did not earn; no winner or model). Use it as the completion signal; do not count a pick twice from both events. Earn moment: onEarn / window event "airewards:earned" / native bridge {source:"airewards", type:"reward.earned", event_id, test_mode} — UI hint only, fires after onPick when the pick earned. Token expiry: "airewards:token-expired" -> fetch fresh token -> AIRewards.setLaunchToken(t). New chat & history (header buttons top right; hide with theme showNewChat:false / showHistory:false). Promise methods, also on the init() handle: - AIRewards.newChat() -> {ok, abandoned} (abandoned = an unpicked duel was left; it won't earn) - AIRewards.getHistory({limit, cursor}) -> {conversations, next_cursor} for the launch-token user ONLY (no user_id in the browser; use /v1/conversations server-side) - AIRewards.openConversation(conversation_id) -> {ok, conversation_id, resumable} Picked chats are resumable (follow-ups); unpicked chats are read-only and can't be earned on. Rejections: Error.code not_initialized | timeout | widget_reloaded | token_expired | not_found. Events: onNewChat / "airewards:new-chat" {abandoned}; onConversationStarted / "airewards:conversation-started" {conversation_id}. Native webviews: evaluate the same AIRewards.* calls in your bootstrap page (https://jutera.com/docs#chats). Trivial questions (https://jutera.com/docs#trivial): a genuine quick-fact question is handled by the publisher's trivial-question setting (Dashboard -> Settings). Default 'soft': the duel runs and can be picked, but no earning event and no reward.earned webhook fire for that pick. Mode 'hard': blocked with the publisher's rejection message. Per-embed override: trivialGate:'soft'|'hard' in AIRewards.init (test mode) or "trivial_gate" in signed launch-token metadata (live mode). When a soft duel is ready, onRewardIneligible / "airewards:reward-ineligible" {conversation_id, duel_id, reason:"trivial_question", test_mode} fires (UI hint only, same bridge as reward.earned). Neither mode ever pays for a trivial question. Developer changelog: https://jutera.com/docs/changelog 5. Server webhook: POST reward.earned JSON, header AIRewards-Signature: t=...,v1=... Verify HMAC-SHA256(secret=whsec_..., t + "." + rawBody), 5-min tolerance, over raw bytes. Any 2xx = delivered. Dedupe on event_id (at-least-once, ~24h retries). Payload: {id, type, created_at, test_mode, publisher_id, user_id, metadata, duel_id, conversation_id, winner, attributes}. No money fields. 6. Optional: GET https://jutera.com/v1/availability?user_id= (Bearer sk_...) -> {eligible, reason: available|daily_cap_reached|publisher_paused|no_fill_expected|user_ineligible, cache_ttl_seconds: 60} ## Reporting API (Bearer sk_...) - GET /v1/reports/daily?from&to[&group_by=metadata.] Zero-filled days: chats, duels, picks, users, earned, earned_test, provisional_cents, payable_cents, gross_cents. - GET /v1/reports/events?from&to&limit&cursor&user_id&test_mode Cursor-paginated events: event_id, user_id, duel_id, winner, attributes, state (provisional|payable|paid|reversed), publisher_cents, floor_applied, webhook status. - GET /v1/reports/events/:event_id — single event, 404 if not yours. - GET /v1/conversations?user_id&limit&cursor&test_mode — one user's chats, last 90 days, most recent first: conversation_id, title, status (picked|unpicked), resumable, turns, test_mode, created_at, last_activity_at; next_cursor is opaque. - GET /v1/conversations/:conversation_id?user_id — same plus messages [{role, content, created_at}]. Unpicked chats return only the question. 404 unless yours and that user's. ## SearchRewards SDK — integration summary for implementers and agents Product: rewarded web search for third-party publishers. End users submit a search, Jutera redirects to a Yahoo results page, and the publisher credits the user pointcoins from the search.redirected webhook. Jutera renders no widget. Full human docs: https://jutera.com/docs/search — implement from there; this file is an index. - Keys: same pk/sk/whsec pair as AIRewards. Search launch tokens add "product": "search" to the payload; a token minted without it cannot open /sr/go. metadata.placement is required, same rule as AIRewards. - Open https://search.pointcoin.co/sr/go?token=...&q=... in a new tab or by same-tab redirect on the web, or as a webview main document in an app. Never iframe Yahoo or /sr/go — Yahoo sends X-Frame-Options: DENY and frame-ancestors 'none'. - Webhook: POST search.redirected, same AIRewards-Signature header (whsec), any 2xx, dedupe on event_id. Payload: {event_id, type, publisher_id, user_id, metadata, query_hash, vsub, test_mode, monetized, counted, reason, created_at}. No money fields, no raw query. Credit pointcoins ONLY when counted is true. The reward must be named pointcoins; never publish a cash rate per pointcoin or per search. - Availability: GET https://jutera.com/v1/availability?product=search&user_id= (optional user_ip for the geo decision) -> {eligible, reason: available|daily_cap_reached|publisher_paused|user_ineligible|geo_unavailable|geo_blocked}. EU IPs are geo_blocked: no redirect, no webhook, do not offer search there. - Revenue lags one day: nightly affiliate report matched by sub-id (vsub). Reporting: GET /v1/search/reports/daily and /v1/search/reports/lookup (user_id or event_id), revenue always with as_of = report date. - Until staff certify the implementation (uploaded video review), traffic uses a naked Yahoo URL with no partner identifiers. test_mode is always naked. Monetized traffic is US-only for now; other countries stay naked with reason geo_unavailable. ## Rules that matter - Credit users ONLY from the webhook, never from browser/bridge events. - Test mode (unsigned, pk only) always works; test events never pay. - Live mode requires a signed token and an approved (live) publisher account. - Errors: {error:{code}} — unauthorized, invalid_token, token_expired, missing_placement, invalid_placement, not_found, missing_user_id, invalid_cursor.