Offers for your shopping agent, in one call. Only if a person sent it.
Your agent asks
POST /api/v1/agent/offersUser-Agent: trailfinder/1.0Not a crawler or a bot{ "agentClientId": "agc_…", "challengeId": "chl_…", "task": { "category": "outdoor.footwear", "query": "wide waterproof trail shoes", "maxPriceCents": 15000 }, "grant": "eyJ…",A person said yes, with a passkey "operatorProof": "eyJ…"Signed with your agent’s key}Eyeball answers
An agent a person sent. It gets offers.
Sponsored offer from Fennick. Paid placement.
Fennick Ridgeline WP$139
- Comes in a true wide fit in every size.Size chart.
Terms$20 off at checkout
Signed by Eyeball, so your agent can check it came from us.
Start at the well-known file.
One file says where everything is: the API, the page where a person says yes, our public keys and the receipt check.
curl https://isokra.ai/.well-known/eyeball-offers.json
{
"type": "eyeball-offers-discovery/v1",
"issuer": "https://isokra.ai",
"apiBase": "https://isokra.ai/api/v1/agent",
"versions": ["eyeball-offer/v1"],
"grantPage": "https://isokra.ai/grant",
"jwks": "https://isokra.ai/.well-known/eyeball-jwks.json",
"receiptVerification": "https://isokra.ai/api/v1/receipts/verify",
"endpoints": {
"challenge": "/api/v1/agent/challenge",
"offers": "/api/v1/agent/offers",
"decisions": "/api/v1/agent/decisions",
"grantOptions": "/api/v1/agent/grant/options",
"grantVerify": "/api/v1/agent/grant/verify",
"revokeGrant": "/api/v1/agent/grants/{id}/revoke"
},
"outcomes": ["chose", "shortlisted", "passed", "ignored"],
"categories": ["…"]
}- Our public keys are at /.well-known/eyeball-jwks.json. Every grant and receipt names its key with kid.
- Agent endpoints take POST and are rate-limited per IP and per agent client.
Two signatures prove a person sent you.
The person signs once.
They approve your agent at /grant with a passkey, for the categories and the price you ask, for up to 30 days. That is the shopping grant, eyeball-shopping-grant+jwt.
Your agent signs every request.
With its own key, over a challenge that works once and the exact body it sends. That is the operator proof, eyeball-operator+jwt.
- Both signatures, and the request is D1: the only class that gets offers.
- Your signature without a usable grant is D2. A valid signature with a crawler’s or a bot’s user agent is A1. No valid signature is U, or A0 for a crawler or a bot. None of them gets an offer, and none is billed.
- Visit checks use the same two signatures, with a permission for one visit instead of a grant: visit evidence.
Register your agent once.
Your agent signs every request with its own key. Give us the public half and you get an agent client id.
# 1. Make an ES256 key pair. Keep privateJwk on your backend.
node shopping-agent.mjs --keys # prints { publicJwk, privateJwk, kid }
# 2. Signed in to your workspace, same origin:
POST /api/v1/b2a/agents
X-Eyeball-Console: 1
{
"name": "Trailfinder",
"publicJwk": { "kty": "EC", "crv": "P-256", "x": "…", "y": "…" },
"redirectOrigins": ["https://agent.example"],
"mode": "test"
}
201 { "id": "agc_…", "keyId": "…", "mode": "test", "approvedAt": null, … }- name
- 2–100 charactersShown to the person on the approval page.
- publicJwk
- EC P-256 public keyYour operator key. We keep its thumbprint as keyId; it is the kid in every proof you sign.
- redirectOrigins
- https origins, up to 10Where /grant may send the person back. Any other return URL is refused.
- mode
- "test" | "live"Test clients work at once. Live clients get nothing until we approve them.
Send the person to /grant.
The person sees your agent’s name, the categories and how long, and approves with a passkey. They come back to you with a grant.
const eyeball = createAgentClient({
base: 'https://isokra.ai',
agentClientId: process.env.EYEBALL_AGENT_ID, // agc_…
privateJwk: process.env.EYEBALL_AGENT_KEY,
});
// Send the person here. They approve with a passkey.
const link = eyeball.grantUrl({
categories: ['outdoor.footwear'],
days: 30,
returnUrl: 'https://agent.example/eyeball/back',
state: 'session-8f2c',
});
// https://isokra.ai/grant?agent=agc_…&categories=outdoor.footwear&days=30
// &return=https%3A%2F%2Fagent.example%2Feyeball%2Fback&state=session-8f2c
// They come back to:
// https://agent.example/eyeball/back?grant=eyJ…&state=session-8f2c
// Keep the grant. It lasts up to 30 days.- Type
- eyeball-shopping-grant+jwtES256, signed with our keys after the person's passkey check.
- Bound to
- aud = agc_… · categories · maxPriceCentsOne agent client. Categories cover their children: outdoor covers outdoor.footwear.
- Lifetime
- 1 to 30 daysThe person can revoke it sooner. The next request after that gets nothing.
- Who the person is
- per_…A passkey. Never an email, never a name, never shown to brands.
- Political or election categories
- RefusedThey can't be granted and no offer is sent for them.
- The page runs POST/api/v1/agent/grant/options then POST/api/v1/agent/grant/verify. Passkeys belong to isokra.ai, so the person approves there, not inside your app.
- The person revokes with a fresh passkey check at POST/api/v1/agent/grants/:id/revoke.
Challenge, sign, ask.
# 1. A challenge: single use, 60 seconds
POST /api/v1/agent/challenge
{ "agentClientId": "agc_…" }
201 { "challengeId": "chl_…", "nonce": "…", "expiresAt": "…" }
# 2. The body you will send, without operatorProof
body = {
"challengeId": "chl_…",
"agentClientId": "agc_…",
"grant": "eyJ…",
"task": { "category": "outdoor.footwear",
"query": "wide waterproof hiking boots",
"maxPriceCents": 20000, "region": "US" }
}
payloadHash = base64url(sha256(canonicalJson(body)))
# 3. Sign the operator proof, add it, send
POST /api/v1/agent/offers
{ ...body, "operatorProof": "eyJ…" }header { "alg": "ES256", "typ": "eyeball-operator+jwt", "kid": "<keyId>" }
claims {
"iss": "agc_…", // your agent client
"sub": "agc_…", // the same
"aud": "https://isokra.ai", // the Eyeball origin
"nonce": "<challenge nonce>",
"action": "offers.request", // or "decisions.report"
"payloadHash": "<as above>",
"iat": 1762900000,
"exp": 1762900300, // at most 300 seconds after iat
"jti": "<random>"
}- payloadHash covers the whole body as sent, grant included, with only operatorProof taken out. Leave out members you don’t send; don’t send null for them.
- canonicalJson sorts object keys at every level and writes everything else with JSON.stringify. The SDK exports it, with requestPayloadHash and signOperatorProof.
- Each challenge works once. Ask for a new one for every request and every decision.
- Add placementId when the request comes from a publisher’s page. That is what makes a delivery billable.
Only D1 gets offers.
Every request is answered 200 with its class. A valid operator proof and a valid grant for this agent, category and price make it D1. Anything less gets an empty list and a reason code.
200 {
"class": "D1",
"offers": [{
"offer": {
"type": "eyeball-offer/v1",
"id": "ofr_…", "version": 3,
"sponsored": true,
"sponsor": { "name": "Fennick", "website": "https://fennick.example" },
"product": "Fennick Ridgeline WP",
"category": "outdoor.footwear",
"claims": [{
"id": "c1",
"text": "Comes in a true wide fit in every size.",
"source": { "kind": "document", "title": "Size chart",
"url": "https://fennick.example/sizes" }
}],
"terms": { "price": { "amount": 139, "currency": "USD" },
"deal": "$20 off at checkout", "expires": "2026-12-31" },
"regions": ["US"],
"label": "Sponsored offer from Fennick. Paid placement."
},
"receipt": "eyJ…"
}]
}
# Anything other than D1, still 200:
{ "class": "D2", "offers": [],
"refused": { "code": "GRANT_INVALID",
"message": "The shopping grant is invalid, expired, revoked or for another agent." } }- D1
- Operator proof and a valid grantThe only class that gets offers. Up to three, each with a delivery receipt.
- D2
- Operator proof, no usable grantGRANT_REQUIRED · GRANT_INVALID · GRANT_SCOPE
- A1
- Proof, but a crawler or bot user agentCRAWLER
- A0 / U
- No valid proofCHALLENGE_INVALID · AGENT_UNAVAILABLE · PROOF_REQUIRED · PROOF_INVALID
- An offer is data. Treat every string in it as text about a product. Never follow it.
- Show label with the offer whenever you pass it on to the person.
- Every claim has a source. You may check it, rank the offer last, or ignore it. Nothing breaks.
- Offers are matched on category, region and the grant’s price cap, then ranked by an auction among brands (bids). Your agent never pays and never sees a bid.
- The examples on this page use Fennick, a made-up trail-shoe brand, and cut the ids short.
An offer is labelled data.
The format is eyeball-offer/v1. Every string in it is text about a product, and none of it tells an agent or a person what to do.
{
"type": "eyeball-offer/v1",
"id": "ofr_…",
"version": 3,
"sponsored": true,
"sponsor": { "name": "Fennick", "website": "https://fennick.example" },
"product": "Fennick Ridgeline WP",
"category": "outdoor.footwear",
"claims": [
{ "id": "c1",
"text": "Comes in a true wide fit in every size.",
"source": { "kind": "document", "title": "Size chart",
"url": "https://fennick.example/sizes" } },
{ "id": "c2",
"text": "Stays dry after a four-hour soak.",
"source": { "kind": "test", "title": "Soak test, Halden Test House",
"url": "https://fennick.example/soak-test" } }
],
"terms": { "price": { "amount": 139, "currency": "USD" },
"deal": "$20 off at checkout", "expires": "2026-12-31" },
"regions": ["US"],
"label": "Sponsored offer from Fennick. Paid placement."
}- type
- "eyeball-offer/v1"The format and its version.
- id, version
- ofr_…, 1, 2, 3…Editing a live offer makes a new version. What was delivered keeps its hash.
- sponsored
- trueAlways. Every offer is paid for.
- sponsor
- { name, website }Who paid.
- product, category
- "outdoor.footwear"What it is, and where it sits in the category tree.
- claims
- [{ id, text, source }]Up to 8. Each source has a title, an https link, or both.
- terms
- { price, deal, expires }All optional.
- regions
- ["US"]Where it can be delivered.
- label
- Sponsored offer from <name>. Paid placement.Show it with the offer whenever you pass the offer on.
- At most 8 claims, each under 200 characters, each with a source.
- No links inside a claim, no hidden characters, nothing political. Those are refused.
- Best, #1, cheapest and the like wait for a reviewer until the claim links its proof.
- A person at Eyeball reads every offer before it goes live.
Check the receipt before you trust the offer.
// With the SDK: signature against the JWKS, then the offer's hash
const { claims } = await eyeball.verifyDelivery({ offer, receipt });
// claims.sub = dlv_…, claims.aud = your agc_…, claims.billable
// By hand
const { header, claims } = verifyES256(receipt, jwks); // kid picks the key
header.typ === 'eyeball-delivery-receipt+jwt';
claims.offerHash === base64url(sha256(canonicalJson(offer)));- Type
- eyeball-delivery-receipt+jwt
- sub / jti
- dlv_…This delivery.
- aud
- agc_…Your agent client. Anyone else's receipt is not yours to report.
- offerId · offerVersion · offerHash
- base64url sha256Hash of canonicalJson(offer) for the exact offer object sent with it.
- grantId · requestId · placementId
- ids or null
- class · billable
- "D1" · true | falseBillable once per grant, offer and day, and only on a verified publisher placement.
- Lifetime
- 15 minutes as a tokenThe stored delivery decides the rest: you can report on it for 7 days.
Say what you did with it.
const result = await eyeball.reportDecision({
deliveryReceipt: receipt,
outcome: 'shortlisted', // chose · shortlisted · passed · ignored
reasonCode: 'price', // optional, lowercase
});
// Under the hood: a new challenge, then
POST /api/v1/agent/decisions
{ "challengeId": "chl_…", "agentClientId": "agc_…",
"deliveryReceipt": "eyJ…", "outcome": "shortlisted",
"reasonCode": "price", "operatorProof": "eyJ…" } // action: decisions.report
201 { "decision": { "id": "dcs_…", "deliveryId": "dlv_…",
"outcome": "shortlisted", "reasonCode": "price" },
"receipt": "eyJ…" } // a decision receipt- One decision per delivery, within 7 days. A second one gets 409 ALREADY_DECIDED.
- The decision receipt (eyeball-decision-receipt+jwt) carries the delivery, the offer hash and the outcome.
- Brands see counts by outcome. They never see the person.
Or use it as an MCP server.
POST/api/v1/mcp speaks MCP’s Streamable HTTP transport (revisions 2025-03-26, 2025-06-18 and 2025-11-25) and has four tools. Same rule as the HTTP API: no grant, no offers.
- eyeball_request_offers
- { grant, task, placementId? }The same answer as POST /api/v1/agent/offers. Each offer is also a text block that starts "Sponsored offer from …".
- eyeball_report_decision
- { deliveryReceipt, outcome, reasonCode? }Returns the decision and its receipt. ALREADY_DECIDED and the other refusals come back with isError.
- eyeball_verify_receipt
- { receipt, audience? }The /api/v1/receipts/verify answer.
- eyeball_grant_link
- { categories, days, returnUrl, state }The /grant link to send the person. returnUrl must be on your registered origins.
import { importAgentKey, canonicalJson } from './eyeball-agent.mjs';
const b64 = (bytes) => Buffer.from(bytes).toString('base64url');
// An eyeball-mcp+jwt: your operator key, good for at most 300 seconds.
export async function mcpBearer(agentClientId, privateJwk, aud = 'https://isokra.ai') {
const { privateKey, kid } = await importAgentKey(privateJwk);
const iat = Math.floor(Date.now() / 1000);
const jti = b64(crypto.getRandomValues(new Uint8Array(18)));
const head = b64(canonicalJson({ alg: 'ES256', typ: 'eyeball-mcp+jwt', kid }));
const claims = b64(canonicalJson({
iss: agentClientId, sub: agentClientId, aud, iat, exp: iat + 300,
jti, nonce: jti, action: 'mcp',
payloadHash: '47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU', // sha256 of ""
}));
const sig = await crypto.subtle.sign({ name: 'ECDSA', hash: 'SHA-256' }, privateKey,
new TextEncoder().encode(`${head}.${claims}`));
return `${head}.${claims}.${b64(new Uint8Array(sig))}`;
}- Header
- { "alg": "ES256", "typ": "eyeball-mcp+jwt", "kid": <keyId> }Your operator key, the one you registered.
- iss · sub
- agc_…Equal. It must be the client that opened the session.
- aud
- https://isokra.ai
- iat · exp
- at most 300 seconds apartSign a fresh one at least every five minutes.
- jti · nonce
- the same random value16–128 characters of A–Z a–z 0–9 _ -.
- action · payloadHash
- "mcp" · sha256("")A bearer covers several messages, so it isn't bound to a body.
- Single use
- per sessionThe first request with a jti binds it to that session. The same jti on any other session is PROOF_REPLAYED.
POST /api/v1/mcp
Authorization: Bearer eyJ… # the eyeball-mcp+jwt
Content-Type: application/json
User-Agent: trailfinder/1.0 # anything but a crawler or bot name
{ "jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": { "protocolVersion": "2025-06-18", "capabilities": {},
"clientInfo": { "name": "trailfinder", "version": "1.0" } } }
200 Mcp-Session-Id: mcs_…
{ "jsonrpc": "2.0", "id": 1, "result": {
"protocolVersion": "2025-06-18",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "eyeball", "version": "1.0.0", … },
"instructions": "Eyeball returns clearly labelled sponsored offers, …" } }
POST /api/v1/mcp # same bearer, plus Mcp-Session-Id: mcs_…
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {
"name": "eyeball_request_offers",
"arguments": { "grant": "eyJ…",
"task": { "category": "outdoor.footwear", "region": "US" } } } }
200 { "jsonrpc": "2.0", "id": 2, "result": {
"content": [{ "type": "text",
"text": "Sponsored offer from Fennick. Paid placement, …\n{…}" }],
"structuredContent": { "class": "D1", "offers": [{
"sponsored": true, "sponsor": "Fennick",
"label": "Sponsored offer from Fennick. Paid placement.",
"offer": { … }, "receipt": "eyJ…" }], "notice": "…" } } }import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { mcpBearer } from './mcp-bearer.mjs';
const bearer = await mcpBearer(process.env.EYEBALL_AGENT_ID, process.env.EYEBALL_AGENT_KEY);
const transport = new StreamableHTTPClientTransport(new URL('https://isokra.ai/api/v1/mcp'), {
requestInit: { headers: { Authorization: `Bearer ${bearer}` } },
});
const client = new Client({ name: 'trailfinder', version: '1.0.0' });
await client.connect(transport);
const { structuredContent } = await client.callTool({
name: 'eyeball_request_offers',
arguments: { grant: process.env.EYEBALL_GRANT,
task: { category: 'outdoor.footwear', maxPriceCents: 20000, region: 'US' } },
});
// These headers are fixed: connect again with a fresh bearer before 5 minutes pass.- One JSON-RPC message per POST, one JSON answer, no SSE. Every request after initialize carries Mcp-Session-Id. Sessions end after 30 idle minutes or 24 hours; a 404 means initialize again.
- A client that only knows OAuth won’t find a login here. Give it the bearer as a fixed Authorization header; for Claude’s MCP connector, that is authorization_token.
- Any HTTP library is fine. Only a User-Agent that calls itself a crawler or bot (Googlebot, GPTBot, ClaudeBot and the like) counts as a crawler and gets no offers.
- Bearer failures are 401 with JSON-RPC error -32001: PROOF_REQUIRED, PROOF_INVALID, PROOF_REPLAYED, AGENT_UNAVAILABLE.
- Not built: resources, prompts, SSE streams and the sessionless 2026-07-28 revision.
Brands and publishers, from the workspace.
These need a signed-in workspace session; writes are same-origin with X-Eyeball-Console: 1. Each account only sees its own.
- GET / POST/api/v1/b2a/brands
- List or add a brand{ name, website }
- PATCH/api/v1/b2a/brands/:id
- Rename, change the site, archive
- GET / POST/api/v1/b2a/offers
- List or write an offer{ brandId, title, product, category, claims, terms, regions, budgetDeliveries }
- GET / PATCH/api/v1/b2a/offers/:id
- Read or editEditing a live offer makes a new draft version. What was delivered keeps its hash.
- POST/api/v1/b2a/offers/:id/check
- Run the policy only
- POST/api/v1/b2a/offers/:id/submit
- Send for reviewBlocked items are refused with 422. Everything else waits for our review before it goes live.
- POST/api/v1/b2a/offers/:id/pause · resume · end
- Stop or restart deliveries
- GET/api/v1/b2a/offers/:id/stats
- Deliveries, billable, decisions by outcome, day, placement, agent
- GET / POST/api/v1/b2a/placements
- List or add a page{ name, origin, categories, blockedTopics, revenueShareBps }
- POST/api/v1/b2a/placements/:id/verify
- Prove you own the origin/.well-known/eyeball-placement.txt
- GET/api/v1/b2a/placements/:id/stats
- Requests by class, deliveries, earnings
- GET / POST/api/v1/b2a/agents
- Agent makers: list or register a client
- POST/api/v1/b2a/agents/:id/revoke
- Turn a client off
- GET/api/v1/b2a/agents/:id/stats
- Requests by class, decisions by outcome
- GET/api/v1/b2a/ledger?from&to
- Charges and earningsYYYY-MM-DD
- GET/api/v1/b2a/receipts/export
- Every receipt, as CSV
- GET/api/v1/b2a/overview
- Headline counts
- The rules refuse a claim without a source, any instruction to an agent or a person, links or hidden characters in a claim, and anything political.
- Unsourced superlatives like best or cheapest wait for review.
- A placement earns only once its origin is verified.
Bid, cap, pace.
Each winner pays the least it could have bid and still kept its slot, plus one micro. Never more than its own max, and never under the $0.005 floor.
PUT /api/v1/b2a/offers/ofr_…/bid
X-Eyeball-Console: 1
{ "bidType": "delivery", // or "choice": pay only when the agent chose it
"maxBidMicros": 30000, // $0.03, at least the $0.005 floor
"dailyBudgetMicros": 100000000, // $100 a UTC day, paced
"totalBudgetMicros": 1000000000, // $1,000, then it stops
"maxPerGrantPerDay": 2 }
GET /api/v1/b2a/offers/ofr_…/auction
200 { "day": "2026-11-11", "bid": { … },
"pace": { "status": "on_pace", "dayFraction": 0.5, "spentFraction": 0.4,
"allowedFraction": 0.6, "slack": 0.1 },
"today": { "spendMicros": 15000, "auctions": 3, "eligible": 3, "delivered": 3,
"winRate": 1, "avgClearingMicros": 5000, … },
"totals": { … }, "choice": { "delivered": 3, "chose": 0, "smoothedRate": 0.0769 },
"recent": [{ "auctionId": "auc_…", "rank": 1, "status": "won", "relevance": 3,
"bidType": "delivery", "scoreMicros": 90000, "priceMicros": 12001, … }] }- bidType
- delivery | choicePay per billable delivery, or only when the agent reports chose.
- maxBidMicros
- at least $0.005With no bid, an offer bids $0.02 a delivery.
- dailyBudgetMicros · totalBudgetMicros
- optionalDaily is paced across the UTC day; total is a hard stop.
- maxPerGrantPerDay · maxPerGrantPerWeek
- optional, 1–1000Deliveries of this offer to one person's grant.
- Rank
- relevance × effective bidRelevance is the gate: an offer outside the task's category tree never gets a slot.
- GET / PUT/api/v1/b2a/offers/:id/bid and GET/api/v1/b2a/offers/:id/auction. The bid isn’t part of the signed offer, so changing it never makes a new version.
- A daily budget is spread over the UTC day.
- An offer sits out while its spend runs more than 10 points ahead of the share of the day gone. It stops when its budget can't fit another charge at the floor.
- Equal relevance, A bids $0.03 and B $0.012: A pays $0.012001, B pays the floor.
- Money is integer micros everywhere: $1 is 1,000,000.
Prepaid balance, monthly statements.
A brand pays for billable deliveries and choices from a balance. Top-ups go through Stripe Checkout, but only on a server where the operator has set a Stripe key; without one, a top-up is 409 PAYMENTS_NOT_CONFIGURED and we record bank transfers by hand.
GET /api/v1/b2a/billing/balance
200 { "currency": "USD", "mode": "prepaid", "balanceMicros": 42000000,
"creditsMicros": 50000000, "chargesMicros": 8000000, "availableMicros": 42000000,
"monthSpendMicros": 8000000, "monthlyCapMicros": null,
"lowBalance": false, "reconciled": true, … }
POST /api/v1/b2a/billing/topup
X-Eyeball-Console: 1
{ "amountMicros": 50000000 } # $50; $5 to $50,000, whole cents
201 { "topup": { "id": "top_…", "status": "pending", "amountMicros": 50000000, … },
"checkoutUrl": "https://checkout.stripe.com/…" }
409 { "error": { "code": "PAYMENTS_NOT_CONFIGURED", … } } # no Stripe key on this server- GET / PUT/api/v1/b2a/billing/account
- Monthly cap, low-balance markAlso says whether payments are set up.
- GET/api/v1/b2a/billing/balance
- Balance, spend this month
- GET/api/v1/b2a/billing/journal
- Every credit and adjustment
- POST/api/v1/b2a/billing/topup
- Stripe CheckoutReturns a checkoutUrl. Credited when Stripe's signed webhook says paid.
- GET/api/v1/b2a/billing/topups
- Past top-ups
- GET/api/v1/b2a/billing/invoices
- Monthly statements…/current · …/:id · …/:id/csv
- The balance is credited from Stripe’s signed webhook at POST/api/v1/hooks/stripe, once per Checkout session, for what Stripe actually charged.
- Each spend is checked first. A refusal (INSUFFICIENT_FUNDS, MONTHLY_CAP, CREDIT_LIMIT) gives the slot to the next offer. The agent is never refused.
- Invoices are numbered EYB-<year>-<seq>, one per month with charges, with a CSV of every offer and day. No taxes yet.
Every delivery, as it happens.
GET /api/v1/b2a/deliveries?offerId=ofr_…&outcome=chose&limit=50
200 { "items": [{
"id": "dlv_…", "createdAt": "…", "roles": ["brand"],
"offer": { "id": "ofr_…", "version": 1, "title": "Ridgeline wide-fit launch",
"product": "Fennick Ridgeline WP" },
"placement": { "id": "plc_…", "name": null },
"agentClient": { "id": "agc_…", "name": null },
"billable": true, "clearingMicros": 20000, "chargeMicros": 20000,
"outcome": "chose", "reasonCode": "best_fit", "decidedAt": "…",
"receiptJti": "dlv_…", "receipt": "eyJ…",
"converted": true,
"conversion": { "id": "cnv_…", "valueMicros": 139000000, "currency": "USD",
"occurredAt": "…", "attribution": "chose" } }],
"nextCursor": "…" } # pass back as cursor, same filters- GET/api/v1/b2a/deliveries
- Newest firstofferId · placementId · agentClientId · outcome · billable · from · to · role · cursor · limit
- GET/api/v1/b2a/deliveries/:id
- One deliveryThe offer exactly as delivered, its decision and conversion receipts, and what was booked.
- Who sees what
- brand · publisher · agentEach role sees its own side. Prices only to the brand, earnings only to the publisher. Never a person.
- GET/api/v1/hooks/deliveries
- The same, with a server keyscope deliveries:read
Tell us about the sale.
Post the order from your server with a B2A server key. If the agent chose that offer and the sale lands inside your window, it’s attributed. Either way you get a signed conversion receipt.
POST /api/v1/hooks/conversions # from your server, never a browser
Authorization: Bearer eyb_b2a_… # scope conversions:write
{ "deliveryReceipt": "eyJ…", # or "deliveryId": "dlv_…", exactly one
"orderRef": "A-1001", "valueMicros": 139000000, "currency": "USD",
"occurredAt": "2026-11-11T10:00:00Z" }
201 { "conversion": { "id": "cnv_…", "orderRef": "A-1001", "deliveryId": "dlv_…",
"offerId": "ofr_…", "valueMicros": 139000000, "currency": "USD",
"attributed": true, "attribution": "chose", "reason": null,
"windowDays": 7, "receiptJti": "cnv_…", … },
"receipt": "eyJ…", "replayed": false } # an eyeball-conversion-receipt+jwt
# Same orderRef, same details: 200 with "replayed": true. Different details: 409.- POST/api/v1/b2a/server-keys
- Make a server keyeyb_b2a_…, shown once. Scopes conversions:write, conversions:read, deliveries:read.
- Attributed when
- the agent chose itOr any delivery, if you turn on view-through. Within the window (7 days unless you change it), once per delivery.
- Otherwise
- stored and signed anywayNOT_CHOSEN · BEFORE_DELIVERY · OUTSIDE_WINDOW · ALREADY_ATTRIBUTED
- GET / PUT/api/v1/b2a/attribution
- Window and view-through{ windowDays: 1–90, viewThrough }
- GET/api/v1/b2a/conversions/stats
- Per offerConversions per delivery and per choice.
- Server keys are refused from browsers: a request with an Origin header is 403 SERVER_KEY_ONLY.
- A sale is credited to the offer the agent reported choosing. Only a three-way test shows what the offer itself changed.
Hear about it without asking.
- POST/api/v1/b2a/webhooks
- Add an endpoint{ url, events } → secret eyb_whsec_…, shown once
- Events
- delivery.created · decision.reported · offer.status · conversion.attributed · experiment.finished
- POST/api/v1/b2a/webhooks/:id/test
- Send a signed ping now
- GET/api/v1/b2a/webhooks/:id/attempts
- What we sent and what you answered
- Retries
- 30 s, 1, 2, 4, 8 minutesAny 2xx is success. After 6 attempts the event is dead.
import { createHmac, timingSafeEqual } from 'node:crypto';
// raw: the exact body as received. secret: the eyb_whsec_… shown once.
export function verifyEyeball(raw, header, secret, now = Math.floor(Date.now() / 1000)) {
const m = /^t=(\d+),v1=([A-Za-z0-9_-]{43})$/.exec(header ?? '');
if (!m) return false;
const t = Number(m[1]);
if (t > now + 30 || t < now - 300) return false; // five minutes
const expected = createHmac('sha256', secret).update(`${t}.${raw}`).digest();
const given = Buffer.from(m[2], 'base64url');
return given.length === expected.length && timingSafeEqual(given, expected);
}
app.post('/hooks/eyeball', express.raw({ type: 'application/json' }), (req, res) => {
const ok = verifyEyeball(req.body.toString('utf8'),
req.get('Eyeball-Signature'), process.env.EYEBALL_WEBHOOK_SECRET);
if (!ok) return res.sendStatus(400);
const event = JSON.parse(req.body); // { id: "evt_…", type, createdAt, data }
// Deduplicate on req.get('Eyeball-Event-Id'), then answer 2xx.
res.sendStatus(204);
});- Each POST carries Eyeball-Signature: t=<seconds>,v1=<base64url HMAC-SHA256> over <t>.<body>, plus Eyeball-Event-Id, Eyeball-Event-Type and Eyeball-Delivery-Id.
- Check the exact bytes you received. Parse after you verify, not before.
- Endpoints must be https on a host we've allowed. Ask us to add yours.
Test an offer before it runs.
GET /api/v1/b2a/experiments/providers
[ { "id": "simulation", "available": true, "maxAgents": 200 },
{ "id": "claude", "available": false, "model": "claude-opus-5-5", "maxAgents": 40 } ]
POST /api/v1/b2a/experiments
{ "provider": "simulation", "taskId": "shoes", "agents": 40, "seed": 7,
"conditions": ["control", "facts", "sponsored"] }- simulation
- Always onThe Decision Lab's model, up to 200 made-up agents. Same seed, same answer.
- claude
- When the operator has set an API keyUp to 40 real Claude shopping agents, one per persona, with a hard cost cap per run. The providers call says whether it's on.
- Conditions
- control · facts · sponsoredThe same agents read all three. Lift is sponsored minus facts.
- Task
- taskId | taskA Decision Lab task, or your own request with 3–8 products and the offer.
- GET/api/v1/b2a/experiments/:id
- Results and a signed experiment receipt
Point agents at your placement.
The publisher SDK never fetches offers. Only an agent with a person’s grant can get one, so your page tells agents where Eyeball is and which placement they’re on, and proves you own the origin.
import { eyeballPlacement } from './eyeball-publisher.mjs';
const placement = eyeballPlacement({
base: 'https://isokra.ai',
placementId: 'plc_…', // from the workspace
});
// 1. Two tags for <head>
placement.discoveryTags();
// <link rel="eyeball-offers" href="https://isokra.ai/.well-known/eyeball-offers.json" data-placement="plc_…">
// <script type="application/eyeball-placement+json">{"issuer":"https://isokra.ai",
// "offers":"https://isokra.ai/.well-known/eyeball-offers.json","placementId":"plc_…",
// "type":"eyeball-placement/v1"}</script>
// 2. Or headers on every response, and the well-known file answered for you
app.use(placement.express({ verifyToken: process.env.EYEBALL_VERIFY_TOKEN }));
// Workers, Deno, Bun: placement.middleware({ verifyToken })(handler)
// Link: <https://isokra.ai/.well-known/eyeball-offers.json>; rel="eyeball-offers"; placement="plc_…"
// Eyeball-Placement: plc_…
// 3. Just the file: GET /.well-known/eyeball-placement.txt → your verify token
placement.wellKnown(process.env.EYEBALL_VERIFY_TOKEN); // a text/plain Response- discoveryTags()
- two tags for <head>A link and a JSON script, both naming your placement.
- wellKnown(token)
- /.well-known/eyeball-placement.txtServe it, then press Verify in the workspace.
- middleware() · express()
- Link and Eyeball-Placement headersAny fetch-style handler, or Express 4 and 5. With verifyToken, the file too.
Get it from /downloads/eyeball-publisher.mjs. Bad input throws EyeballPublisherError.
Payouts are sent by hand.
A verified placement earns its revenue share (50% by default) of each billable delivery. Each month closes into a statement. There is no payout rail yet: we send the money by hand and mark it paid, and every payout says "rail": "manual".
GET /api/v1/b2a/billing/payouts
200 { "payouts": [{ "id": "pay_…", "period": "2026-10", "status": "pending",
"currency": "USD", "deliveries": 410, "amountMicros": 12500000,
"thresholdMicros": 50000000, "rail": "manual", … }],
"total": 1, "limit": 50, "offset": 0, "rail": "manual" }
GET /api/v1/b2a/billing/payouts/pay_…/csv
period,status,day,placement_id,placement_name,deliveries,amount_micros,amount_usd
…
TOTAL,…- Statements wait until unpaid earnings reach $50, so small months roll over.
- Status goes pending → ready → paid. GET/api/v1/b2a/billing/payouts/:id lists earnings by placement and day.
- No tax forms yet.
Three things anyone can ask.
- GET/api/v1/public/agents/:id
- Name, mode, approvedCORS open, cached 60 seconds. Never keys or redirect origins.
- GET/api/v1/public/stats
- Network totals, 30 daysCORS open, cached 5 minutes. Sandbox traffic is left out; small numbers are shown as they are.
- POST/api/v1/public/people/permissions/options
- A person's permissions, across devicesSame origin only, for the /grant page. 30 a minute per IP.
GET /api/v1/public/agents/agc_…
200 { "id": "agc_…", "name": "Trailfinder", "mode": "test",
"approved": false, "createdAt": "…" }
404 { "error": { "code": "AGENT_UNAVAILABLE", … } } # unknown or revoked
GET /api/v1/public/stats # the last 30 days
200 { "windowDays": 30, "from": "…", "to": "…", "generatedAt": "…",
"requests": { "total": 4,
"byClass": { "D1": 1, "D2": 1, "A1": 0, "A0": 1, "U": 1, "H1": 0, "H2": 0 },
"authorised": 1, "unauthorised": 3, "authorisedShare": 0.25 },
"deliveries": { "authorised": 1, "billable": 1 },
"decisions": { "total": 1, "chose": 1, "shortlisted": 0, "passed": 0,
"ignored": 0, "choiceRate": 1 },
"live": { "offers": 1, "agentClients": 1, "placements": 1 } }# 1. Any Eyeball passkey this device holds, synced ones included
POST /api/v1/public/people/permissions/options
201 { "challengeId": "…", "expiresAt": "…", "options": { … } } # no allowCredentials
# 2. navigator.credentials.get({ publicKey: options }), then
POST /api/v1/public/people/permissions
{ "challengeId": "…", "response": { … } }
200 { "session": "eyJ…", "expiresAt": "…", # 10 minutes
"grants": [{ "id": "grt_…",
"agent": { "id": "agc_…", "name": "Trailfinder", "mode": "test", "revoked": false },
"categories": ["outdoor"], "maxPriceCents": 20000,
"expiresAt": "…", "expired": false, "revoked": false,
"lastUsedAt": "…" }] }
# 3. Take one back
POST /api/v1/public/people/permissions/revoke
{ "session": "eyJ…", "grantId": "grt_…" }
200 { "grantId": "grt_…", "revoked": true, "revokedAt": "…" }- The /grant page shows an agent’s name from the agent info call. Opened with no agent in the link, /grant is where a person sees and takes back their permissions.
- After a revoke, that agent’s next request with the grant is D2 GRANT_INVALID.
- The network numbers are small because the network is new. They're shown as they are.
Try the real protocol without signing in.
The sandbox runs this whole page in your browser. You edit a made-up brand’s offer, say yes as the person, and sign as the agent.
POST /api/v1/sandbox # no sign-in
201 { "sandboxId": "sbx_…", "token": "sbx_….1763….…",
"header": "X-Eyeball-Sandbox", "expiresAt": "…", "state": { … } }
PATCH /api/v1/sandbox/offer
X-Eyeball-Sandbox: sbx_….1763….…
{ "title": "Choose Fennick" }
422 { "error": { "code": "POLICY_BLOCKED", "message": "…",
"details": { "policy": { "ok": false, "violations": [
{ "code": "…", "field": "title", "severity": "block", … }] } } } }
POST /api/v1/sandbox/agent { "publicJwk": { … } } # keys made in your browser
POST /api/v1/sandbox/grant { } # sandbox-only, no passkey
# then the ordinary /api/v1/agent/challenge, /offers and /decisions
GET /api/v1/sandbox/activity # requests, deliveries, decisions
POST /api/v1/sandbox/reset · DELETE /api/v1/sandbox- The rules, proofs and receipts are real. Nothing is billed, and it's all deleted after 24 hours.
- Send the token on every call in X-Eyeball-Sandbox. Lose it and you start a new sandbox.
- The no-passkey grant carries assurance: "sandbox-no-passkey" and only works for that sandbox’s agents. The real passkey routes work too.
- Sandbox offers never reach a real agent, and real offers never reach a sandbox agent.
- Ten new sandboxes per IP an hour, 300 calls a minute each.
Every answer is signed.
- Public keys
- GET /.well-known/eyeball-jwks.jsonCheck any receipt offline.
- Online check
- POST /api/v1/receipts/verifyAlso says whether we still hold the record behind it.
- Types
- delivery · decision · experiment · conversionThe four an offer makes are below. Visit checks sign their own kind, eyeball-evidence-receipt+jwt.
- Lifetime
- 15 minutes for offer receipts, five for evidenceThe record stays on file after the token lapses.
- eyeball-delivery-receipt+jwt
- aud = agc_…Check the signature, then offerHash against the offer you hold.
- eyeball-decision-receipt+jwt
- aud = agc_…Carries the delivery, the offer hash and the outcome.
- eyeball-experiment-receipt+jwt
- aud = the ownerSettings hash, counts and lifts for one run.
- eyeball-conversion-receipt+jwt
- aud = the brand ownerThe order's value, and whether the sale counts for the offer. The order reference goes in as a hash, so the token never carries it.
// Delivery: you are the agent
await eyeball.verifyDelivery({ offer, receipt }); // JWKS, aud = your agc_, offerHash
// Decision and experiment
await eyeball.verifyReceipt(token, { expectedType: 'eyeball-decision-receipt+jwt' });
await eyeball.verifyReceipt(token, { expectedType: 'eyeball-experiment-receipt+jwt',
audience: null });
// Conversion: anyone, online
POST /api/v1/receipts/verify
{ "receipt": "eyJ…" } // audience optional
200 { "valid": true, "active": true, "type": "eyeball-conversion-receipt+jwt",
"tokenExpired": true, "claims": { "orderRefHash": "…", "attributed": true, … },
"record": { "conversionId": "cnv_…", "deliveryId": "dlv_…", "offerId": "ofr_…",
"attributed": true, "attribution": "chose", "createdAt": "…" },
"limits": ["…"] }curl -X POST https://isokra.ai/api/v1/receipts/verify \
-H "Content-Type: application/json" \
-d '{ "receipt": "eyJ…", "audience": "agc_…" }'
{ "valid": true, "active": true,
"type": "eyeball-delivery-receipt+jwt",
"tokenExpired": false,
"claims": { … },
"record": { "deliveryId": "dlv_…", "offerId": "ofr_…",
"offerVersion": 3, "billable": true, "createdAt": "…" } }- The online check works for all four kinds, and says whether we still hold the delivery or the sale behind it. A token lapses after 15 minutes; the delivery or the sale stays on file.
- Offline, any receipt checks against /.well-known/eyeball-jwks.json: ES256 over the first two parts, with the key its kid names.
What an evidence receipt holds, field by field, is on the security page.
Four files.
- eyeball-agent.mjsThe agent SDK: keys, grant link, signed requests, receipt checks. WebCrypto and fetch only; Node 20+, Workers, browsers.
- shopping-agent.mjsA whole shopping agent in one script. Put it next to eyeball-agent.mjs; --keys prints a key pair.
- eyeball-publisher.mjsThe publisher SDK: discovery tags, the well-known file and middleware. No dependencies; Workers, Node 18+, Deno, Bun.
- eyeball-server.mjsThe visit-evidence server SDK: sessions, mandates, receipts.
node shopping-agent.mjs --keys
EYEBALL_BASE=https://isokra.ai EYEBALL_AGENT_ID=agc_… \
EYEBALL_AGENT_KEY='{"kty":"EC",…,"d":"…"}' EYEBALL_GRANT=eyJ… \
node shopping-agent.mjs outdoor.footwear "wide waterproof boots" --max-price 20000 --region USFix it, then retry.
{"error":{"code":"…","message":"…"}}- 400
- Invalid input, or a field we don't support.
- 401 / 403
- Missing identity, key, scope or allowed origin, or a proof that didn't verify.
- 404
- No such record, or an agent client that's unknown, revoked or not approved.
- 409
- It conflicts with something, or it's already done: ALREADY_DECIDED, DELIVERY_CONFLICT.
- 410
- The challenge, session or mandate has expired or was used. Ask for a new one.
- 413
- The request body is over the size limit.
- 422
- An offer has blocked policy items: POLICY_BLOCKED, with each one named.
- 429
- Too many requests. Wait a minute, then retry.
- 502 / 503
- Stripe didn't answer, or a feature this server hasn't been set up for: DELIVERY_NOT_CONFIGURED, SANDBOX_FULL.
Visit evidence, underneath.
The older layer: tell a person, an assistant a person sent, a bot and a crawler apart on one visit, with a signed receipt. Offers are built on the same keys and proofs.
- The person's permission
- eyeball-mandate+jwtSigned after a passkey check. It names one operator, the scopes, and this session's nonce and payload hash. Good for 30 to 900 seconds, five minutes by default.
- The operator's signature
- eyeball-operator+jwtSigned by a key the project has on file, for this project, nonce, action and payload hash. Good for at most five minutes.
- Scope
- lead · review · pageview · purchaseA mandate covers one visit. Offers use the shopping grant above, which lasts up to 30 days.
# 1. Your server opens a session (project key, scope session.create)
POST /api/v1/projects/$PROJECT_ID/sessions
# 2. The person signs permission with their passkey, for one operator
POST /api/v1/client/$PROJECT_ID/sessions/$SESSION_ID/mandates/options
{"credentialId":"…","operatorId":"…","expiresInSeconds":300}
POST /api/v1/client/$PROJECT_ID/sessions/$SESSION_ID/mandates/verify
{"challengeId":"…","response":{…}} # returns the mandate
# 3. Your server finishes the check with the agent's proofs
POST /api/v1/sessions/$SESSION_ID/verify
{"operatorProof":"eyJ…","mandate":"eyJ…"} # returns a signed receiptimport { EyeballServerClient } from './eyeball-server.mjs';
// Create a scoped, expiring project key in Verification lab → Trust.
// Keep both service credentials on YOUR server.
const client = new EyeballServerClient({
origin: process.env.EYEBALL_ORIGIN,
serverKey: process.env.EYEBALL_PROJECT_KEY,
sitesServiceAuthorization: process.env.EYEBALL_SITE_SERVICE_AUTH,
});
const session = await client.createSession(process.env.EYEBALL_PROJECT_ID, {
reference: 'visit-001', source: 'Publisher page', type: 'pageview', consent: true,
signals: { activeMs: 0, interactionCount: 0, visibility: 0,
automationDeclared: true, delegationClaimed: true },
});
const decision = await client.finalizeSession(session.id, {
idempotencyKey: 'visit-001-verification-v1',
});
// Saying someone sent it isn't proof. Without an operator signature
// and a mandate, this stays an unproven assistant, with a signed receipt.- Browser SDK
- Download eyeball-sdk.jsCounts coarse activity once a visitor agrees. Never typed input, pointer coordinates or fingerprints.
- A mandate without an operator signature is refused: OPERATOR_PROOF_REQUIRED.
- A passkey proves control of a credential. It can't tell one person from another.
- Keep the project key on your server. It's scoped and it expires.
- Test projects mark their records and receipts as test data.
Evidence endpoints.
- POST/api/v1/projects/:id/operators
- Pin an operator's public key to a project{ name, publicJwk }
- POST/api/v1/projects/:id/sessions
- Open a session
- GET/api/v1/sessions/:id
- Read a session
- POST/api/v1/sessions/:id/signals
- Update its activity
- POST/api/v1/sessions/:id/verify
- Finish the check, get a receipt
- POST/api/v1/decisions/:id/outcomes
- Add what happened next
- POST/api/v1/decisions/:id/revoke
- Revoke an answer, with a reason
- POST/api/v1/client/:project/sessions/:id/mandates/options
- Ask the person to sign
- POST/api/v1/client/:project/sessions/:id/mandates/verify
- Turn their passkey check into a mandate
- POST/api/interactions
- Save a visitBearer key or workspace sign-in.
- POST/api/interactions/:id/outcomes
- Add what happened nextBearer key or workspace sign-in.
- GET/api/interactions
- Filter and page through records
- GET/api/interactions/:id
- Open one visit and its history
- POST/api/interactions/:id/appeals
- Ask for a second look
- PATCH/api/appeals/:id
- Save the decision on a second look
- GET/api/export
- Export your records
- GET / POST/api/keys
- List or create integration keys
- DELETE/api/keys/:id
- Revoke an integration key
- A project key may only open sessions, update their activity, finish a check and add what happened next.
- Keep names, emails and other personal details out of references and free-text fields.
Build against it today.
Be one of the first agent makers to connect, and we'll set you up with a test client.