> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gbox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml get /boxes/{boxId}/display
openapi: 3.0.0
info:
  title: GBOX Open API
  description: GBOX Open API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://gbox.ai/api/v1
    description: Production Server
security: []
tags: []
paths:
  /boxes/{boxId}/display:
    get:
      tags:
        - Box
      summary: Get box display
      description: >-
        Retrieve the current display properties for a running box. This endpoint
        provides details about the box's screen resolution, orientation, and
        other visual properties.
      operationId: BoxMiscController_getDisplayState
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
      responses:
        '200':
          description: Box display properties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BoxDisplay'
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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();
        - lang: Python
          source: |-
            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()
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\")) // This is the default and can be omitted\n\n\t// Create Android box\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateRequest{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\t// Get box display state (resolution and orientation)\n\tdisplay, err := box.Display(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get display state: %v\", err)\n\t}\n\n\tfmt.Printf(\"Resolution: %+v\\n\", display.Resolution)\n\tfmt.Printf(\"Orientation: %s\\n\", display.Orientation)\n}"
components:
  schemas:
    BoxDisplay:
      type: object
      properties:
        resolution:
          description: Resolution of the box
          title: BoxDisplay
          example:
            width: 1920
            height: 1080
          allOf:
            - $ref: '#/components/schemas/Resolution'
        orientation:
          type: string
          description: Orientation of the box
          title: BoxDisplayState
          example: portrait
          enum:
            - portrait
            - landscapeLeft
            - portraitUpsideDown
            - landscapeRight
      title: Box Display
      description: Box display
      required:
        - resolution
        - orientation
    Resolution:
      type: object
      properties:
        width:
          type: number
          description: Width of the screen
          title: Resolution
          example: 1920
        height:
          type: number
          description: Height of the screen
          title: Resolution
          example: 1080
      title: Resolution
      description: Resolution configuration
      required:
        - width
        - height
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````