Developer API
Ranking API for Agents
Score and rank ad creatives programmatically. Send image URLs or data:image payloads, include copy context when you have live ad text, and get back ranked results with copy lift, refinement outcomes, rationales, and confidence levels.
Overview
The Ranking API evaluates ad creatives using Kettio's SSR (Semantic Similarity Rating) pipeline — the same scoring engine behind the Kettio dashboard. Each asset is scored 1–5 against a target audience persona, with a written rationale explaining the score.
Batch ranking
Up to 20 assets per request
Full ad package
Image plus optional copy context
Evaluation billing
Only successful score evaluations are charged
API Key
Generate an API key below. Keys start with agk_live_ and are sent via the Authorization header.
Quickstart
Rank three ad creatives with a single curl command:
For Computer-Use Agents
The API returns structured JSON — no browser interaction needed. Agents can parse the ranked[] array directly, read rationale strings for reasoning, and use score values to make decisions.
API Reference
Endpoint
/api/v1/rankScore and rank up to 20 image assets against a target audience persona. Assets with copy context are evaluated as full ad packages and also receive image-only ablations for copy lift.
Request Body
assets{ url, id?, asset_type?, copy_context? }[]requiredurl is required and must be an https:// URL or data:image/ URI. id is optional for correlation.audienceobjectname (required), description, demographics. Mutually exclusive with audience_id.audience_idstringaudience.goalstringDefault: purchase-intentasset_typestringDefault: Social Media Postplatformstringmeta, instagram, facebook, tiktok, linkedin, or google.campaign_typestringplatform is omitted.refine_close_pairsbooleanDefault: truefalse for raw SSR-only ordering.Copy Context
Add copy_context when you know the live ad copy. Kettio scores that asset as a full ad package, then runs a separate image-only ablation so the response can report image_only_score and copy_lift.
Response
ranked[]arrayerrors[]arraysummaryobjectBatch Uploads & Refinement
Send up to 20 assets in one request. Kettio evaluates assets concurrently and returns one sorted list. When refine_close_pairs is enabled, near-tied successful assets can get a pairwise panel check. If the panel disagrees with the initial SSR order, the final score is nudged and the affected assets include panel_outcome.
score_before_refinenumberpanel_outcomeobject | nullsummary.close_pair_refinementobjectBilling & Limits
Rate limits and credits are counted by successful scoring evaluations, not just uploaded asset count. Image-only assets usually use 1 evaluation. Assets with copy context can use 2 evaluations because Kettio also runs an image-only ablation.
Error Codes
Reference
Configuration
Evaluation Goals
The goal parameter determines what dimension your assets are scored on. purchase-intent is the default and highest accuracy.
Asset Types
The asset_type sets the context framing — it changes the system prompt so the simulated persona evaluates the asset in the right mental context.
Demographics Fields
Optional fields on audience.demographics. These shape the simulated persona's attitude and behavior. All fields are optional — sensible defaults are applied automatically.