Find a section & browse all pages

Solve a gate

// create a solve and get a token back

POST/v1/solvesynchronous wait or async acceptance

Creates a solve and waits for its result, subject to the configured HTTP wait limit (20 seconds by default). If solving continues after that wait, the API returns 202 with a pending solve id to retrieve. To receive the id immediately, pass async: true. Poll the same id until its status leaves pending; ending the HTTP wait does not cancel the solve.

Make retries idempotent. Send an Idempotency-Key header with a unique value for each logical solve. Reuse that value and the same request body when retrying a lost response; use a new value for a new solve. The SDK options are idempotencyKey in Node and idempotency_key in Python. A timeout does not cancel queued work, so a second request without the original key can create another billable solve. An idempotent replay can return pending with HTTP 200; retrieve its id until it reaches a terminal state.

Live idempotency reservations last 24 hours and are scoped to the workspace. A concurrent reservation can return 409 conflict; retry the original body and key. Matching covers gate, sitekey, URL, action, cdata and async; a mismatch returns 422 idempotency_key_reused. Keep every field, including proxy, unchanged on recovery. Authentication, pass and rate checks run before replay lookup. Sandbox POSTs bypass idempotency and create a new record on each call.

Body parameters

FieldTypeDescription
gatereqstringturnstile or waf — which challenge to clear.
sitekeyreqstringFor turnstile, the widget's public sitekey. The current API also requires a non-empty value for waf; use waf as a placeholder. The WAF provider uses the URL and proxy, not this value.
urlreqstringThe page URL where the gate is served. Used to scope the solved token.
actionoptstringTurnstile action value, forwarded unchanged. Up to 32 ASCII letters, digits, underscores or hyphens. Defaults to empty; ignored for WAF.
cdataoptstringTurnstile widget custom data, forwarded unchanged. Up to 255 ASCII letters, digits, underscores or hyphens. Defaults to empty; ignored for WAF.
asyncoptbooleanReturn immediately with status:"pending" and poll for the result. Default false.
proxyoptstringRoute the solve through your own egress IP, e.g. http://user:pass@ip:port.

Request & response

curl https://api.solvegate.io/v1/solve \
  -H "Authorization: Bearer sk_live_•••" \
  -d gate=turnstile \
  -d sitekey=0x4AAAAAAAAA_target \
  -d url=https://app.example.com
200 · solved example
{
  "id":       "slv_8Kd2…aF9",
  "status":   "solved",
  "gate":     "turnstile",
  "token":    "0.Xa3f…X9_cleared",
  "solve_ms": 980,
  "expires_at": 1714663200,
  "mode":     "live",
  "meter":    "credits",
  "billed":   true
}

Ready to pour through the gate?

// free sandbox keys · no card required to start