AI Pointly Developers
AI Pointly API · v1

Automatic point tables for your own website

Send a BGMI or Free Fire screenshot, get back clean match data and a ranked point table. Your users never leave your site. The first 100 scans each month are free. After that you pay ₹0.50 a scan from a prepaid wallet, and only for scans that succeed.

Scan lobby

Lobby screenshot → every slot with its team name and players.

Scan match result

Result screenshot → finishing position and kills for every team.

Standings

Match results → ranked point table with your point system and tie-breakers.

Drop-in widget

One script tag opens an upload popup on your page, like a payment checkout.

Two ways to integrate:

Base URL: https://aipointly.com/api/v1 · All requests and responses are JSON · All money is in paise (₹1 = 100 paise).

Quickstart

  1. Create an account. Open the Developer Console and sign up with Google or your email. Already use the AI Pointly app? Sign in with the same account.
  2. Create a test key. Test keys (sk_test_…) are free and return sample data, so you can build your integration without spending anything.
  3. Make your first call. Send a screenshot as a base64 data URL:
  1. Go live. Confirm your email, create a live key (sk_live_…) and swap it in. The first 100 credits every month are free. When they run out, recharge your wallet (from ₹250).

Build it with an AI assistant

Using ChatGPT, Claude, Cursor or Copilot? Copy this prompt into it while your project is open. It covers keys, endpoints, errors and the full lobby → match → standings flow, so the assistant can build the integration and test it with your free test key. The prompt contains no key: put yours in .env as POINTLY_SECRET_KEY.

Loading prompt…

Authentication

Every request sends a key in the Authorization header:

Authorization: Bearer sk_live_XXXXXXXXXXXXXXXXXXXXXXXX
KeyWhere to keep itWhat it can do
sk_live_…Your server onlyEvery endpoint. Uses your free monthly credits first, then your wallet. Refused if sent from a web page.
sk_test_…Your server onlyEvery endpoint. Returns sample data. Never charged.
pst_…Browser (widget)Only scans through the widget, only up to the number of scans you allowed, expires in 30 minutes.

Never put a secret key (sk_…) in browser JavaScript, a mobile app or a public Git repo. Anyone who has it can use up your credits and wallet. If a key leaks, revoke it in the console right away and create a new one. For browser uploads use the widget with a session token.

To catch the most common leak, a live key sent from a web page (a request with a browser Origin header) is refused with 403 secret_key_in_browser.

We store only a fingerprint of each key, so we can't show it again. Copy it when you create it. You can hold up to 10 active keys, name each one ("production server", "staging") and see when it was last used and what it spent.

Test mode

Calls made with a sk_test_… key:

/standings calculates for real in test mode, so you can check your point system for free.

Pricing & credits

Pay as you go. There is no plan to pick and nothing renews.

Every month

100 credits

free on every account. They refill on the same date each month.

After that

₹0.50 / credit

taken from your prepaid wallet.

Failed scans

₹0

If we can't read a screenshot, the credit comes back straight away.

1 credit = 1 scan: a lobby scan or a match result scan, with up to 3 screenshots. Standings, point-table images, balance and usage calls are free.

Free Fire lobbyCallsCreditsCost after free credits
3 matches1 lobby scan + 3 match scans4₹2.00
6 matches1 lobby scan + 6 match scans7₹3.50
9 matches1 lobby scan + 9 match scans10₹5.00

Cost by tournament format

Big tournaments often play many groups of a single match each. Every group still needs a lobby scan (unless the teams are already registered on your site) and one scan per match.

Estimate your tournament

Wallet

Recharge from ₹250 to ₹50,000 by UPI, card or netbanking in Console → Billing. The money shows up within seconds and never expires.

Example

₹500

= 1,000 credits ≈ 142 six-match lobbies.

Recharge bonus

+10%

Recharge ₹2,000 or more: +5% extra balance. ₹5,000 or more: +10%.

