Nullgate

Generation HTTP API

sh
curl https://api.nullgate.club/akamai/sensor \
  -H "Authorization: Bearer $NULLGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @sensor.json
Endpoint Returns
POST /akamai/sensor A sensor request for the target
POST /akamai/pixel A pixel request for the target
POST /akamai/sbsd An SBSD request for the target
POST /amazon/fwcim The metadata1 value for a form
POST /amazon/acic/pow A serialized ACIC proof
POST /amazon/acic/waf Five image indexes for AWS WAF
POST /pingone/prepare Token GET request for the target
POST /pingone/protect Encoded Protect data
POST /classifier/classify A probability per label for each image
POST /classifier/match An independent probability per query for each image
GET /account Balance, prices and total usage
GET /account/usage Usage in hourly or daily buckets
wss://api.nullgate.club/threatmetrix/profile A ThreatMetrix profile

Rules for every request

  • Base URL: https://api.nullgate.club.
  • Auth: Authorization: Bearer ng_your_key.
  • JSON bodies and responses. Classifier requests: multipart/form-data.
  • Non-2xx JSON: {"code", "message", "request_id"}. See Errors.

Request compression

Uncompressed JSON still works.

  1. Wait until an API response advertises Accept-Encoding: gzip.
  2. Gzip the UTF-8 JSON body once.
  3. Send Content-Encoding: gzip and the encoded Content-Length.
  4. If a compressed request returns 413, retry it once uncompressed.

Limits apply after decompression. Decoded length: at most 16 times encoded length. Do not gzip classification requests.

Request limits and overload

Input Limit
Akamai HTTP request body 8 MiB, including JSON encoding
Amazon HTTP request body 4 MiB, including JSON encoding
Classifier HTTP request body 48 MiB, including multipart encoding
Akamai sensor, pixel or SBSD script 2 MiB of UTF-8 bytes
ThreatMetrix page HTML 4 MiB of UTF-8 bytes
Classifier image 4 MiB each. More: Classifier

Oversized HTTP body or Akamai script: HTTP 413 invalid_request.

HTTP generation and classification can wait briefly for capacity. Sustained overload: HTTP 503 unavailable, Retry-After: 1. No charge or state change. Retry after one second. The SDK does not retry unavailable.

Sessions over HTTP

Profile-based generators only, not ACIC.

  1. Start the visit with "session": null.
  2. Send the returned session in the next request for the same product.
  3. Keep profile, user_agent and timezone unchanged.
  4. Send requests one at a time per session.

More: Sessions.

Retaining an Akamai sensor script

POST /akamai/sensor: full script on the first request per document, script_url on every request.

Field Rule
script Optional only when Nullgate retains the matching extraction for this document
script_digest Required without script. SHA-256 of the script's UTF-8 bytes, as 64 lowercase hexadecimal characters
script_retained Top-level response field. Only true confirms successful extraction and checkpoint storage

After script_retained: true, you can omit script for that document and session. The full script gives identical output bytes.

No retention, digest mismatch or new document: HTTP 428 script_required, message: "Send the script for this document.". No charge or state change. Retry with the full script.

New documents, sessions or scripts reset retention. This rule excludes Pixel and SBSD.

Sending the generated request

  1. Wait until send_at (Unix time).
  2. As the SDK does, add page Origin and Referer, your User-Agent and cookies to request.headers.
  3. POST request.body unchanged to request.url.

Generation

PingOne Protect

Both endpoints require authentication. Product guide · OpenAPI schema.

  1. Send profile (UUID), user_agent, website.url, and the site's SDK script to free POST /pingone/prepare. Optional fields include session, timezone, sdk_config, token_host, and website.html, referrer, and history_length. Supply website.document_id and website.started_at_ms together or omit both.
  2. Send the returned request with your target HTTP client. Return the raw CSS response text as token_response.
  3. Call POST /pingone/protect with the common fields, the returned session, and exactly one of token_response or client_token. It returns data, sdk_version, device_id, session, and request_id. Pass data in the site's normal flow.

The script may be omitted when the session retains it. If the service returns HTTP 428 script_required, retry with the full script. Protect accepts optional jwt_device_attributes, jwt_agent_payload, and behavioral. Provide the agent JWT if the SDK configuration enables the agent flag. Each successful Protect result is billed. Prepare is free.

