pixeloffice-x402
Python client & 1-line wrapper for Agent-Native x402 Micro-Payments on Solana.
Allow autonomous AI swarms (LangChain, CrewAI, AutoGPT, Claude Code) to pay per query directly from their Solana wallet with 0.24ms ed25519 cryptographic settlement and zero credit card friction.
📦 Installation
pip install pixeloffice-x402
⚡ Quickstart (Autonomous Agent Client)
from pixeloffice_x402 import PixelRouterX402
# Provide your agent's Solana private key (Base58)
client = PixelRouterX402(
base_url="https://api.pixeloffice.eu/v1",
solana_private_key="YOUR_AGENT_SOLANA_KEYPAIR_BASE58"
)
# Autonomous LLM invocation with automatic HTTP 402 negotiation
response = client.chat_completion(
model="ox-alpha", # Or "deepseek-chat", "claude-3.5-sonnet"
messages=[
{"role": "user", "content": "Execute autonomous codebase refactor."}
]
)
print(response["choices"][0]["message"]["content"])
🔌 1-Line Drop-in for Official OpenAI SDK
from openai import OpenAI
from pixeloffice_x402 import wrap_openai
# Wrap standard OpenAI client
client = wrap_openai(OpenAI(
base_url="https://api.pixeloffice.eu/v1",
api_key="x402"
), solana_private_key="YOUR_AGENT_SOLANA_KEYPAIR_BASE58")
completion = client.chat.completions.create(
model="ox-alpha",
messages=[{"role": "user", "content": "Hello autonomous agent world!"}]
)
🧠 Stateful Memory Bridge Integration
Pass session_id to retain cross-model state and eliminate up to 85% of redundant context tokens:
response = client.chat_completion(
model="blun-auto",
session_id="customer_support_thread_42",
messages=[{"role": "user", "content": "Summarize previous conversation."}]
)
🛡️ License
MIT © 2026 Pixel Office EU (https://pixeloffice.eu)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pixeloffice_x402-1.0.1.tar.gz.
File metadata
- Download URL: pixeloffice_x402-1.0.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
672a5e0269c50311e91f7ea8d37af73399638e2c40cd5bc140c1f7adedebb2d7
|
|
| MD5 |
63b2956e1637d8e0cae69a79b23c410d
|
|
| BLAKE2b-256 |
de67582b4596cc1a84f51a79e89ce927bab34ccbf8e37ca7bf538e05fd0e41cf
|