Render Page
POST /v1/browser/render
Render a webpage using the browser API
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"api_key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Api Key"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Url"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Html"
},
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Width",
"default": 1920
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height",
"default": 1080
},
"wait_for_selector": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Wait For Selector"
},
"wait_timeout": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Wait Timeout",
"default": 30000
},
"full_page": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Full Page",
"default": true
},
"clip": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Clip"
},
"format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Format",
"default": "png"
},
"quality": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Quality"
},
"actions": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Actions"
},
"return_html": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Return Html",
"default": false
},
"return_screenshot": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Return Screenshot",
"default": true
}
},
"type": "object",
"title": "BrowserRenderRequest",
"description": "Request schema for browser rendering operations"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
api_key | string | null | No | nullable | |
session_id | string | null | No | nullable | |
url | string | null | No | nullable | |
html | string | null | No | nullable | |
width | integer | null | No | nullable | |
height | integer | null | No | nullable | |
wait_for_selector | string | null | No | nullable | |
wait_timeout | integer | null | No | nullable | |
full_page | boolean | null | No | nullable | |
clip | object | null | No | nullable | |
format | string | null | No | nullable | |
quality | integer | null | No | nullable | |
actions | array<object> | null | No | nullable | |
actions[] | object | No | ||
return_html | boolean | null | No | nullable | |
return_screenshot | boolean | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"screenshot": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Screenshot"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Html"
},
"dom_elements": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Dom Elements"
},
"execution_time": {
"type": "number",
"title": "Execution Time"
},
"status": {
"type": "string",
"title": "Status"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Message"
},
"usage_info": {
"properties": {
"total_requests": {
"type": "integer",
"title": "Total Requests"
},
"remaining_quota": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Remaining Quota"
},
"quota_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Quota Limit"
},
"current_month_usage": {
"type": "integer",
"title": "Current Month Usage"
},
"credits_consumed": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Credits Consumed"
},
"browser_credits_remaining": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Browser Credits Remaining"
}
},
"type": "object",
"required": [
"total_requests",
"remaining_quota",
"quota_limit",
"current_month_usage"
],
"title": "BrowserUsageResponse",
"description": "Response schema showing user's browser API usage"
}
},
"type": "object",
"required": [
"execution_time",
"status",
"usage_info"
],
"title": "BrowserRenderResponse",
"description": "Response schema for browser render operations"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
screenshot | string | null | No | nullable | |
html | string | null | No | nullable | |
dom_elements | array<object> | null | No | nullable | |
dom_elements[] | object | No | ||
execution_time | number | Yes | ||
status | string | Yes | ||
message | string | null | No | nullable | |
usage_info | object | Yes | Response schema showing user's browser API usage | |
usage_info.total_requests | integer | Yes | ||
usage_info.remaining_quota | integer | null | Yes | nullable | |
usage_info.quota_limit | integer | null | Yes | nullable | |
usage_info.current_month_usage | integer | Yes | ||
usage_info.credits_consumed | number | null | No | nullable | |
usage_info.browser_credits_remaining | number | null | No | nullable |
400
The browser service rejected the request as invalid.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used.
No response body.
404
The browser service reported the target as not found.
No response body.
409
The browser service refused the request because of a conflicting state.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
429
Not enough browser automation credits; or the browser service is rate limiting you. Retry later.
No response body.
502
The browser service failed or returned an unexpected error.
No response body.
503
The browser service is temporarily unavailable. Retry after the Retry-After header.
No response body.