POST
/
action
/
grab_web_screenshot
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/grab_web_screenshot \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://agent.ai",
  "ttl_for_screenshot": 86400
}'
{
  "status": 200,
  "response": "https://s3.us-east-2.amazonaws.com/asset-uploads.agent.ai/31d8f9c8-27ce-42bf-a38c-ce02784ab98c.png"
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/settings#credits)

Body

application/json
url
string
required

URL of the web page to capture.

ttl_for_screenshot
enum<integer>
default:
86400

Cache expiration time for the screenshot in seconds.

Available options:
3600,
86400,
604800,
18144000

Response

200
application/json
Screenshot of the web page
status
integer

HTTP status code of the action response

response
object

Response data from the action