Public API Guide

All documented endpoints below are under:

/api/public/v1

Examples in this docs set assume:

export BASE_URL="https://highlights-api.rankacy.com"
export TOKEN="rk_live_..."

Authentication

Use bearer token authentication for every request:

Authorization: Bearer <token>

Public API surface

Demos:

  • POST /demos/upload
  • GET /demos
  • GET /demos/{demo_id}
  • GET /demos/{demo_id}/kills
  • GET /demos/{demo_id}/players

Highlights:

  • GET /highlights
  • GET /highlights/{highlight_id}
  • DELETE /highlights/{highlight_id}
  • GET /highlights/resolutions
  • GET /highlights/fps
  • GET /highlights/cost
  • POST /highlights
  • POST /highlights/by-ticks
  • POST /highlights/by-kill

Account:

  • GET /me/credit
  • GET /me/transactions

Webhooks:

  • processing terminal events:
  • demo.processed.success
  • demo.processed.failed
  • highlight.processed.success
  • highlight.processed.failed

Fast first call

curl -sS "$BASE_URL/api/public/v1/demos?limit=5&offset=0" \
  -H "Authorization: Bearer $TOKEN" | jq

Upload -> options -> generate flow

curl -sS -X POST "$BASE_URL/api/public/v1/demos/upload" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@$DEMO_FILE" \
  -F "generate_auto_highlight=false" | jq

curl -sS "$BASE_URL/api/public/v1/highlights/resolutions" \
  -H "Authorization: Bearer $TOKEN" | jq

curl -sS "$BASE_URL/api/public/v1/highlights/fps" \
  -H "Authorization: Bearer $TOKEN" | jq

curl -sS "$BASE_URL/api/public/v1/highlights/cost?resolution_id=1&fps_id=1" \
  -H "Authorization: Bearer $TOKEN" | jq

curl -sS "$BASE_URL/api/public/v1/me/credit" \
  -H "Authorization: Bearer $TOKEN" | jq

curl -sS -X POST "$BASE_URL/api/public/v1/highlights" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"demo_id":52,"resolution_id":1,"fps_id":1,"show_tick":true}' | jq

curl -sS "$BASE_URL/api/public/v1/me/transactions?limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" | jq

Upload response now includes:

  • was_already_processed_successfully
  • user_demo_assignment (newly_assigned or already_assigned)
  • auto_highlight_skip_reason / auto_highlight_skip_message
  • auto_highlight_estimated_credit / auto_highlight_current_credit

Upload request supports:

  • generate_auto_highlight (true|false, default true)
  • resolution_id + fps_id together when you want upload-time auto TOP5 settings
  • auto-generated TOP5 highlights from upload processing always persist show_tick=false

Python snippet (httpx)

import httpx

base_url = "https://highlights-api.rankacy.com"
token = "rk_live_..."

with httpx.Client(timeout=30) as client:
    resp = client.get(
        f"{base_url}/api/public/v1/demos",
        headers={"Authorization": f"Bearer {token}"},
    )
    resp.raise_for_status()
    print(resp.json())

Continue reading