Skip to main content

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.

Install

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.

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

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.

Documentation · Quickstart · Generation and outputs · Errors and recovery

Typing completion

Version 0.1.1 waits for the dongle's final typing acknowledgment. Long typing and AI actions remain synchronous to Python while the SDK waits for the same server operation to finish. It never starts a second copy while waiting. Call phone.press("enter") after phone.type(text) returns to submit a search. A lost connection can still produce ExecutionUncertainError; inspect the recorded operation and phone state before deciding on another action.

Release files for invilabs 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for invilabs 0.1.1
File Size Uploaded
invilabs-0.1.1.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for invilabs 0.1.1
File Interpreter ABI Platform
invilabs-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / invilabs-0.1.1.tar.gz

Download URL invilabs-0.1.1.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6fe6bdc2bdb46bfca5b7cd28d80706f05030891f798920fbcbbecc5b53fb8734
BLAKE2b-256 checksum
How to use checksums
6e4deff3d3595932aff42b6978f5ee3720024b34d70431fd3a7ec5adcabb86c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / invilabs-0.1.1-py3-none-any.whl

Download URL invilabs-0.1.1-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5f315baf451ca90110eea7f5f2fdbb21cda21777b7170fd3868eceed899a830
BLAKE2b-256 checksum
How to use checksums
1371e65cf624d17ab08d978f228586214aa022d713ec635a6d7ec80c648fa4c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page