Turnstile Token & Session Clearance API

Two dedicated POST endpoints: /v1/token for standalone Turnstile verification tokens (with or without proxy), and /v1/clearance for full-page cf_clearance session cookies over your own proxy.

Turnstile Token · POST /v1/token
$4.50 / 1k (9 cr Your proxy) · $5.00 / 1k (10 cr Default egress)
Session Clearance · POST /v1/clearance
$5.00 / 1k (10 cr · Custom proxy required)

Standard verification (Turnstile Token)

POST /v1/token

Post a sitekey and url to /v1/token (alias /v1/turnstile). Works with default system egress ($5.00 / 1k) or your own custom proxy ($4.50 / 1k).

Network exit mode
curl -X POST https://api.astify.dev/v1/token \
  -H "Authorization: Bearer $ASTIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sitekey": "0x4AAAAAAABS7vwvV6VFfMcD",
    "url": "https://example.com/login"
  }'

Request parameters

ParameterDescription
sitekeystring, requiredTurnstile widget sitekey (e.g. 0x4AAAAAAABS7vwvV6VFfMcD).
urlstring, requiredFull URL of the page hosting the verification widget.
proxystring, optionalOptional custom proxy (http://user:pass@host:port, socks5://...). Passing a proxy lowers the cost to 9 credits ($4.50/1k).
actionstring, optionalOptional widget action parameter if configured by the target site.
cDatastring, optionalOptional widget cData string if configured by the target site.

Example response

{
  "success": true,
  "ok": true,
  "token": "0.aB3dEf9gHiJkLmNoPqRsTuVwXyZ…(1024 chars)",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "proxyMode": "managed",
  "requiresIpConsistency": false,
  "tookMs": 3420
}

Session credential (Clearance)

POST /v1/clearance

Post a protected url together with your custom proxy to /v1/clearance. Returns cf_clearance and the exact userAgent bound to your proxy IP ($5.00 / 1k).

requiresIpConsistency: true

curl -X POST https://api.astify.dev/v1/clearance \
  -H "Authorization: Bearer $ASTIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/",
    "proxy": "http://user:[email protected]:8080"
  }'

Request parameters

ParameterDescription
urlstring, requiredProtected target page URL that issues a cf_clearance cookie.
proxystring, requiredRequired custom proxy (http://user:pass@host:port, socks5://...). Must be non-empty to keep IP, User-Agent, and fingerprint consistent.

IP & UA consistency

Session clearance cookies are bound to the exact exit IP, User-Agent, and TLS fingerprint that solved the challenge.

  • The proxy parameter is strictly mandatory on /v1/clearance — requests without proxy are rejected with HTTP 400 (proxy_required) at 0 cost.
  • Send every follow-up request through the exact same static/sticky proxy and include the returned userAgent header.
  • Avoid rotating proxies between the /v1/clearance call and your subsequent requests.

Response fields

FieldDescription
successbooleantrue when a clearance cookie was obtained. A false response costs 0 credits.
cf_clearancestringThe cf_clearance cookie value to attach to your target domain.
cookiesobjectKey-value map of returned session cookies (including cf_clearance).
userAgentstringThe exact User-Agent bound to cf_clearance. Send it on every follow-up request.
proxyMode"own"Always own for /v1/clearance.
requiresIpConsistencybooleanAlways true — follow-up requests must reuse the exact same proxy IP and userAgent.
tookMsnumberEnd-to-end solve duration in milliseconds.

Example response

{
  "success": true,
  "ok": true,
  "cf_clearance": "q7Yw0mJ1c2V…xNzMxNTg1NjAw-1.2.1.1",
  "cookies": {
    "cf_clearance": "q7Yw0mJ1c2V…xNzMxNTg1NjAw-1.2.1.1"
  },
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "proxyMode": "own",
  "requiresIpConsistency": true,
  "tookMs": 5180
}

Billing and errors

  • A call that fails costs 0 credits. X-Astify-Cost reports the cost either way.
  • X-Astify-Cost and X-Astify-Balance come back on every response, so you never need a second call to check your balance.
  • Over your concurrency limit the API returns 429 with a Retry-After header.
  • Out of credits returns 402. Nothing is charged.

X-Astify-Cost X-Astify-BalanceFull error reference

Questions

What is the difference between /v1/token and /v1/clearance?

/v1/token solves Turnstile widgets and returns a single-use verification token (token), supporting both system default egress ($5.00/1k) and custom proxy ($4.50/1k). /v1/clearance solves full-page managed challenges and returns cf_clearance + userAgent ($5.00/1k), strictly requiring your custom proxy.

Why does /v1/clearance require a custom proxy?

Because cf_clearance is bound to the exact exit IP, User-Agent, and fingerprint that solved the challenge. Requiring your own proxy ensures your subsequent requests exit from the exact same IP.

What proxy formats are supported?

http://user:pass@host:port, https://..., socks5://..., or host:port / user:pass@host:port.

What happens if a solve fails?

The response has success: false and an error code, X-Astify-Cost is 0, and your balance does not change.

Start with 100 free credits

Verify your email and the trial credits are in your balance.

Not for buying tickets, creating accounts in bulk, testing credentials or logging in to financial accounts. Read the acceptable-use rules