JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
// Get box display state (resolution and orientation)
const display = await box.display();
console.log("Resolution:", display.resolution);
console.log("Orientation:", display.orientation);
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create Android box
box = gbox_sdk.create(type="android")
# Get box display state (resolution and orientation)
display = box.display()
print(f"Resolution: {display.resolution}")
print(f"Orientation: {display.orientation}")
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/display \
--header 'Authorization: Bearer <token>'{
"resolution": {
"width": 1920,
"height": 1080
},
"orientation": "portrait"
}Box
Get box display
Retrieve the current display properties for a running box. This endpoint provides details about the box’s screen resolution, orientation, and other visual properties.
GET
/
boxes
/
{boxId}
/
display
JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
// Get box display state (resolution and orientation)
const display = await box.display();
console.log("Resolution:", display.resolution);
console.log("Orientation:", display.orientation);
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create Android box
box = gbox_sdk.create(type="android")
# Get box display state (resolution and orientation)
display = box.display()
print(f"Resolution: {display.resolution}")
print(f"Orientation: {display.orientation}")
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/display \
--header 'Authorization: Bearer <token>'{
"resolution": {
"width": 1920,
"height": 1080
},
"orientation": "portrait"
}Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Box ID
Example:
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Response
200 - application/json
Box display properties
Was this page helpful?