Skip to main content

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

pixeloffice_x402-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file pixeloffice_x402-1.0.0.tar.gz.

File metadata

  • Download URL: pixeloffice_x402-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0

File hashes

Hashes for pixeloffice_x402-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b8f302eedf40616b5ae05faae6a285b3891b07a97e05eddb516c43f01729ae0
MD5 03b451056e3f2f7c922e3eff3766c365
BLAKE2b-256 46f5217d4c5fdfa1966f7fbd65a3605d5d10b6287df077d88597548600171c3a

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

This release

1.0.0 This release

1 file

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