String Web Access API
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_KEY

A 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

StatusMeaning
401 UnauthorizedMissing or invalid Authorization header.
402 Payment RequiredThe key is valid but the account balance can't cover the request.

See Errors for the full list.

On this page