How charging works: when a scan starts we take its credit, from your free credits first and then from your wallet. If the scan fails for any reason, it is returned at once. Parallel calls can never take the wallet below zero: a scan that doesn't fit gets 402 insufficient_balance and costs nothing. Set a low-balance alert in the console to get a balance.low webhook before you run out.

Watermark: point-table images carry a small "AI Pointly" mark with test keys and on accounts that have never recharged. Recharge once and it goes away.

Billing in every response

Every billable response includes a billing block, so you always know what a call used and what's left:

"billing": {
  "mode": "live",
  "credits_used": 1,
  "plan_credits_used": 1,      // from your free monthly credits
  "extra_credits_used": 0,     // paid from your wallet
  "charged_paise": 0,          // taken from the wallet for this call
  "charged": "₹0.00",
  "balance_paise": 50000,
  "balance": "₹500.00",
  "plan": "free",
  "plan_credits_left": 73      // free credits left this month
}

The balance is also sent in the Pointly-Balance-Paise response header, together with Pointly-Request-Id. Quote the request id when you contact support.

Scan lobby

POST/api/v1/scan/lobby1 credit per 3 screenshots

Reads a pre-match lobby (room) screenshot and returns every slot with its team name and players. Send several screenshots in one call if the lobby is spread over more than one screen.

FieldTypeDescription
gamerequiredstring"bgmi" or "free_fire"
modestring"solo", "duo" or "squad" (default)
imagesrequiredstring[]1 to 6 screenshots, each a data:image/png;base64,… (or jpeg / webp) data URL, max 10 MB each
max_teamsnumberMost teams in the room, 2 to 100. Default: BGMI 25 squads / 50 duos / 100 solo, Free Fire 12 squads / 25 duos / 50 solo.

Big lobbies need more than one screenshot: Free Fire shows all 12 squads on about 3 screens, BGMI shows about 8 teams per screen (16 teams ≈ 2–3 screenshots, 24–25 teams ≈ 4). Screenshots may overlap; each team is returned once. Solo returns 1 player per team, duo 2, squad up to 4.

Response 200
{
  "id": "req_8f2c1a9d0b7e4c3a1f22",
  "object": "lobby_scan",
  "game": "bgmi",
  "mode": "squad",
  "teams": [
    { "slot": 1, "team_name": "Team Soul",  "players": [{ "name": "SoulMortal" }, { "name": "SoulViper" }] },
    { "slot": 2, "team_name": "GodLike",    "players": [{ "name": "GodLJonathan" }] }
  ],
  "warnings": [],
  "billing": { "mode": "live", "credits_used": 1, "plan_credits_used": 1, "extra_credits_used": 0, "charged_paise": 0, "charged": "₹0.00", "balance_paise": 50000, "balance": "₹500.00", "plan": "free", "plan_credits_left": 99 }
}

Save the teams list. Pass it as lobby to every match scan of this lobby so results are matched to the right teams. A squad is matched when at least 2 of its 4 players are recognised, even if the other names are hard to read; with only 1 recognised player the team is suggested and marked needs_review. Duo and solo teams are matched by their player names.

Scan match result

POST/api/v1/scan/match1 credit per 3 screenshots

Reads the end-of-match result screen and returns each team's finishing position and kills. If the leaderboard spans several pages, send all pages in one call; we merge them.

FieldTypeDescription
gamerequiredstring"bgmi" or "free_fire"
modestring"solo", "duo" or "squad" (default)
imagesrequiredstring[]1 to 6 result screenshots (data URLs)
lobbyobject[]Recommended. Your teams: [{ "slot": 1, "team_name": "Team Soul", "team_id": "your-id", "players": ["SoulMortal"] }]. Results are matched to these teams and your team_id is returned.
max_teamsnumberRoom size, 2 to 100. Helps detect incomplete leaderboards.
Response 200
{
  "id": "req_5a1b…",
  "object": "match_scan",
  "game": "bgmi",
  "mode": "squad",
  "match_number": 3,
  "complete": true,
  "needs_review": false,
  "results": [
    {
      "position": 1,
      "slot": 7,
      "team_id": "your-id-7",
      "team_name": "Team Soul",
      "kills": 12,
      "players": [{ "name": "SoulMortal", "kills": 5 }, { "name": "SoulViper", "kills": 4 }],
      "needs_review": false,
      "review_reason": null
    }
  ],
  "warnings": [],
  "billing": { "mode": "live", "credits_used": 1, "plan_credits_used": 0, "extra_credits_used": 1, "charged_paise": 50, "charged": "₹0.50", "balance_paise": 49950, "balance": "₹499.50", "plan": "free", "plan_credits_left": 0 }
}

