Coasty/

Developer API

Primitives

Resolve a description to exact coordinates

Grounding

Grounding, at a glance

Resolve a description to exact coordinates

POST /v1/ground
Grounding answers one narrow visual question: where the described element is located in the supplied screenshot.

Grounding answers a narrower question than predict: “where is this element?” Give it a screenshot and a description and it returns the exact x, y coordinate to target. It is faster and cheaper than a full prediction ($0.03 instead of the $0.05 Predict base price), which makes it ideal when you already know what to do and only need a pixel to click.

import os, requests

res = requests.post(
    "https://coasty.ai/v1/ground",
    headers={"X-API-Key": os.environ["COASTY_API_KEY"]},
    json={
        "screenshot": screenshot,   # base64 PNG (see Predict)
        "element": "the blue Submit button below the form",
    },
    timeout=60,
).json()

print(res["x"], res["y"])           # exact click coordinates

The response is { x, y, usage, request_id }. Coordinates are in the same pixel space as the screenshot you sent.

API reference — Coasty Computer Use API | Coasty - AI Computer-Use Agent