> For the complete documentation index, see [llms.txt](https://docs.takionapi.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.takionapi.tech/pxhc/api.md).

# Bypass Solution

## **How the Solution Works**

PXHC is **asynchronous**: you queue a solve and then poll for the result.

1. **Reach the block page.** Request the target until PerimeterX serves the `/blocked` press-and-hold page, then read the `_pxAppId`, `uuid`, and `vid` from its markup. (You can fetch it through the optional `/extra/tls` helper.)
2. **Queue the solve.** POST to `/{app_id}/solve` with the app id, page URL, and proxy. You get a `task_id` back.
3. **Poll the result.** POST the `task_id` to `/{app_id}/pull` until `status` is `solved`; the response then carries `cookies._px3`.
4. **Attach and send.** Put `_px3` (and any additional cookie) on your own request and continue.

{% hint style="info" %}
The solver is asynchronous cause the solving time is based on the required "press" time returned by px server during the challenge loading
{% endhint %}

### Endpoint <a href="#endpoint" id="endpoint"></a>

The endpoint lives on the px-web subdomain:

```
https://pxhc.takionapi.tech/generate
```

## Queue a PXHC solve

> Submits a press-and-hold captcha for the given PX \`app\_id\` and returns a \`task\_id\`. Poll /{app\_id}/pull with it until the task is solved.<br>

```json
{"openapi":"3.0.3","info":{"title":"Takion API — PerimeterX Hold Captcha (PXHC)","version":"1.0.0"},"servers":[{"url":"https://pxhc.takionapi.tech"}],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"api_key"}},"parameters":{"AppId":{"name":"app_id","in":"path","required":true,"description":"The PerimeterX app id (`_pxAppId`) of the target.","schema":{"type":"string"}}},"schemas":{"SolveRequest":{"type":"object","required":["pxappid","page_url","proxy"],"properties":{"pxappid":{"type":"string","description":"The PX app id (same as the path `app_id`)."},"page_url":{"type":"string","format":"uri","description":"The /blocked page URL that served the captcha."},"proxy":{"type":"string","description":"Proxy in `ip:port` or `ip:port:user:pass` format."},"pxuuid":{"type":"string","description":"The PX uuid from the block page (optional; derived if omitted)."},"pxvid":{"type":"string","description":"The PX vid from the block page (optional)."}},"additionalProperties":true},"SolveResponse":{"type":"object","properties":{"task_id":{"type":"string","description":"Poll /{app_id}/pull with this id."}},"additionalProperties":true},"Error":{"type":"object","required":["error"],"description":"Every error is a JSON object with a single `error` string. PXHC uses proper HTTP status codes: 400 (invalid input), 401 (auth/quota), 403 (whitelist/trial gate, sometimes 404), 404 (unknown task), 500 (internal).\n","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Authentication or quota failure — HTTP 401 with an `error` message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/{app_id}/solve":{"post":{"operationId":"solvePxhc","summary":"Queue a PXHC solve","description":"Submits a press-and-hold captcha for the given PX `app_id` and returns a `task_id`. Poll /{app_id}/pull with it until the task is solved.\n","parameters":[{"$ref":"#/components/parameters/AppId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolveRequest"}}}},"responses":{"200":{"description":"Task queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolveResponse"}}}},"400":{"description":"Invalid input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Access gated for this key/service — the key is not whitelisted for PXHC, or a trial is not available (this can also surface as 404).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Poll a PXHC task

> Returns the state of a queued task. Keep polling while \`status\` is \`pending\`; when \`status\` is \`solved\` the response carries \`cookies.\_px3\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Takion API — PerimeterX Hold Captcha (PXHC)","version":"1.0.0"},"servers":[{"url":"https://pxhc.takionapi.tech"}],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"api_key"}},"parameters":{"AppId":{"name":"app_id","in":"path","required":true,"description":"The PerimeterX app id (`_pxAppId`) of the target.","schema":{"type":"string"}}},"schemas":{"PullResponse":{"type":"object","properties":{"status":{"type":"string","description":"Task state.","enum":["pending","solved","error"]},"solve_status":{"type":"string","description":"Detail on the solve outcome (present when finished)."},"cookies":{"type":"object","description":"Present when solved — carries `_px3`.","properties":{"_px3":{"type":"string"}},"additionalProperties":{"type":"string"}}},"additionalProperties":true},"Error":{"type":"object","required":["error"],"description":"Every error is a JSON object with a single `error` string. PXHC uses proper HTTP status codes: 400 (invalid input), 401 (auth/quota), 403 (whitelist/trial gate, sometimes 404), 404 (unknown task), 500 (internal).\n","properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Authentication or quota failure — HTTP 401 with an `error` message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/{app_id}/pull":{"post":{"operationId":"pullPxhc","summary":"Poll a PXHC task","description":"Returns the state of a queued task. Keep polling while `status` is `pending`; when `status` is `solved` the response carries `cookies._px3`.\n","parameters":[{"$ref":"#/components/parameters/AppId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["task_id"],"properties":{"task_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Current task state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullResponse"}}}},"400":{"description":"Invalid input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Unknown or expired task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
