SafeConduct is invite-only. Sign up to be notified when we launch.Join the waitlist →

Reference

Solve and wait

Create and wait in one call: returns when the task finishes (200, solved or failed). If it is still running after its time budget plus a margin, returns 202 with the task to poll.

POSThttps://api.safeconduct.ai/v1/tasks/solveTry it in the Playground

Authorization

Your API key in the Authorization header: Bearer sy_live_…. Clients that can’t set that header send the same key as X-API-Key.

Body

JSON. Unknown fields are refused. Field names match case-insensitively.

typestringrequired

recaptcha_v2recaptcha_v2_enterpriserecaptcha_v3recaptcha_v3_enterpriseturnstile

websiteURLstringrequired

The page showing the captcha (absolute http or https URL).

websiteKeystringrequired

The sitekey.

isInvisibleboolean

reCAPTCHA v2 only.

pageActionstring

reCAPTCHA v3 action, or Turnstile action.

minScorenumber · 0.1 to 0.9

reCAPTCHA v3 only.

enterprisePayloadobject

reCAPTCHA Enterprise only, e.g. {"s":"..."}.

datastring

Turnstile cData.

pageDatastring

Turnstile chlPageData.

userAgentstring
proxystring

Solve through your own proxy, scheme://user:pass@host:port (http, https, socks4, socks5).

routingobject

Optional: the providers this request wants. Absent or empty, the router chooses as for every task (the API key's settings, else balanced). The API key's exclusions and the account's provider rule still apply: naming a provider they rule out is refused, never quietly sent elsewhere. The customer's own key at a named provider is used before our account there.

Fields of routing
providersstring[] · up to 10

Provider ids (as in GET /v1/stats/providers, e.g. capsolver, 2captcha), tried in this order; case-insensitive. An unknown id is BAD_PARAMS with a suggestion. These replace the API key's policy and pinned providers for this task, and the task is not explored.

fallbackboolean · default false

false (default): only the named providers may take the task; if none can, NO_PROVIDER_AVAILABLE says why for each, and nothing is charged. true: the named providers first, then the router's own choice of the others.

Answers

  • 200

    The task finished (status ready or failed).

    Fields of the answer
    idstringrequired
    typestringrequired

    The captcha kind, as in the request.

    statusstringrequired

    queued, running, ready (solved) or failed. Tolerate new values.

    sitestring

    The registrable domain the task was routed for.

    policystring

    The routing policy used (balanced, cheapest, fastest, pinned).

    reservedstringrequired

    An amount in US dollars, as a decimal string.

    solutionobject

    Present when status is ready.

    Fields of solution
    tokenstringrequired

    Submit this as the captcha response.

    userAgentstring

    Reuse this user agent with the token, when present.

    cookiesobject
    errorobject
    Fields of error
    codestringrequired

    A stable error code (see the error code list); tolerate new values.

    messagestringrequired
    providerstring

    Who solved it.

    coststring

    An amount in US dollars, as a decimal string.

    attemptsobject[]

    Every attempt, in order.

    Fields of attempts
    nintegerrequired
    providerstringrequired
    codestring

    The error code, absent for the solving attempt.

    durationMsintegerrequired
    createdAtstring · date-timerequired
    finishedAtstring · date-time
  • 202

    Still running; poll the Location.

    Header Location: the task's URL.

    Fields of the answer
    idstringrequired
    typestringrequired

    The captcha kind, as in the request.

    statusstringrequired

    queued, running, ready (solved) or failed. Tolerate new values.

    sitestring

    The registrable domain the task was routed for.

    policystring

    The routing policy used (balanced, cheapest, fastest, pinned).

    reservedstringrequired

    An amount in US dollars, as a decimal string.

    solutionobject

    Present when status is ready.

    Fields of solution
    tokenstringrequired

    Submit this as the captcha response.

    userAgentstring

    Reuse this user agent with the token, when present.

    cookiesobject
    errorobject
    Fields of error
    codestringrequired

    A stable error code (see the error code list); tolerate new values.

    messagestringrequired
    providerstring

    Who solved it.

    coststring

    An amount in US dollars, as a decimal string.

    attemptsobject[]

    Every attempt, in order.

    Fields of attempts
    nintegerrequired
    providerstringrequired
    codestring

    The error code, absent for the solving attempt.

    durationMsintegerrequired
    createdAtstring · date-timerequired
    finishedAtstring · date-time
  • 400

    The request is invalid (BAD_PARAMS, BAD_URL, UNSUPPORTED_TYPE, BAD_SITEKEY, BAD_PROXY, ...); 413 when the body is over 64 KiB.

  • 401

    The API key is missing, invalid or revoked (UNAUTHORIZED).

    Header WWW-Authenticate.

  • 402

    The balance is too low (INSUFFICIENT_BALANCE) or a spending cap was reached (SPEND_CAP_REACHED).

  • 403

    The key may not use this product (FORBIDDEN).

  • 413

    The request is invalid (BAD_PARAMS, BAD_URL, UNSUPPORTED_TYPE, BAD_SITEKEY, BAD_PROXY, ...); 413 when the body is over 64 KiB.

  • 429

    Too many new tasks per second (RATE_LIMITED) or unfinished tasks (TOO_MANY_IN_FLIGHT).

    Header Retry-After: seconds to wait before retrying.

  • 500

    Something went wrong on our side (INTERNAL and other ops codes).

  • 503

    No provider can take this task right now (NO_PROVIDER_AVAILABLE, ...). When the refusal comes from the caller's own choices (the providers routing names, the API key's settings, the account's provider rule), the message says why for each.

Generated from openapi.yaml 0.21.0