Back to Blog
Tutorial

Alex Thompson6 min
Ctrl+P

You probably have a PyAutoGUI script that clicks buttons and types text. Those coordinates are brittle. A screen layout change breaks everything. The Coasty Computer Use API lets you describe what you want in natural language and let our agent execute it with vision. The /v1/parse endpoint turns existing PyAutoGUI code into structured, platform-agnostic actions. This frees you from maintaining hard-coded positions and lets your workflows stay resilient to layout changes.

How it works

The /v1/parse endpoint takes a string containing PyAutoGUI code and outputs a canonical list of structured actions. It does not perform the automation itself. It translates your existing click, move, and keypress patterns into a format that the Computer Use agent can understand and execute. You pass the code as a JSON body, and you receive a JSON object with a list of actions and a status. This endpoint is free, so you can iterate quickly without incurring per-step costs.

bash
curl -X POST https://coasty.ai/v1/parse \  -H "Content-Type: application/json" \  -H "X-API-Key: $COASTY_API_KEY" \  -d '{
    "code": "pyautogui.moveTo(100, 200)",
    "language": "pyautogui"
  }'

Request and response structure

  • The request body is a JSON object with a code field containing the PyAutoGUI script and a language field set to pyautogui.
  • The endpoint returns a JSON object with a actions array, where each action has type and parameters like coordinates, keys, or modifiers.
  • This endpoint does not charge per call and is free to use for development and prototyping.

POST /v1/parse is free and turns pyautogui code into structured actions.

Where this beats brittle automation

Traditional automation relies on fixed X,Y coordinates or brittle CSS selectors. A new window position, a different DPI, or a localized UI text change can break your script. By converting PyAutoGUI code into structured actions, you describe intent over position. The Computer Use agent then finds the right element on each screen using vision, adapts to layout changes, and executes. This makes your automation production-ready and resilient to small UI modifications.

You can now take legacy PyAutoGUI scripts and upgrade them to vision-based computer use without rewriting every click. Use the free /v1/parse endpoint as part of your pipeline, then hand off the structured actions to the Computer Use agent for reliable execution. Get your API key and start building resilient automation at https://coasty.ai/developers.

© 2026 Coasty

Backed byYCombinator