Amazon ACIC

SDK example: discover and submit challenges.

ACIC is stateless. No profile or session.

  • Send all Amazon and AWS requests, including verification and vouchers.
  • Keep state, keys, HMAC, metrics and vouchers.
  • Call the matching endpoint with current input for each round or chained challenge.

PoW (POST /amazon/acic/pow):

  • challenge_type: current actionType from amz-aamation-resp. html: current challenge HTML.
  • Types: PROOF_OF_WORK_LEVEL_3 and PROOF_OF_WORK_LEVEL_3_CHAIN_WAF_ADVERSARIAL_SYNTHETIC_GRID_V2_LEVEL_2.
  • Use response unchanged: serialized object with challengeType and serialized proof data.
  • Optional started_at_ms: Unix milliseconds, defaults to server time.
  • Submit no earlier than send_at (Unix seconds).

WAF (POST /amazon/acic/waf):

  • problem: original AWS problem. problem_type: gridcaptcha-v2-5-0.15-0 or gridcaptcha-v2-5-0.2-0.
  • Nine images and one query. assets holds the images and target as JSON-encoded arrays.
  • client_solution: five sorted, zero-based indexes into the original image order.

Arkose and unknown profiles return HTTP 501 unsupported without billing. Each successful PoW or WAF solution costs one amazon.acic operation.

Fields of profile-based generation requests

FieldTypeRequiredDescription
urlstringyesThe target page URL you observed.
htmlstringyesThe complete target page HTML you observed.
document_iduuid | nullnoAn advanced identifier kept stable for this loaded document.
started_at_msinteger | nullnoThe document start time in Unix milliseconds.
profileuuidyesYour browser identity, kept stable for each target account.
sessionstring | nullnoThe previous response session, or null to start a new session.
user_agentstringyesThe browser User-Agent you send to the target site.
timezonestring | nullnoThe browser timezone as an IANA name.

POST /akamai/sensor

In addition to the common fields:

FieldTypeRequiredDescription
script_urlstringyesThe script URL observed on the page.
scriptstring | nullnoThe complete script source, until this document retains it. Maximum 2 MiB as UTF-8.
script_digeststring | nullnoSHA-256 of the UTF-8 script. Required when script is omitted.
cookiesmap of stringnoThe cookies you send to the target site.
inputsInput[] | nullnoThe observed input summaries.
actionsobject[] | nullnoThe observed browser actions in order.

Input

FieldTypeRequiredDescription
attributesmap of stringyesThe observed attributes used to identify the input.
valueInputValueyesThe input value summaries, without the original text.
selectorstring | nullnoThe CSS selector identifying the observed input.

InputValue

FieldTypeRequiredDescription
lengthintegeryesThe observed input length.
hashstringyesThe SHA-256 hash of the observed input value.
countsany[] | nullnoThe four observed character category counts.
hash31integer | nullnoThe observed signed 31-based hash of the input value.
trimmed_hash31integer | nullnoThe observed signed 31-based hash after trimming the input value.
trimmed_lengthinteger | nullnoThe observed input length after trimming.

Example request body

json
{
  "actions": [],
  "cookies": {},
  "html": "<html></html>",
  "inputs": [],
  "profile": "00000000-0000-0000-0000-00000000004a",
  "script": "/* complete observed script source */",
  "script_url": "https://shop.example/script.js",
  "url": "https://shop.example/login",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
}

Response fields

FieldTypeRequiredDescription
requestTargetRequestyesThe complete POST request to send to the target site.
sessionstringyesThe session to include in your next generation request.
request_idstringyesThe identifier to include when contacting support.
script_retainedbooleanyesLater sensor requests for this document may send script_digest.

TargetRequest

FieldTypeRequiredDescription
urlstringyesThe URL to POST to on the target site.
bodystringyesThe exact text to send as the POST body.
headersmap of stringyesThe headers to send with the target request.
send_atnumberyesThe earliest target POST time in Unix seconds.

Example response

