Turn PyAutoGUI Code into Structured Actions with the Free Parse Endpoint
You have a working PyAutoGUI script that clicks, types, and moves the mouse. You want to feed that script into a computer use agent instead of hardcoding brittle selectors. The /v1/parse endpoint can do that for you. It takes raw PyAutoGUI code, validates it, and returns a structured list of actions compatible with your agent. It is free, which makes it easy to prototype and iterate.
How it works
The Coasty Computer Use API provides a parse endpoint at /v1/parse. You send a POST request with your PyAutoGUI snippet in the body. The service parses the code using the available PyAutoGUI functions and returns a JSON object containing a list of actions. Each action has fields like type (click, type, move, etc), x, y, and key. This structured output can then be sent as input to /v1/predict or used to seed a session. There is no per-request charge for this operation.
curl -X POST https://coasty.ai/v1/parse \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pyautogui_code": "pyautogui.moveTo(500, 300)",
"cua_version": "v3"
}'What you get from the response
- ●A JSON object with a top-level actions array.
- ●Each action has a type field such as 'move', 'click', or 'type'.
- ●Coordinates like x and y are included for move and click actions.
- ●A text field holds the typed characters for type actions.
- ●The endpoint returns validation errors for unsupported PyAutoGUI syntax.
POST /v1/parse is free and returns structured actions ready for your computer use agent.
Where this beats brittle automation
Traditional automation depends on stable DOM selectors, class names, or API endpoints. These change when UI updates, which breaks scripts. A computer use agent that can see the screen and act like a human does not need to know exact selectors. It can locate buttons by visual cues and click. By turning existing PyAutoGUI scripts into structured actions, you reuse proven click and type logic without rewriting selectors. The parse endpoint bridges the gap between legacy scripts and vision-based automation.
Start by wrapping your existing PyAutoGUI code in the /v1/parse endpoint. Feed the resulting actions into your agent through /v1/predict and watch it execute on real desktops, browsers, and terminals. Get your API key at https://coasty.ai/developers and build a computer use agent that works like a human.