i2v.ai Python SDK
Server-side Python client for i2v.ai image and video generation: catalog, quotes, uploads, tasks, recovery and signed webhooks.
Python 3.10 or newer · no runtime dependencies · quote before submit.
Install
pip install i2v-ai
Quick start
import os
from i2v import I2VClient
client = I2VClient(api_key=os.environ["I2V_API_KEY"])
models = client.list_models().data["data"] # public catalog, no key needed
quote = client.quote("gpt-image-2", {"prompt": "A ceramic mug"}).data
receipt = client.create_task(
"gpt-image-2",
{"prompt": "A ceramic mug"},
max_cost_usd="0.20",
expected_revision=quote["expectedRevision"],
idempotency_key="order-1234-image",
).data
result = client.wait_for_task(receipt["taskId"], timeout=900).data
print(result["status"], result.get("output"))
Error model
| Exception | Meaning |
|---|---|
I2VHttpError |
Non-2xx response. Carries status, code, reason, request_id, retry_after_ms. |
I2VSubmissionUnknownError |
The submission may be accepted (5xx, network failure, or HTTP 409 with submission_pending). Recover with recover_submission(key). |
I2VWaitTimeoutError |
The wait ended before the task reached a terminal state. |
verify_webhook(raw_body, headers, get_secret) checks the timestamp window, the HMAC over timestamp.body and the event ID in the body.
Development
python -m unittest discover -s tests -v
Releases publish from a python-vX.Y.Z tag through GitHub OIDC (see .github/workflows/publish-pypi.yml).
For AI agents
- Agent index: https://i2v.ai/llms.txt
- Full documentation: https://i2v.ai/llms-full.txt
- Remote MCP server: https://i2v.ai/api/mcp
Related repositories
| Repository | Purpose |
|---|---|
| i2v-sdk-js | TypeScript SDK |
| i2v-cli | Command-line tools |
| i2v-skills | Agent Skills |
| i2v-mcp | Remote MCP metadata |
| generate-action | GitHub Action |
| i2v-api-examples | Runnable examples |
| i2v-agent-tools | Ecosystem hub |
License
MIT. See LICENSE.
Metadata
Release files for i2v-ai 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| i2v_ai-0.1.1.tar.gz | 12.1 kB | With provenance | Details for i2v_ai-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| i2v_ai-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for i2v_ai-0.1.1-py3-none-any.whl |
Total release size: 21.1 kB
Release files / i2v_ai-0.1.1.tar.gz
| Download URL | i2v_ai-0.1.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c472876f69118fea8ef2db6e51ea3b050574d196685ccbf1750a914c3a03ab48
|
|
BLAKE2b-256 checksum How to use checksums |
81216b50d55618c26b264cb73d695fa94a4cfe07d784010597dc93caa944c3d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logRelease files / i2v_ai-0.1.1-py3-none-any.whl
| Download URL | i2v_ai-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bee90441c5b3c44636ee864ece890590bcc8da23431cf0023f09fe89bd47b682
|
|
BLAKE2b-256 checksum How to use checksums |
91305218b140ed4b53f48b165e67ed141244dee6388c9d7570e9a769002d46c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logSecurity for i2v-ai 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for i2v_ai-0.1.1.tar.gz
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 Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.