Highlights
Highlights are generated asynchronously and associated with a demo + user.
Example env:
export BASE_URL="https://highlights-api.rankacy.com"
export TOKEN="rk_live_..."
export DEMO_ID="<your_demo_id>"
1) Generate highlight (automatic)
Endpoint:
POST /api/public/v1/highlights
Required fields:
demo_idresolution_idfps_id
Optional fields:
titleuse_transitionintro(NONE|GENERIC|SCENIC)
curl -X POST "$BASE_URL/api/public/v1/highlights" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"demo_id\": $DEMO_ID,
\"resolution_id\": 1,
\"fps_id\": 1,
\"title\": \"Mirage recap\"
}"
2) Generate highlight by ticks array
Endpoint:
POST /api/public/v1/highlights/by-ticks
Get kill data first (recommended for copy-paste testing):
KILLS_RESPONSE=$(curl -sS -G "$BASE_URL/api/public/v1/demos/$DEMO_ID/kills" \
-H "Authorization: Bearer $TOKEN" \
--data-urlencode "limit=1" \
--data-urlencode "offset=0")
TICK=$(echo "$KILLS_RESPONSE" | jq -r '.items[0].tick // empty')
DEMO_KILL_ID=$(echo "$KILLS_RESPONSE" | jq -r '.items[0].demo_kill_id // empty')
if [ -n "$TICK" ]; then
curl -X POST "$BASE_URL/api/public/v1/highlights/by-ticks" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"demo_id\": $DEMO_ID,
\"ticks\": [{\"start_tick\": $TICK, \"end_tick\": $TICK}],
\"resolution_id\": 1,
\"fps_id\": 1
}"
fi
Validation note:
- every tick range must be within demo bounds
end_tick >= start_tick
3) Generate highlight by demo_kill_id
Endpoint:
POST /api/public/v1/highlights/by-kill
Accepted identifier inputs:
demo_kill_ids: [801, 805](recommended)kill_ids: [801, 805](alias)demo_kill_id: 801(single-item alias)
Example with pre/post windows:
if [ -n "$DEMO_KILL_ID" ]; then
curl -X POST "$BASE_URL/api/public/v1/highlights/by-kill" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"demo_id\": $DEMO_ID,
\"demo_kill_ids\": [$DEMO_KILL_ID],
\"pre_ticks\": 192,
\"post_ticks\": 256,
\"resolution_id\": 1,
\"fps_id\": 1,
\"title\": \"Round entry\"
}"
fi
4) List highlights with filters
Endpoint:
GET /api/public/v1/highlights
Filter fields:
demo_idstatus(NEW|PROCESSING|SUCCESS|FAILED)created_fromcreated_totype(auto|ticks|kill)limitoffset
curl -G "$BASE_URL/api/public/v1/highlights" \
-H "Authorization: Bearer $TOKEN" \
--data-urlencode "demo_id=$DEMO_ID" \
--data-urlencode "type=kill" \
--data-urlencode "limit=20" \
--data-urlencode "offset=0"
5) List available output options
Resolutions
Endpoint: GET /api/public/v1/highlights/resolutions
Expected response shape:
{
"items": [
{
"id": 1,
"name": "1280x720",
"width": 1280,
"height": 720
}
]
}
FPS
Endpoint: GET /api/public/v1/highlights/fps
Expected response shape:
{
"items": [
{
"id": 1,
"name": "60 FPS",
"fps": 60
}
]
}
Response after queueing
All generation endpoints return:
{
"highlight_id": 311,
"status": "queued"
}