json
{
  "request": {
    "url": "https://shop.example/script.js",
    "body": "{\"sensor_data\":\"generated value\"}",
    "headers": {
      "content-type": "text/plain;charset=UTF-8",
      "accept-language": "en-US,en;q=0.9"
    },
    "send_at": 1800000000.5
  },
  "session": "continued-session",
  "request_id": "request-id",
  "script_retained": true
}

POST /akamai/pixel

In addition to the common fields:

FieldTypeRequiredDescription
script_urlstringyesThe script URL observed on the page.
scriptstringyesThe complete script source. Maximum 2 MiB as UTF-8.
challengestringyesThe pixel challenge observed in the page HTML.
iframebooleannoModel a hidden cross-origin iframe with restricted permissions.

Example request body

json
{
  "challenge": "123",
  "html": "<html></html>",
  "profile": "00000000-0000-0000-0000-00000000004a",
  "script": "/* complete observed script source */",
  "script_url": "https://shop.example/script.js",
  "url": "https://shop.example/login",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
}

Response fields

FieldTypeRequiredDescription
requestTargetRequestyesThe complete POST request to send to the target site.
sessionstringyesThe session to include in your next generation request.
request_idstringyesThe identifier to include when contacting support.

TargetRequest

FieldTypeRequiredDescription
urlstringyesThe URL to POST to on the target site.
bodystringyesThe exact text to send as the POST body.
headersmap of stringyesThe headers to send with the target request.
send_atnumberyesThe earliest target POST time in Unix seconds.

Example response

json
{
  "request": {
    "url": "https://shop.example/pixel",
    "body": "value=generated%20value",
    "headers": {
      "content-type": "application/x-www-form-urlencoded",
      "accept-language": "en-US,en;q=0.9"
    },
    "send_at": 1800000000.5
  },
  "session": "continued-session",
  "request_id": "request-id"
}

POST /akamai/sbsd

In addition to the common fields:

FieldTypeRequiredDescription
script_urlstringyesThe script URL observed on the page.
scriptstringyesThe complete script source. Maximum 2 MiB as UTF-8.
cookiesmap of stringnoThe cookies you send to the target site.

Example request body

json
{
  "cookies": {},
  "html": "<html></html>",
  "profile": "00000000-0000-0000-0000-00000000004a",
  "script": "/* complete observed script source */",
  "script_url": "https://shop.example/script.js",
  "url": "https://shop.example/login",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
}

Response fields

FieldTypeRequiredDescription
requestTargetRequestyesThe complete POST request to send to the target site.
sessionstringyesThe session to include in your next generation request.
request_idstringyesThe identifier to include when contacting support.

TargetRequest

FieldTypeRequiredDescription
urlstringyesThe URL to POST to on the target site.
bodystringyesThe exact text to send as the POST body.
headersmap of stringyesThe headers to send with the target request.
send_atnumberyesThe earliest target POST time in Unix seconds.

Example response

json
{
  "request": {
    "url": "https://shop.example/sbsd",
    "body": "{\"value\":\"generated value\"}",
    "headers": {
      "content-type": "application/json",
      "accept-language": "en-US,en;q=0.9"
    },
    "send_at": 1800000000.5
  },
  "session": "continued-session",
  "request_id": "request-id"
}

POST /amazon/fwcim

In addition to the common fields:

FieldTypeRequiredDescription
referrerstringnoThe page URL that referred the browser to this document.
history_lengthinteger | nullnoThe observed number of browser history entries.
cookiesmap of stringnoThe cookies you send to the target site.
form_selectorstring | nullnoThe CSS selector for the observed form.
inputsInput[] | nullnoThe observed input summaries.
actionsobject[] | nullnoThe observed browser actions in order.
submittedbooleannoWhether the observed form was submitted.
performance_timingmap of integer | nullnoThe observed navigation timing values in milliseconds.

Input

FieldTypeRequiredDescription
attributesmap of stringyesThe observed input's id and name attributes only.
valueInputValueyesRedacted observations of the input value.
checksuminteger | nullnoThe observed unsigned 32-bit input checksum.
selectorstring | nullnoThe CSS selector for this observed input.
geometryGeometry | nullnoThe observed input element bounds.
textstring | nullnoOptional nonpassword text observed by the collector canvas.

InputValue

