Skip to main content

andreax-sdk

Pure Python client (no LangChain) for Andreax's pay-per-call AI tools: 200+ tools discoverable and payable over x402 (HTTP 402 + USDC on Base), no API key, no signup.

from andreax_sdk import AndreaxClient

client = AndreaxClient(
    wallet_address="0xYourAddress",
    private_key=None,          # optional; required only if auto_pay=True
    auto_pay=False,            # True = pay automatically within your caps
    per_call_cap_usd=0.10,
    daily_cap_usd=5.00,
)

tools = client.get_tools()          # -> list[dict] {name, description, price_usdc, endpoint}
result = client.call("traducir", {"texto": "hello", "idioma_destino": "es"})

Autopay

With auto_pay=True and a private_key, a tool call that answers 402 Payment Required is paid automatically: this SDK signs an EIP-3009 transferWithAuthorization locally (your private key never leaves the process) and retries the call with the signed payload in the X-PAYMENT header. Every payment is checked against two caps first (per_call_cap_usd, daily_cap_usd).

Without auto_pay (or without a private_key), a paid call raises PaymentRequired with the full 402 challenge (amount, recipient, network) so you can decide.

Status

Alpha (0.1.0). Built against Andreax's live x402 catalog and 402 challenge format. This is the pure-Python sibling of andreax-langchain-autopay — same protocol, no LangChain dependency.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

andreax_sdk-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

andreax_sdk-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file andreax_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: andreax_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for andreax_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8af270f500407eaf72d712e5eafd63bb4d77d0abe7ca4edf224d565c9dbe33b
MD5 f64abdb3341f9f6b624089eb19805721
BLAKE2b-256 fd7974dd4f481e9c3591f971408240a8a819de0488b1c66afadfb77c902bab2b

See more details on using hashes here.

File details

Details for the file andreax_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: andreax_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for andreax_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 004895b64e5c232ea908c86e2c7a7275830628bd8524786b60b1c93f4b24ec40
MD5 a42dff8d0d4a53bb75038273881ae7d0
BLAKE2b-256 488247b39cecec5683af695993ab3a24d8c907515651e8bb1bca0848e50fc20b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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