Create a context
/browserbase/v1/contexts● SupportedRequest parameters
projectIdstringoptionalThe Project ID. Can be found in Settings. Optional - if not provided, the project will be inferred from the API key.
namestringoptionalOptional user-defined name for the Context. Leading and trailing whitespace is trimmed before storage. Names are unique within the project among active Contexts, compared case-insensitively.
Returns
201
Only the capabilities in the service guide are available; some upstream options are unavailable.
Errors contain statusCode, error and message; the native API adds code. The request ID is in X-Request-Id. Errors
Request example
curl
curl -X POST "https://api.deepraxis.com/browserbase/v1/contexts" \
-H "X-BB-API-Key: $PRAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Python
import os, requests
response = requests.request("POST", f"https://api.deepraxis.com/browserbase/v1/contexts",
headers={"X-BB-API-Key": os.environ["PRAXIS_API_KEY"]},
json={}
)
print(response.status_code, response.text)TypeScript
const response = await fetch(`https://api.deepraxis.com/browserbase/v1/contexts`, {
method: "POST",
headers: { "X-BB-API-Key": `${process.env.PRAXIS_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({}),
});
console.log(response.status, await response.text());Stealth options, extensions and Selenium are unavailable; proxies accept only the external type and need the capability opened for your organization. region and solveCaptchas are accepted but ignored; region selection and CAPTCHA solving are not provided.
Response
HTTP 201
The request has succeeded and a new resource has been created as a result.
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| publicKey | string | The public key to encrypt the user-data-directory. |
| cipherAlgorithm | string | The cipher algorithm used to encrypt the user-data-directory. AES-256-CBC is currently the only supported algorithm. |
| initializationVectorSize | integer | The initialization vector size used to encrypt the user-data-directory. Read more about how to use it. |