Skip to main content

ainfera — Python SDK for Ainfera

PyPI version Python versions CI License: Apache 2.0

The Inference of AI Agents. Signed AgentCards, x402-ready Wallets, hash-chained AuditChains — out of the box.

Install

pip install ainfera

Requires Python 3.10+.

Quickstart

from ainfera import AinferaClient

# api_key also reads from the AINFERA_API_KEY environment variable
client = AinferaClient(api_key="ak_...")
agent = client.agents.register(name="my-agent")
agent.wallet.topup(amount_usd=10)

response = agent.inference(
    model="claude-opus-4-7",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.text)
print(response.receipt.audit_url)

What is Ainfera?

The Inference of AI Agents. Drain-proof wallet for AI agents. Your agent's wallet survives prompt injection. One Agent Card across Anthropic, OpenAI, and Together — more Providers in v1.7. Every call cryptographically audited. See ainfera.ai.

Features

  • Signed AgentCards per Agent (JWS, RFC 7515)
  • Provider-neutral routing across Anthropic, OpenAI, Together (more soon)
  • Atomic per-call settlement out of an Agent-scoped Wallet
  • Tamper-evident hash-chained AuditChain for every Agent
  • Local verification — auditors can verify a chain offline, no Ainfera trust required
  • Sync + async clients sharing one resource surface

Concepts

Compose, don't invent

This SDK is a thin wrapper around the Ainfera API. The underlying primitives align with — and link to — public standards work:

License

Apache 2.0. See LICENSE.

Release files for ainfera 1.1.0

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

Source distribution (sdist)

Source distribution for ainfera 1.1.0
File Size Uploaded
ainfera-1.1.0.tar.gz 24.8 kB Details

Built distribution (wheel)

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

Total release size: 56.6 kB

Release files / ainfera-1.1.0.tar.gz

Download URL ainfera-1.1.0.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
427247e393aa806017b415347ec2e9553a5881bc00d09dfe3108bea0bec02ddd
BLAKE2b-256 checksum
How to use checksums
a186b4ee398356007fd7dca1f911ad57a6367b2803d01f4369b80cdf166da314
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ainfera-1.1.0-py3-none-any.whl

Download URL ainfera-1.1.0-py3-none-any.whl
Size 31.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14e4fcd926f1053950c9f0cb6fc9910078bdb69566ee724237c8dd88fd2cfc09
BLAKE2b-256 checksum
How to use checksums
1f01b31baa9e09f7e27d77285e54ea5121337b1230f7b46199f3f84ef2a49c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.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