Show a review step. When needs_review is true (on the match or on a team), we weren't fully sure about a team's identity or the kills don't add up. Let the organizer confirm those rows before publishing. review_reason says why: team_not_matched (the players are not in your lobby) or kills_mismatch (a player's kills could not be read). complete: false means some teams are missing from the screenshots.

Send players with your lobby. Results are matched to your teams by player names, not by rank. Pass every team's players in lobby and almost no rows will need review. Without players we can only guess from team names.

Widget extras. Results from Pointly.open are the organizer's confirmed version (they can fix names, kills or the team in the review screen) and can include map (for example "Bermuda") if the organizer picked one.

Calculate standings

POST/api/v1/standingsFree

Turns match results into a ranked point table. Results can come from our scans or from anywhere else (manual entry, another tool). Send all matches of the day or tournament in one call.

FieldTypeDescription
gamestring"bgmi" (default) or "free_fire". Picks the default point system.
point_systemobjectOptional. { "placement": [10, 6, 5, 4, 3, 2, 1, 1], "per_kill": 1 }. placement[0] is 1st place. Positions past the list get 0.
tie_breakersstring[]Optional. Order for equal points, up to 3 of "wins", "kills", "placement". Default ["wins", "kills", "placement"].
matchesrequiredobject[]1 to 50 matches: [{ "results": [{ "team_id": "t7", "team_name": "Team Soul", "position": 1, "kills": 12 }] }]. Each row needs team_id or team_name.

Default point systems: BGMI [10, 6, 5, 4, 3, 2, 1, 1, 0…], Free Fire [12, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0…], 1 point per kill.

Response 200
{
  "id": "req_c3d4…",
  "object": "standings",
  "game": "bgmi",
  "matches_counted": 2,
  "point_system": { "placement": [10, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], "per_kill": 1 },
  "standings": [
    { "rank": 1, "team_id": "t7", "team_name": "Team Soul", "matches_played": 2, "wins": 1,
      "kills": 21, "placement_points": 16, "kill_points": 21, "total_points": 37, "per_match": [22, 15] },
    { "rank": 2, "team_id": "t3", "team_name": "GodLike", "matches_played": 2, "wins": 1,
      "kills": 14, "placement_points": 16, "kill_points": 14, "total_points": 30, "per_match": [12, 18] }
  ],
  "billing": { "mode": "live", "credits_used": 0, "plan_credits_used": 0, "extra_credits_used": 0, "charged_paise": 0, "charged": "₹0.00", "balance_paise": 49950, "balance": "₹499.50" }
}

Teams are ranked by total points, then your tie-breakers, then better average finishing position, then most kills in a single match.

Balance

GET/api/v1/balanceFree
{ "object": "balance",
  "plan": "free", "plan_credits_included": 100, "plan_credits_left": 73,
  "plan_credits_reset_at": "2026-12-01T00:00:00.000+05:30",
  "extra_credit_paise": 50,
  "balance_paise": 49950, "balance": "₹499.50",
  "lifetime_recharged_paise": 50000, "lifetime_spent_paise": 50 }

Usage

GET/api/v1/usage?limit=20Free

Your most recent billable calls (max 100), newest first. The console shows the same list with daily totals.