FieldTypeRequiredDescription
lengthintegeryesThe observed input value length.
hashstringyesThe lowercase SHA-256 digest of the observed value.
countsany[] | nullnoThe four observed character-class counts.
hash31integer | nullnoThe observed signed 32-bit value hash.
trimmed_hash31integer | nullnoThe observed signed 32-bit hash after trimming.
trimmed_lengthinteger | nullnoThe observed value length after trimming.

Geometry

FieldTypeRequiredDescription
leftnumbernoThe observed element's left position in CSS pixels.
topnumbernoThe observed element's top position in CSS pixels.
widthnumberyesThe observed element width in CSS pixels.
heightnumberyesThe observed element height in CSS pixels.

Example request body

json
{
  "form_selector": "#login",
  "html": "<form id=\"login\"><input id=\"email\"></form>",
  "performance_timing": {
    "domInteractive": 1800000000021,
    "fetchStart": 1800000000000,
    "loadEventEnd": 1800000000022,
    "navigationStart": 1800000000000,
    "responseEnd": 1800000000020,
    "responseStart": 1800000000010
  },
  "profile": "00000000-0000-0000-0000-00000000004a",
  "url": "https://shop.example/login",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
}

Response fields

FieldTypeRequiredDescription
metadata1stringyesThe generated metadata1 value to include in the target form.
send_atnumberyesThe earliest target submission time in Unix seconds.
headersmap of stringyesThe headers to send with the target form.
sessionstringyesThe session to include in your next generation request.
request_idstringyesThe identifier to include when contacting support.

Example response

json
{
  "headers": {
    "Accept-Language": "en-US,en;q=0.9"
  },
  "metadata1": "generated value",
  "request_id": "request-id",
  "send_at": 1800000000.5,
  "session": "continued-session"
}

POST /amazon/acic/pow

Request fields

FieldTypeRequiredDescription
challenge_typestringyesThe current actionType from the amz-aamation-resp header.
htmlstringyesThe current ACIC proof-of-work challenge HTML, not a login page.
started_at_msinteger | nullnoChallenge start in Unix milliseconds; defaults to server time.

Response fields

FieldTypeRequiredDescription
responsestringyesSerialized challengeType/data object for ACIC's response field.
request_idstringyes
send_atnumberyesThe earliest target submission time in Unix seconds.

POST /amazon/acic/waf

Request fields

FieldTypeRequiredDescription
problemobjectyesThe original AWS WAF problem object, including problem_type and assets.

Response fields

FieldTypeRequiredDescription
client_solutioninteger[]yesFive zero-based image indexes in original image order.
request_idstringyes

Classification

No sessions or common fields. See Classifier.

POST /classifier/classify

Fields of the multipart/form-data request

FieldTypeRequiredDescription
imagefile[]yesRepeat once per image: raw JPEG, PNG or WebP bytes, each at most 4 MiB; JPEG up to 28 megapixels, PNG 40, WebP 16. The filename and part content type are ignored.
labelstring[]yesRepeat once per candidate label; used verbatim as a text prompt.
model"fast" | "balanced" | "precise"noThe speed and accuracy tier; each tier has its own price.

Response fields

FieldTypeRequiredDescription
model"fast" | "balanced" | "precise"yesThe tier that classified the images.
resultsResult[]yesOne result per image, in request order.

Result

FieldTypeRequiredDescription
labelstringyesThe label with the highest score.
scoresnumber[]yesOne probability per label, in request order; they sum to 1.

Example response

json
{
  "model": "balanced",
  "results": [
    {
      "label": "a photo of a cat",
      "scores": [
        0.97,
        0.03
      ]
    }
  ]
}

POST /classifier/match

Fields of the multipart/form-data request

FieldTypeRequiredDescription
imagefile[]yesRepeat once per image: raw JPEG, PNG or WebP bytes, each at most 4 MiB; JPEG up to 28 megapixels, PNG 40, WebP 16. The filename and part content type are ignored.
querystring[]yesRepeat once per query; scores are independent probabilities.

Response fields

FieldTypeRequiredDescription
resultsMatchResult[]yesOne result per image, in request order.

MatchResult

FieldTypeRequiredDescription
scoresnumber[]yesIndependent probabilities per query, in request order.

Account

GET /account

Response fields

