You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/overview/captchas-api/overview.mdx
+96-2Lines changed: 96 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,56 @@ CAPTCHA solving is particularly useful for:
19
19
* AI agents that need to navigate CAPTCHA-protected websites
20
20
21
21
22
+
### Session Configuration
23
+
24
+
To enable autosolving, simply set `solveCaptcha: true` when creating a session.
25
+
26
+
<CodeTabsstorage="languageSwitcher">
27
+
28
+
```typescript !! Typescript -wcn
29
+
importSteelfrom'steel-sdk';
30
+
31
+
const client =newSteel();
32
+
33
+
const session =awaitclient.sessions.create({
34
+
solveCaptcha: true
35
+
});
36
+
```
37
+
38
+
```python !! Python -wcn
39
+
from steel import Steel
40
+
41
+
client = Steel()
42
+
session = client.sessions.create(
43
+
solve_captcha=True
44
+
)
45
+
```
46
+
</CodeTabs>
47
+
48
+
To detect CAPTCHAs without automatically solving them, disable `autoCaptchaSolving` in the stealth config:
49
+
50
+
<CodeTabsstorage="languageSwitcher">
51
+
52
+
```typescript !! Typescript -wcn
53
+
const session =awaitclient.sessions.create({
54
+
solveCaptcha: true,
55
+
stealthConfig: {
56
+
autoCaptchaSolving: false
57
+
}
58
+
});
59
+
```
60
+
61
+
```python !! Python -wcn
62
+
session = client.sessions.create(
63
+
solve_captcha=True,
64
+
stealth_config={
65
+
"autoCaptchaSolving": False
66
+
}
67
+
)
68
+
```
69
+
</CodeTabs>
70
+
71
+
22
72
### How CAPTCHA Solving Works with the CAPTCHAs API
23
73
24
74
Steel's CAPTCHAs API operates through a bridge architecture that connects your browser sessions with our external CAPTCHA-solving capabilities. It helps with four key parts:
@@ -76,11 +126,15 @@ The status endpoint returns an array of current pages and their CAPTCHA states.
76
126
"type":"image_to_text",
77
127
"status":"solving",
78
128
"created":1640995200000,
79
-
"totalDuration":5000
129
+
"url":"https://example.com/login",
130
+
"pageId":"page_12345",
131
+
"detectionTime":1640995200500,
132
+
"totalDuration":5000,
133
+
"solveTime":1640995205500
80
134
}
81
135
],
82
136
"created":1640995200000,
83
-
"lastUpdated":1640995205000
137
+
"lastUpdated":1640995205500
84
138
}
85
139
]
86
140
```
@@ -95,6 +149,8 @@ Tasks can have the following statuses:
95
149
96
150
*`validating`: CAPTCHA is currently being validated
97
151
152
+
*`validation_failed`: CAPTCHA token failed validation after submission
153
+
98
154
*`solving`: CAPTCHA is currently being solved
99
155
100
156
*`solved`: CAPTCHA has been successfully solved
@@ -104,6 +160,44 @@ Tasks can have the following statuses:
104
160
*`failed_to_solve`: CAPTCHA solving failed
105
161
106
162
163
+
### Manual Solving
164
+
165
+
If auto-solving is disabled, use the solve endpoint to trigger solving. You can solve all detected CAPTCHAs or target specific ones.
166
+
167
+
The `taskId`, `url`, and `pageId` required for targeting specific CAPTCHAs can be retrieved from the CAPTCHA status response.
0 commit comments