Usage and Quotas

Each plan includes a monthly allowance of hosted scans. This page explains what counts as a scan, when the allowance resets, what happens when it runs out, and which endpoints report your usage. The allowance for each plan is on the pricing page.

What counts as a scan#

One accepted scan request is one scan, whatever was submitted.

Request Counted?
File scan (POST /api/scan) Yes, one per file
Payload scan (POST /api/scan/payload) Yes, one per payload
A scan answered from the scan cache Yes. A cached answer is still a scan
A deferred scan (?defer=true, or a file large enough to be deferred automatically) Yes, counted when it is queued, so it counts even if the scan later fails with an Error result
Scans that Contact and Strand run through Surface for your account Yes, against the same allowance
A synchronous scan that fails with 503 No
A request refused before scanning (400, 401, 402, 403, 413, 429) No
Scans by the scanner binary, including results you report to the dashboard No. Local scans run on your hardware and are not metered

An archive counts as one scan, however many files are inside it.

The scan cache#

Surface remembers the result for identical content for 24 hours. Sending the same bytes again within that window returns the stored verdict immediately instead of re-running every engine. The cache is keyed on the content's hash and also on the name or label you send, the scan profile's engine settings and, for payloads, the action-screening context, so changing any of those runs a fresh scan.

A cached answer is counted, recorded in scan history, delivered to your webhook, and returned with HTTP 200. That last point matters for deferred scans: content already in the cache comes back synchronously with a full result even when you sent ?defer=true, so handle both 200 and 202.

When the allowance resets#

Each account has its own monthly cycle, starting from when the account was set up, not from the first of the calendar month. reset_at in the usage response is the end of the current cycle.

The counter resets on your first scan after reset_at passes, and the next cycle runs one month from that moment. Until you scan again, reset_at can show a time in the past and scans_used the previous cycle's total.

Changing plan applies the new allowance and file-size cap straight away, without resetting scans_used. After an upgrade you can keep scanning immediately; after a downgrade below what you have already used, scans_remaining is negative until the cycle resets.

When you reach the limit#

Once scans_used reaches your allowance, every hosted scan request (file, payload, deferred, and cached) is refused with HTTP 402 before any scanning happens:

json

{
  "error": "monthly scan quota exceeded (100/100 scans used)",
  "requestId": "550e8400-e29b-41d4-a716-446655440000"
}

Nothing else stops working. Scan history, profiles, usage and the dashboard stay available, and the scanner binary keeps scanning on paid plans because local scans are not metered.

A 402 is not a verdict. If your code gates uploads or agent actions on Surface, decide in advance whether a refused scan should fail closed (block) or fall back to another check. Do not treat it as clean.

Checking usage#

GET /api/account/usage#

The current cycle's usage. Available on every plan, to any role with billing read access (all four built-in roles have it).

json

{
  "scans_used": 43,
  "max_scans": 100,
  "scans_remaining": 57,
  "max_file_size_mb": 10,
  "plan_tier": "free",
  "reset_at": "2026-12-01T09:30:00Z",
  "daily_volume": {
    "dates": ["2026-11-12", "2026-11-13"],
    "counts": [12, 31]
  }
}
Field Description
scans_used Hosted scans counted this cycle
max_scans Your plan's monthly allowance. -1 means unlimited
scans_remaining max_scans minus scans_used. -1 when unlimited; negative after a downgrade
max_file_size_mb Your plan's hosted per-file cap
plan_tier free, starter, standard or pro
reset_at End of the current cycle (see above)
daily_volume Scans per day over the last 30 days, from scan history

daily_volume is read from scan history, not from the billing counter, so the two can differ: it includes local scans you reported (which are not counted), and it only reaches back as far as your plan's retention window.

GET /api/account/status#

A compact status used by the scanner binary to check its license. Fields are camelCase:

Field Description
accountId, planTier Your account and plan
scansUsed, maxScans, scansRemaining The same counter as /usage
licensed Whether your plan includes the scanner binary (every paid plan)
maxFileSizeMB The per-file cap the scanner binary enforces. 0 means no cap, which every paid plan gets
localScanCap Monthly local-scan allowance. 0 means unlimited, which every paid plan gets
profile The scan profile linked to your API key (or the account default), with webhook settings removed

GET /api/account#

An account summary for dashboards. Alongside the same counter fields as /usage (scans_used, max_scans, max_file_size_mb, plan_tier, reset_at), it returns:

Field Description
retained_scans Scans still in your history. This is bounded by retention, so it is not a lifetime total and can be lower than scans_used. total_scans is the same number, kept for compatibility
scans_this_month Scans in history from the last 30 days. A rolling window, not your billing cycle
scans_by_type History counts by file and payload
blocked_ips Number of addresses on your block list

For billing, use /usage. The history-based counts are for activity, not for what you have spent.

Analytics#

Two endpoints summarize scan history. Both require the Analytics feature (Standard and Pro); other plans get 403 with code: "plan_required". Both read from scan history, so they cover only what your retention window still holds, and they include local scans you reported.

GET /api/account/analytics#

?days= from 1 to 90, default 7.

Field Description
total_scans Scans in the window
detection_rate Share of scans that came back Suspicious, Risky or Malicious (0 to 1)
verdict_distribution Count per threat level
top_threats Up to 10 {threat, count} pairs, by primaryThreat
engine_contribution How often each engine flagged something in a non-Clean result
ml_score_distribution Scans grouped by ML score range
avg_scan_time_ms, files_scanned_mb Average scan time and total size scanned
daily_volume {date, count} per day

GET /api/account/stats/charts#

The data behind the dashboard charts. ?days= from 1 to 90, default 30. Returns daily_volume, threat_distribution (counts for clean, informational, suspicious, risky and malicious), scan_time_vs_size (up to 200 recent scans), detection_breakdown by engine category, and feedback_stats from the false-positive and false-negative reports you have submitted.