Many teams still rely on pyautogui for UI automation. It works but produces brittle, hard-to-maintain code that breaks when layouts shift. Coasty exposes a computer use API that can see the screen and act like a human. But you do not have to start from scratch. The free /v1/parse endpoint accepts a pyautogui script and returns structured actions you can feed directly into a computer use agent or reuse in your own workflow engine.
How the /v1/parse endpoint works
Send a POST request to https://coasty.ai/v1/parse with a JSON body containing the pyautogui code. The endpoint reads the method calls and returns a list of structured actions, including click, type, and key presses with coordinates and timing data. You do not pay per call to this endpoint. It is free and does not consume credits.
curl https://coasty.ai/v1/parse \
-H "Authorization: Bearer $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pyautogui_code": "pyautogui.click(100, 200)"
}'Structured actions from the response
- Each action is an object with a type field (e.g., click, type, key).
- Coordinates are provided as x and y integers.
- Text and modifiers are included for type and key actions.
- The response is a plain JSON array, easy to serialize in any language.
Call /v1/parse once per script to get a reusable, stateless list of structured actions.
Where this beats brittle automation
Pure selectors and API-only tools require you to know element IDs, classes, or endpoints ahead of time. If the UI changes even slightly, those selectors break. A computer use agent that can see the screen can adapt to layout shifts and visual changes. By first parsing pyautogui code you can incrementally evolve scripts: keep working logic, replace brittle waits with smart waits, and keep the final actions in a structured format that can be consumed by a computer use agent or a workflow DSL.
Start modernizing your legacy pyautogui scripts with the free /v1/parse endpoint. Use the structured actions to power a computer use agent or build your own workflow engine. Get your API key at https://coasty.ai/developers and begin.
Want to see this in action?
View Case Studies