Skip to main content

Install the SDK

pip install tzafon

Get Your API Key

Sign up at tzafon.ai and copy your API key from the dashboard. Set it as an environment variable:
export TZAFON_API_KEY=sk_your_api_key_here
Add this to your shell profile (.bashrc, .zshrc) to persist across sessions.

Write Your First Script

from tzafon import Computer

client = Computer()
with client.create(kind="browser") as computer:
    computer.navigate("https://wikipedia.org")
    computer.wait(2)

    result = computer.screenshot()
    url = computer.get_screenshot_url(result)
    print(f"Screenshot: {url}")

Run It

python your_script.py

What Just Happened?

  1. Initialized a Tzafon computer client with your API key
  2. Created a browser instance
  3. Navigated to Wikipedia
  4. Waited for the page to load
  5. Captured a screenshot
The screenshot URL is returned and you can view or download it.

Next Steps

Need Help?