Skip to main content

AEGIS SDK — privacy-routed HTTP requests for AI agents

Project description

aegis-sdk

Privacy-routed HTTP requests for AI agents and developers. Route any request through a residential exit node and pay per-request in USDC on Solana.

Install

pip install aegis-sdk

Quick start

from aegis import Aegis

aegis = Aegis(api_key="aegis_your_key_here")

# GET — routed through a US residential IP
res = aegis.get("https://httpbin.org/ip")
print(res.json())
# {"origin": "12.34.56.78"}  ← a residential US IP, not yours

# POST with a specific exit country
res = aegis.post(
    "https://api.example.com/data",
    body={"query": "hello"},
    country="JP",
    ip_class="residential",
)
print(res.json())

API

Aegis(api_key, *, base_url?, default_country?, default_ip_class?)

Param Default Description
api_key required API key from aegisprivacy.org/agent
default_country "US" Default exit country
default_ip_class "residential" Default IP class
base_url production Override for local dev

aegis.fetch(url, *, method, country, ip_class, headers, body)AegisResponse

Full request method. All keyword args are optional.

aegis.get(url, *, country?, ip_class?, headers?)AegisResponse

aegis.post(url, body, *, country?, ip_class?, headers?)AegisResponse

aegis.balance()dict

Returns {"usdc": "1.23"} — remaining balance for this API key.

AegisResponse

res.status   # int
res.ok       # bool
res.headers  # dict
res.text()   # str
res.json()   # any

Errors

from aegis.errors import AegisAuthError, AegisBalanceError, AegisNodeError

try:
    res = aegis.get("https://example.com", country="JP")
except AegisBalanceError:
    pass  # top up at aegisprivacy.org/dashboard
except AegisNodeError:
    pass  # no nodes available in that country
except AegisAuthError:
    pass  # invalid API key

Pricing

Cost
Per request $0.001 USDC
Residential exit +$0.0005 USDC
Bandwidth $0.005 USDC / MB

Get an API key at aegisprivacy.org/agent.

Project details


Download files

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

Source Distribution

aegisprivacy_sdk-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

aegisprivacy_sdk-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aegisprivacy_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for aegisprivacy_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25c461ef9e70bb119b51c40ac39bee2d6f32b1583603566779217f474d935e42
MD5 5c8c3d999bfdd91c23586a6732893363
BLAKE2b-256 c93ec336e3ad9e68b7650fb6a213de114d00d5e0d6cd34dccba37a785c7dd140

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aegisprivacy_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b435fd70119e78809ef580bb2664c81fe27587eb61d460021609383d3467460a
MD5 9ff42e42ae1b94852c682efbdd9bee4d
BLAKE2b-256 a93ac13f687cf6421cafc1a5ee544ccba64d67b003866b0661f5f4ae51a1ebd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page