Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/web/screenshot?url=example' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/web/screenshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/web/screenshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/web/screenshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/web/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/web/screenshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/web/screenshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/web/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyWeb pages
Capture website screenshot
<!-- aisa-pricing:start -->
Usage-based billing; Default request estimate: $0.028 USD (not a fixed price). Declared unit rate: $0.014 USD per provider_credit. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
GET
https://api.aisa.one
/
apis
/
v1
/
web
/
screenshot
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/web/screenshot?url=example' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/web/screenshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/web/screenshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/web/screenshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/web/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/web/screenshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/web/screenshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/web/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyRequest contract
- Method and path: GET /apis/v1/web/screenshot
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/web/screenshot - blockAds: query; optional
- blockCookieBanners: query; optional
- cacheMode: query; optional
- cacheTtl: query; optional
- darkMode: query; optional
- delay: query; optional
- deviceScaleFactor: query; optional
- format: query; optional
- fullPage: query; optional
- quality: query; optional
- region: query; optional
- response: query; optional
- selector: query; optional
- url: query; required
- viewportHeight: query; optional
- viewportWidth: query; optional
- waitFor: query; optional
- waitUntil: query; optional
- Runtime facts: 0adc1f1fab30bad77593cf5c055314531953c73216fdd52c2513e22a2e342b14
{
"operationId": "web.screenshot",
"method": "GET",
"path": "/apis/v1/web/screenshot",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"in": "query",
"name": "blockAds",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "blockCookieBanners",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "cacheMode",
"required": false,
"schema": {
"enum": [
"bypass",
"enabled",
"write_only"
],
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "cacheTtl",
"required": false,
"schema": {
"maximum": 604800,
"minimum": 60,
"type": "integer"
}
},
{
"in": "query",
"name": "darkMode",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "delay",
"required": false,
"schema": {
"maximum": 10000,
"minimum": 0,
"type": "integer"
}
},
{
"in": "query",
"name": "deviceScaleFactor",
"required": false,
"schema": {
"maximum": 3,
"minimum": 1,
"type": "integer"
}
},
{
"in": "query",
"name": "format",
"required": false,
"schema": {
"enum": [
"jpeg",
"png",
"webp"
],
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "fullPage",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "quality",
"required": false,
"schema": {
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"in": "query",
"name": "region",
"required": false,
"schema": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "response",
"required": false,
"schema": {
"enum": [
"base64",
"url"
],
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "selector",
"required": false,
"schema": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"examples": {
"default": {
"value": "example"
},
"minimal": {
"value": "example"
}
},
"in": "query",
"name": "url",
"required": true,
"schema": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "viewportHeight",
"required": false,
"schema": {
"maximum": 9223372036854775807,
"minimum": 0,
"type": "integer"
}
},
{
"in": "query",
"name": "viewportWidth",
"required": false,
"schema": {
"maximum": 9223372036854775807,
"minimum": 0,
"type": "integer"
}
},
{
"in": "query",
"name": "waitFor",
"required": false,
"schema": {
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
},
{
"in": "query",
"name": "waitUntil",
"required": false,
"schema": {
"enum": [
"domcontentloaded",
"load",
"networkidle"
],
"maxLength": 4096,
"minLength": 1,
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_units",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.028,
"estimate_source": "profile_seed",
"evidence_source": "response_body",
"maximum_units": 2,
"unit": "provider_credit",
"unit_rate_usd": 0.014
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.028 USD (not a fixed price). Declared unit rate: $0.014 USD per provider_credit. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.028
- Declared unit rate (USD): 0.014
- Billing unit: provider_credit
- Cost contract: response_units
- Published reference multiplier: 1.0
- Declared maximum count/units: 2
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
bypass, enabled, write_only Required string length:
1 - 4096Required range:
60 <= x <= 604800Required range:
0 <= x <= 10000Required range:
1 <= x <= 3Available options:
jpeg, png, webp Required string length:
1 - 4096Required range:
1 <= x <= 100Required string length:
1 - 4096Available options:
base64, url Required string length:
1 - 4096Required string length:
1 - 4096Required string length:
1 - 4096Required range:
0 <= x <= 9223372036854776000Required range:
0 <= x <= 9223372036854776000Required string length:
1 - 4096Available options:
domcontentloaded, load, networkidle Required string length:
1 - 4096Response
Successful response