{ "object": "list", "data": [
  { "id": "req_5a1b…", "operation": "scan.match", "mode": "live", "via": "secret", "ok": true,
    "error_code": null, "credits_used": 1, "plan_credits_used": 1, "charged_paise": 0, "duration_ms": 6120, "created_at": "2026-11-17T12:30:11.201Z" }
] }

Drop-in widget

The widget opens our upload popup on top of your page, the same way a payment checkout does. Your user picks screenshots, we read them, and you get the result in a callback. No upload UI to build.

  1. Your server creates a short-lived session with your secret key (below) and passes the pst_… token to the page.
  2. Your page loads pointly.js and calls Pointly.open() with the token.
  3. You get the result in onResult, and your server also gets a scan.completed webhook (useful if the user closes the tab).
Your page

The popup shows the organizer what we read and lets them confirm before onResult fires. It works on mobile and desktop and needs no other libraries. Set theme and accent so it matches your site; the footer always shows "Powered by AI Pointly".

Create a session

POST/api/v1/sessionsFree · secret key only
FieldTypeDescription
typesstring[]Scans allowed: ["lobby", "match"] (default both). Use ["render"] for a point-table image.
gamestring"bgmi" (default) or "free_fire"
modestring"squad" (default), "duo", "solo"
max_scansnumber1 to 100 (default 10). Each scan is charged like a normal scan.
lobbyobject[]Your teams, used to match results (same format as in scan match)
referencestringYour own id (for example a tournament id). Returned in the webhook.
allowed_originstringRecommended. Your site, e.g. https://yoursite.com. The widget refuses to run on any other site.
renderobjectOnly for "render" sessions. Template and data for the image. See point-table images.

Point-table images (templates)

Turn your standings into a ready-to-post point-table image using an AI Pointly template. You can use our public templates, or ask us to design templates in your own branding. Custom templates are added to your account and only your keys can use them.

The image is drawn inside the widget (the same pointly.js), so you get a PNG or JPEG back in the browser without any design work.

List your templates

GET/api/v1/templatesFree · secret key only
{ "object": "list", "data": [
  { "id": "ff-official-result-001", "name": "Free Fire Official Result", "game": "free_fire",
    "preview_url": null, "custom": false, "max_teams": 12 },
  { "id": "tpl_8c41e0…", "name": "YourBrand Finals", "game": "bgmi",
    "preview_url": "https://…/preview.png", "custom": true, "max_teams": 16 }
] }

custom: true marks templates made for your account. Want one? Contact us with your logo, colours and a reference design.

Make an image

  1. Your server creates a session with types: ["render"] and a render object (below).
  2. Your page calls Pointly.render() with the token. The image comes back in onImage.
render fieldTypeDescription
template_idstringRequired. An id from /templates
standingsobject[]Required. 1–100 teams. The standings array from /standings works as is. Each team: rank, team_name, optional team_id, logo_url (https), matches_played, wins, kills, placement_points, kill_points, total_points
eventobjectOptional: name, stage, date, time, organizer, logo_url (https)
match_numbernumber | nullMatch number for a single-match table; null (default) for overall standings
formatstring"png" (default) or "jpeg"
Your server: create the session
POST /api/v1/sessions
{
  "types": ["render"],
  "game": "free_fire",
  "max_scans": 1,
  "allowed_origin": "https://yoursite.com",
  "render": {
    "template_id": "ff-official-result-001",
    "event": { "name": "Weekend Cup", "stage": "Grand Finals", "date": "17 Nov 2026" },
    "standings": [ { "rank": 1, "team_name": "Alpha", "wins": 2, "kills": 31,
                     "placement_points": 44, "kill_points": 31, "total_points": 75 } ]
  }
}
Your page

With the popup, the organizer sees the image and can download it or press Use this image. With headless: true nothing is shown and onImage fires as soon as the image is ready. Images are free and count as one use of the session's max_scans. With test keys, and on accounts that have never recharged, the image carries a small "AI Pointly" watermark.

Team and event logos must allow cross-origin loading (CORS). If a logo host blocks it, the image is still made without those logos.

Full tournament flow

