Skip to content

Rank title and thumbnail packages

Run swapped-order dual-judge pairwise ranking on 1 to 10 title or title+thumbnail package pairs. Costs 2 credits per pair.

POSThttps://hitfactorapp.com/api/v1/packages/rank
MCP toolrank_packagesCost2 credits / pairModeSync (200 OK)Scopepackaging:writeChannel syncNot required

Request examples

curl -sS -X POST "https://hitfactorapp.com/api/v1/packages/rank" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $HITFACTOR_API_KEY" \
  -H "Idempotency-Key: req_2026_001" \
  -d '{
  "pairs": [
    {
      "a": {
        "title": "Why Every AI Agent Breaks in Production",
        "thumbnailUrl": "https://example.com/thumbs/variant-a.png"
      },
      "b": {
        "title": "Why Every AI Agent Breaks in Production",
        "thumbnailUrl": "https://example.com/thumbs/variant-a.png"
      }
    }
  ],
  "topic": "example_topic"
}'

Parameters

Idempotency-Keyheaderstring

Unique retry key (up to 255 characters). Replaying the same key and body returns the original response with 0 extra credits charged.

maxLength: 255

Request body

Send a JSON object with Content-Type: application/json. Unknown keys are rejected with 400 invalid_input.

pairsobject[]required
minItems: 1maxItems: 10
Show item fields
aobjectrequired
Show object fields
titlestringrequired
minLength: 1maxLength: 300
thumbnailUrlstring (uri)
maxLength: 2048
bobjectrequired
Show object fields
titlestringrequired
minLength: 1maxLength: 300
thumbnailUrlstring (uri)
maxLength: 2048
topicstring
maxLength: 500

Response (200 OK)

Every successful response wraps the payload in data alongside billing and request metadata in meta.

resultsobject[]required
Show item fields
winner"a" | "b" | "tie"required
confidence"high" | "moderate" | "tossup"required
rationalestringrequired
mode"title" | "joint"required
Example 200 response
{
  "data": {
    "results": [
      {
        "winner": "a",
        "confidence": "high",
        "rationale": "example_rationale",
        "mode": "title"
      }
    ]
  },
  "meta": {
    "requestId": "req_01j9example0000000000000",
    "creditsCharged": 1,
    "creditsRemaining": 499,
    "replayed": false
  }
}

Error responses

400invalid_input
401Missing or invalid API key
402insufficient_credits
403insufficient_scope
404operation_not_found
409channel_sync_pending or idempotency_conflict
429rate_limited