Back to Blog
Tutorial

Alex Thompson6 min
Del

If you already have a PyAutoGUI script, rewriting it for a new agent is tedious. You have to locate every element by coordinates and hardcode pixel positions. This breaks whenever a UI layout changes. The /v1/parse endpoint gives you a free way to translate those existing clicks, keypresses, and waits into structured actions that your computer use agent can execute reliably.

How it works

The /v1/parse endpoint takes a string containing pyautogui-style code and returns a list of structured actions. You send raw Python code to the endpoint, not a screenshot. The service parses the code and produces an action list you can embed in your workflow or call directly from your agent. This lets you bootstrap a computer use agent from legacy scripts without manual rework.

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

Parse endpoint details

  • Endpoint: POST https://coasty.ai/v1/parse
  • Authentication: X-API-Key header (read COASTY_API_KEY from the environment)
  • Request body includes a code field with pyautogui-style Python
  • Response contains a parsed action list (action objects) for each line
  • The endpoint is free; no credits are deducted

Use /v1/parse to translate existing PyAutoGUI scripts into structured actions for your computer use agent.

Where this beats brittle automation

Traditional automation relies on brittle selectors, XPath, or hardcoded coordinates. A layout change breaks everything. A computer use agent that interprets structured actions can still fail if the actions are coordinate-based, but converting those to semantic actions lets you combine them with visual grounding and stateful sessions. With the parse endpoint you start from a solid base of real-world behavior, then enhance it with the computer use API's vision and session capabilities.

Stop rewriting PyAutoGUI scripts and start using the free /v1/parse endpoint to feed an existing workflow into a robust computer use agent. Get your API key at https://coasty.ai/developers and begin building automation that adapts to real UI changes.

© 2026 Coasty

Backed byYCombinator