Metadata-Version: 2.4
Name: invilabs
Version: 0.1.0
Summary: Blocking Python SDK for Invi Labs phone automation
Author: Invi Labs
Project-URL: Homepage, https://invilabs.io
Project-URL: Documentation, https://sdk.invilabs.io
Project-URL: Changelog, https://sdk.invilabs.io/downloads/
Keywords: iphone,automation,sdk,ai-agent,ocr
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# Invi Labs Python SDK

Automate real iPhones through the Invi Labs API using your API key and phone ID.
Non-jailbroken iPhones require [Invi Dongle](https://invilabs.io/connect).

## Install

```sh
python -m pip install invilabs
```

Requires Python 3.10 or newer. No third-party runtime dependencies.

## Connect and run an action

Set `INVI_API_KEY` and `INVI_PHONE_ID` in your environment. Keep your API key private.

```python
import os
from invilabs import Client

client = Client(os.environ["INVI_API_KEY"])
phone = client.phone(os.environ["INVI_PHONE_ID"])

print(phone.details())
phone.tap(100, 200)
phone.save_screenshot("screen.png")
```

Coordinates use full-resolution screenshot pixels. Calls block until completion;
the SDK waits and retries when the phone reports `device_busy`. Uncertain execution
is not automatically repeated. Use the operation key to look up its status.

## AI generation

```python
result = client.generate(
    "Generate an email address using example.com",
    result_type="email",
)
print(result["data"]["text"])
print(client.balance())
```

Generation supports text, usernames and email address strings, optionally using a
local PNG/JPEG image. It does not create mailboxes. OCR, AI prompts and generation
use your shared Account AI balance. No AI-provider key is required.

## Features

- Tap, swipe, scroll, type, explicit key presses and opening installed apps.
- Screenshots as PNG bytes or saved to your computer.
- Grouped OCR with text and bounding boxes.
- Single-action AI prompts and structured screen answers.
- Image/video import through Invi Helper on supported dongle phones.
- Device details, balance and operation recovery.

All network operations use the public HTTPS API with your API key. The package
contains client code and response contracts; phone control and AI processing run
on Invi Labs services. API keys remain on your computer and are sent only as an
authentication header to the configured API. HTTP redirects are not followed.

This is an initial release. Device support and feature verification limits are
listed in the [release notes](https://sdk.invilabs.io/downloads/).

[Documentation](https://sdk.invilabs.io/) ·
[Quickstart](https://sdk.invilabs.io/quickstart/) ·
[Generation and outputs](https://sdk.invilabs.io/reference/generation/) ·
[Errors and recovery](https://sdk.invilabs.io/reference/credits-and-recovery/)
