You do not want to run a computer use agent and get hit with surprise bills. Coasty charges per predictable action and per agent step. This post lists every endpoint, every field you need, and every price so you can budget confidently. You will see how stateful sessions, vision, and ground maps work, and how a task run bills per step. After reading this, you can start a run and know exactly what you will pay.
How it works
Coasty provides vision and action primitives. You send a base64 screenshot plus instructions to /v1/predict to get actions. You can use /v1/ground to map a description to screen coordinates, and /v1/parse to turn pyautogui code into structured actions. For stateful behavior, you create a session with POST /v1/sessions, then call POST /v1/sessions/{id}/predict in a loop. When you want the server to drive an agent to completion, POST /v1/runs starts a task run that bills $0.05 per agent step. The run state, events, and cancellation APIs let you monitor and control the process.
#!/usr/bin/env bash
set -e
COASTY_API_KEY=$(cat "$HOME/.coasty_key")
# Example: Create a session and get its ID
SESSION_RESPONSE=$(curl -s -X POST https://coasty.ai/v1/sessions \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cua_version": "v3"
}')
SESSION_ID=$(echo "$SESSION_RESPONSE" | jq -r '.id')
echo "Session ID: $SESSION_ID"
# Example: Use the session to predict actions from a screenshot
# (base64_image here is a placeholder; in practice read a real screenshot)
PREDICT_RESPONSE=$(curl -s -X POST "https://coasty.ai/v1/sessions/$SESSION_ID/predict" \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instruction": "Find the search bar and type a query",
"screenshot": "BASE64_PLACEHOLDER"
}')
echo "Predict response: $PREDICT_RESPONSE"Vision endpoint details
- POST /v1/predict costs $0.05 per call. It takes a base64 screenshot, an instruction, and cua_version. It returns actions plus a status. You loop: capture, predict, act until the status is done.
- POST /v1/ground costs $0.03 per call. You send a screenshot plus an element description. It returns x,y coordinates to use with your own automation stack.
- POST /v1/parse is free. It accepts pyautogui-style code and returns structured actions.
Session-based computer use
- POST /v1/sessions costs $0.10 to create a session. You provide cua_version (default v3). It returns a session id.
- POST /v1/sessions/{id}/predict costs $0.04 per call. You send instruction and optionally a screenshot. It returns actions plus a status. You call this repeatedly in a loop to build a trajectory.
- Sessions give you stateful memory so the agent remembers prior actions and context across calls.
One credit equals $0.01. You manage your prepaid USD wallet. Webhooks carry HMAC signatures for security.
Where this beats brittle automation
Most automation relies on brittle selectors or API mocks that break when UI changes. The Coasty computer use API watches the actual screen. The vision endpoint reads what is visible, and the ground endpoint maps descriptions to coordinates. This lets you drive desktops, browsers, and terminals using natural language instructions instead of fragile CSS IDs. Task runs offload the loop to the server, billing per step so you only pay for completed work.
Now you know the price and shape of every Coasty endpoint. Start a session, make a predict call, or launch a task run, and you can trust your bill. Get your key at https://coasty.ai/developers. The full API reference is at https://coasty.ai/docs. Build reliable agents that see and act like humans.
Want to see this in action?
View Case Studies