Solve a gate

// create a solve and get a token back

POST/v1/solve— provider avg · synchronous

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.

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

request
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 · gate cleared
{
  "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