Back to Blog
Tutorial

James Liu6 min
+Z

Most automation scripts rely on brittle selectors like XPath or CSS classes. When a UI changes, your script breaks. The /v1/ground endpoint solves this by taking a screenshot and an element description, then returning the exact x,y coordinates for clicks and hovers. You get reliable computer use agents that work on live, changing interfaces.

How /v1/ground Works

You send a screenshot (base64), a natural language description of the UI element, and your computer use API key. The server locates the element, computes its bounding box, and returns the center coordinates. This is a pure computer use API function that lets you act on any GUI you can see.

bash
curl https://coasty.ai/v1/ground \  \
  -H "X-API-Key: $COASTY_API_KEY" \  \
  -H "Content-Type: application/json" \  \
  -d '{
    "screenshot": "$(base64 -w 0 screenshot.png)",
    "description": "The checkbox that says ""Accept terms""",
    "cua_version": "v3"
  }'

Request and Response Fields

  • screenshot (string, base64): The full desktop screenshot or viewport frame.
  • description (string): A natural language description of the target element.
  • cua_version (string, optional): Defaults to v3. Use v4 for autonomous agents with a pass/fail verifier.
  • Response contains x and y coordinates of the element center.
  • Billing: $0.03 per /v1/ground call.

Ground once, then use the returned x,y coordinates with your automation tool.

Where /v1/ground Beats Brittle Selectors

Traditional selectors break when classes change, when accessibility names shift, or when multiple elements match the same selector. /v1/ground works on visual evidence. You describe what you see, the model finds it on the screenshot, and you get a stable coordinate pair. This gives you a human-like computer use agent that adapts to UI changes automatically.

Start grounding UI elements today. Use /v1/ground to turn natural language descriptions into reliable clicks and hovers. Get your API key at https://coasty.ai/developers and build computer use agents that can see and interact with any desktop, browser, or terminal.

© 2026 Coasty

Backed byYCombinator