A typical lobby day on your website:

  1. Before match 1: organizer uploads the lobby screenshot → /scan/lobby → you save the slot list (or you already have teams registered on your site, then skip this).
  2. After every match: organizer uploads the result → /scan/match with your lobby → show the review screen if needs_review → save the confirmed results.
  3. Update the table: send all saved matches to /standings → show the ranked table on your site.

Cost for 1 lobby + 6 matches with a table update after each: 1 + 6 = 7 credits (table updates are free). That is ₹3.50 once your free credits are used.

Webhooks

Add an https:// URL in the console. We send a POST with a JSON body for these events:

EventWhendata
scan.completedA widget scan succeededrequest_id, session_reference, type, result (same JSON as the scan endpoint)
balance.lowBalance fell below your alert level (at most once every 6 hours)balance_paise, threshold_paise
pingYou clicked "Send test event" in the consolemessage
Body
{ "id": "evt_7d1c…", "type": "scan.completed", "created": 1763382611, "data": { … } }

Verify the signature

Each request has a Pointly-Signature: t=<unix time>,v1=<signature> header. The signature is HMAC-SHA256 of "<t>.<raw body>" with your webhook secret (whsec_…, shown in the console). Reject the request if the signature doesn't match or t is older than 5 minutes. Reply with any 2xx status within 5 seconds.

Webhook delivery is attempted once. Treat it as a convenience: the scan response (or widget callback) already has the same data.

Idempotency (safe retries)

Network timeouts happen. To retry without paying twice, send an Idempotency-Key header with your own unique id for that action (for example match-42-tournament-9):

Idempotency-Key: match-42-tournament-9

Errors

Errors use normal HTTP status codes and always have this shape:

{ "error": { "code": "insufficient_balance",
             "message": "Your free credits for this month are used up and your wallet balance is too low. Recharge your wallet in the developer console.",
             "request_id": "req_…",
             "details": { "credits_needed": 1, "plan_credits_left": 0, "required_paise": 50, "balance_paise": 20 } } }
StatusCodeWhat to doCharged?
400invalid_requestFix the field named in messageNo
400image_invalidSend 1–6 PNG/JPEG/WebP data URLs, max 10 MB eachNo
401unauthorized / key_revokedCheck your keyNo
401session_expiredWidget session expired or used up. Create a new one.No
404template_not_foundTemplate id is wrong or not on your account. Check GET /api/v1/templates.No
402insufficient_balanceRecharge your walletNo
403secret_key_in_browserA live key was sent from a web page. Call from your server, or use the widget. Revoke the key if it was published.No
403forbidden / account_suspendedWrong key type for this endpoint, or contact supportNo
409idempotency_conflictUse a new Idempotency-KeyNo
422wrong_screenshotImage isn't the expected screen (lobby vs result)No
422scan_failedCouldn't read the screenshot. Try a clearer, uncropped one.No
429rate_limitedWait Retry-After secondsNo
429test_limit_reachedDaily test-mode limit. Use a live key or wait.No
5xxservice_unavailable / internal_errorRetry after a few seconds (with the same Idempotency-Key)No

Limits

Screenshot tips

FAQ

Which games are supported?

BGMI / PUBG Mobile and Free Fire / Free Fire MAX, in solo, duo and squad modes. More games are coming.

Do I need an AI Pointly subscription?

No. The API has its own free credits and prepaid wallet. Your app subscription, if you have one, is separate.

Is there a monthly plan?

No. You only pay for scans you make. If you'd like a fixed monthly price for high volume, write to us.

Can I get a GST invoice?

Yes. Contact support with your account email and the recharge date.

Is my data used for anything else?

Screenshots are processed to answer your request and are not shown to anyone else or sold. Results are kept only as long as needed for idempotent replays (24 hours) and usage records.

What if a result is wrong?

Show the review step for rows with needs_review. If a clear screenshot was read wrongly, send us the request_id and we'll check it and credit the call back.


Questions? Open the Developer Console or write to support from the AI Pointly app.