FieldTypeRequiredDescription
iduuidyesYour account identifier.
balancestringyesYour remaining balance in USD.
currency"USD"noThe currency used for balances and charges.
created_atdatetimeyesThe time your account was created.
activebooleanyesWhether your account may use paid operations.
prices_per_1000map of stringyesThe USD price per thousand operations for each product.
usageUsageTotal[]yesYour lifetime usage and charges by product operation.

UsageTotal

FieldTypeRequiredDescription
operation"akamai.pixel" | "akamai.sensor" | "akamai.sbsd" | "threatmetrix.profile" | "amazon.fwcim" | "amazon.acic" | "pingone.protect" | "classifier.fast" | "classifier.balanced" | "classifier.precise" | "classifier.match"yesThe product operation charged for this usage.
requestsintegeryesThe number of charged operations.
amountstringyesThe total charge in USD.

Example response

json
{
  "active": true,
  "balance": "1.000000",
  "created_at": "2026-11-01T00:00:00Z",
  "currency": "USD",
  "id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
  "prices_per_1000": {
    "akamai.sensor": "1.500000"
  },
  "usage": []
}

GET /account/usage

Start inclusive, end exclusive. Ranges round outward to UTC hours. Empty buckets are omitted. The current hour is provisional.

Query parameters

FieldTypeDefaultDescription
startdatetime | nullThe inclusive start timestamp, including its timezone.
enddatetime | nullThe exclusive end timestamp, including its timezone.
interval"hour" | "day"hourThe size of each usage bucket.

Response fields

FieldTypeRequiredDescription
currency"USD"noThe currency used for charges.
interval"hour" | "day"yesThe size of each usage bucket.
startdatetimeyesThe inclusive UTC start of the returned range.
enddatetimeyesThe exclusive UTC end of the returned range.
bucketsUsageBucket[]yesThe nonempty usage buckets within the returned range.

UsageBucket

FieldTypeRequiredDescription
operation"akamai.pixel" | "akamai.sensor" | "akamai.sbsd" | "threatmetrix.profile" | "amazon.fwcim" | "amazon.acic" | "pingone.protect" | "classifier.fast" | "classifier.balanced" | "classifier.precise" | "classifier.match"yesThe product operation charged for this usage.
requestsintegeryesThe number of charged operations.
amountstringyesThe total charge in USD.
startdatetimeyesThe inclusive UTC start of this usage bucket.

Example response

json
{
  "buckets": [],
  "currency": "USD",
  "end": "2026-11-02T00:00:00Z",
  "interval": "day",
  "start": "2026-11-01T00:00:00Z"
}

ThreatMetrix WebSocket

Connect to wss://api.nullgate.club/threatmetrix/profile with Authorization: Bearer. Send JSON text. Match reply id to command id.

First message: common fields plus three more:

json
{
  "type": "start",
  "profile": "00000000-0000-0000-0000-00000000004a",
  "session": null,
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",
  "url": "https://shop.example/login",
  "html": "<html></html>",
  "at_ms": 1800000000000,
  "tags_url": "https://shop.example/tags.js?org_id=org&session_id=visit"
}
From Nullgate Meaning Your answer
{"type": "hello", "session", "request_id"} The profile started. Keep session for the next profile None
{"type": "http", "id", "request"} Make this HTTP request to the target. request has role, url, method, headers, body (base64 or null) and credentials (include or omit) {"type": "http.result", "id", "response": {"status", "headers", "body", "received_at_ms"}} with body in base64. If the request cannot be made: {"type": "http.error", "id", "detail"}
{"type": "ice", "id", "server"} Open a TURN allocation on this server {"type": "ice.result", "id", "observation"}. observation is {"candidates": [{"value", "elapsed_ms"}], "complete_at_ms"}, or null
{"type": "ice.release", "id"} Close that allocation None
{"type": "ready", "request_id"} The page start is done None
{"type": "collected", "request_id"} Collection for this page is done None
{"type": "pagehide.done"} Your pagehide is processed None
{"type": "error", "code", "message", "request_id"} The profile failed. The socket closes None
From you When
{"type": "pagehide", "at_ms", "persisted": false} You leave the page. Wait for pagehide.done
{"type": "close"} You are done. Nullgate closes the socket

Each http command is one charged threatmetrix.profile operation.