Screenshot
curl --request GET \
--url https://api.example.com/v1/phones/{phone_id}/screenshotimport requests
url = "https://api.example.com/v1/phones/{phone_id}/screenshot"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phones/{phone_id}/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.example.com/v1/phones/{phone_id}/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/phones/{phone_id}/screenshot"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/phones/{phone_id}/screenshot")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyInspection
Screenshot
Capture a screenshot from the phone
GET
/
v1
/
phones
/
{phone_id}
/
screenshot
Screenshot
curl --request GET \
--url https://api.example.com/v1/phones/{phone_id}/screenshotimport requests
url = "https://api.example.com/v1/phones/{phone_id}/screenshot"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/phones/{phone_id}/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.example.com/v1/phones/{phone_id}/screenshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/phones/{phone_id}/screenshot"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/phones/{phone_id}/screenshot")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/screenshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyCapture a screenshot from the phone’s current screen.
This is an inspection endpoint: the Mac app reads the current phone screen and returns image data. It does not send input to the phone or change phone state.
Retrieve the screenshot via
HTTP Status:
Request
curl https://api.tapkit.ai/v1/phones/{phone_id}/screenshot \
-H "X-API-Key: joot_your_api_key" \
--output screenshot.png
Path Parameters
| Parameter | Type | Description |
|---|---|---|
phone_id | string | The phone identifier |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
async | boolean | false | Return immediately with job ID |
Synchronous Response
Returns PNG image data directly withContent-Type: image/png.
Asynchronous Response
When?async=true:
{
"job_id": "job_abc123"
}
GET /jobs/{job_id}/download.
Examples
Sync Screenshot (curl)
curl https://api.tapkit.ai/v1/phones/abc123/screenshot \
-H "X-API-Key: joot_..." \
--output screen.png
Sync Screenshot (Python)
import requests
response = requests.get(
f"https://api.tapkit.ai/v1/phones/{phone_id}/screenshot",
headers={"X-API-Key": "joot_..."}
)
with open("screenshot.png", "wb") as f:
f.write(response.content)
Async Screenshot
# Request screenshot asynchronously
response = requests.get(
f"https://api.tapkit.ai/v1/phones/{phone_id}/screenshot?async=true",
headers={"X-API-Key": "joot_..."}
)
job_id = response.json()["job_id"]
# Poll for completion
while True:
job = requests.get(
f"https://api.tapkit.ai/v1/jobs/{job_id}",
headers={"X-API-Key": "joot_..."}
).json()
if job["status"] == "completed":
break
time.sleep(0.1)
# Download the image
image = requests.get(
f"https://api.tapkit.ai/v1/jobs/{job_id}/download",
headers={"X-API-Key": "joot_..."}
)
with open("screenshot.png", "wb") as f:
f.write(image.content)
Errors
Mac App Not Running
{
"error": "MAC_APP_NOT_RUNNING",
"message": "Mac companion app is not connected"
}
Timeout
{
"error": "TIMEOUT",
"message": "Screenshot capture timed out"
}
408 Request Timeout⌘I