Observed since 20 Oct, 15:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python client for 2s.io — 575+ pay-per-call tools for AI agents: ground-truth data, AI gateway, agent infra (storage, locks, queues, watchers). x402 USDC on Base/Solana, no API keys, upto usage billing, free trials.
Python client for 2s.io — 575+ pay-per-call tools for AI agents: more ground-truth data than any other x402 API, a full AI gateway (chat, image, multi-model consensus), and agent infrastructure (wallet-scoped storage, locks, queues, schedules, watchers). USDC on Base or Solana via x402.
upto billing (new on 2s): AI endpoints also accept the x402 upto scheme — authorize the quoted max, get settled for your actual usage (a real on-chain example settled at 1/42nd of the quote). Exact-scheme calls work unchanged.
pip install 2sio
Verify any endpoint before funding a wallet. trial=True makes free calls (one per endpoint per hour, no key, no signup):
from twosio import TwoS
trial = TwoS(trial=True)
print(trial.validate.iban(iban="GB82WEST12345698765432").data["items"][0]["valid"])
# real result; once/hour/endpoint, then raises TwoSError(code="TRIAL_EXHAUSTED")
Pass private_key=... (below) to pay per call for unlimited access.
Most endpoints are reads. Watchers flip that: arm one once and we POST you a signed callback the instant something happens — a wallet moves, a stock crosses your price, a company reports earnings. No polling loop. Flat $0.05 to arm; callbacks are EIP-191-signed (verify offline) and retried with exponential backoff, with a pull backstop via watchers.status.
res = client.watchers.stock_price(
ticker="AAPL", conditionType="above", threshold=250,
callbackUrl="https://your-agent.app/hooks/aapl",
)
print(res.data["items"][0]["watcherId"]) # we POST your payload here the moment AAPL crosses $250
# also: client.watchers.crypto_address_activity(...), client.watchers.earnings(...)
import os
from twosio import TwoS
# private_key is an EVM key (0x...) holding USDC on Base mainnet.
client = TwoS(private_key=os.environ["EVM_PRIVATE_KEY"])
r = client.patents.search(q="neural network", limit=5)
print(r.data["hits"][0]["title"])
print("paid:", r.cost_usd, "USDC, tx:", r.settlement["tx_hash"])
Settles on Base mainnet in ~2 seconds. Prices start at $0.0025/call.
If you'd rather construct the signer yourself (e.g. for a custodial KMS-backed wallet), pass it directly:
from eth_account import Account
signer = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = TwoS(signer=signer)
An ever-expanding catalog of 575+ endpoints across 113+ groups (live count in the directory), namespaced by group — spanning AI (incl. multi-model consensus), agent primitives, control plane (distributed locks, durable queues, scheduled callbacks, pub/sub), storage (key-value / documents / vectors / private blobs), watchers (signed push callbacks), security (CVE / KEV / EPSS, IOC, exploits), identity resolution (ID crosswalks), patents & trademarks, law & sanctions, government & public records, finance & treasury, vehicles & aviation, health & medical, business & GLEIF/KYB, energy & agriculture, maritime & telecom, geo / weather / earth, space, science & papers, property & licenses, internet, crypto, music & news, text redaction & PII scrubbing, and data validators / utilities:
client.patents.search(q="...")
client.security.cve(id="CVE-2024-3094")
client.crypto.address_validate(chain="eth", address="0xd8dA...")
client.ai.summarize(url="https://example.com")
client.law.sanctions_check(name="John Smith")
client.business.entity_match(name="Acme Corp")
client.geocode.address(query="350 5th Ave, New York, NY")
client.weather.zip(zip="94103")
# ... and 530+ more
Full catalog: https://2s.io/api/directory. OpenAPI: https://2s.io/api/openapi.
max_price_usd. There is no default cap (max_price_usd defaults to inf) — set it to opt into a ceiling.on_payment_requested hook for per-call approval.client = TwoS(
private_key=os.environ["EVM_PRIVATE_KEY"],
max_price_usd=0.05,
on_payment_requested=lambda info: info["amount_usd"] < 0.02,
)
TwoSError — HTTP error from 2s.io.PaymentRefusedError — local refusal (price cap or hook).MIT.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.82.0 | 21 Aug 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:fb806780ed35dae4b91d61e0964cd224cb141cc2d9a715d833c023fd2abd3f96