Get Started
Authentication
Authenticate requests with a Bearer API key.
All String Web Access API endpoints are authenticated with an API key, passed as a Bearer token in the Authorization
header.
Authorization: Bearer YOUR_API_KEYA complete request:
curl https://request.usestring.ai/v1/fetch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com" }'The same Bearer token authenticates the WebSocket browser endpoint — pass it as an Authorization header when
connecting:
const browser = await puppeteer.connect({
browserWSEndpoint: "wss://request.usestring.ai/v1/wss",
headers: { Authorization: "Bearer YOUR_API_KEY" }
});Errors
| Status | Meaning |
|---|---|
401 Unauthorized | Missing or invalid Authorization header. |
402 Payment Required | The key is valid but the account balance can't cover the request. |
See Errors for the full list.