ShapeF5Token
Generate the Shape (F5) request headers through your own proxy for a protected API call such as login, search or checkout.
ShapeF5Token produces the Shape (F5) request headers for one call to a protected API, through your proxy, and returns them as a header map in solution.headers. Shape protects individual API calls rather than whole pages: the Shape script on the page computes a set of request headers, and the API rejects a call that does not carry them.
Use your proxy
task.proxy is required on this task type, and the provider solves from that address. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Send the protected request from the same address, with the same User-Agent.
Find the parameters
Open the page that makes the protected call with DevTools and the Network tab:
targetUrlis the URL of the page that sends the call, andtitleis that page'sdocument.title.targetApiis the full URL of the protected request, andmethodis its HTTP method (GETorPOST).shapeJsUrlis the Shape script. Find the script request that hasseed=in its URL; the script request before it is the Shape script.refereris theRefererthe page sends with the call. Leave it out whentargetUrlis the homepage.
Use the headers
Add every header in solution.headers to your request to targetApi. The headers are generated for the targetApi, method and page you sent. Create a new task when the call changes, and send the request soon after the task completes.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
RiskBypass | $2.00 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes. View settings reference |
Task Object Properties
The task field accepts an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
targetUrl* | URL | Yes | URL of the page that sends the request to the protected API. Example: |
targetApi* | URL | Yes | URL of the protected API request (for example a login, search or order endpoint) that needs Shape headers. Example: |
shapeJsUrl* | URL | Yes | URL of the Shape (F5) script the page loads. In the Network tab, find the script request that has Example: |
title* | string | Yes | Title of the page at Example: |
method* | Yes | HTTP method of the request to Example: | |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
referer | URL | No | Referer the page sends with the request to Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ShapeF5Token",
"targetUrl": "https://example.com/login/",
"targetApi": "https://example.com/api/login",
"shapeJsUrl": "https://example.com/shape-script.js",
"title": "Log in",
"method": "POST",
"proxy": "http://user:pass@1.2.3.4:8080"
}
}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
headers* | Record<string, unknown> | Yes | Headers the provider returns for the request to Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |