Skip to content

Python SDK

import httpx
# 1. Exchange your API key for a JWT (see /rest-api/authentication)
auth = httpx.post(
"https://sandbox-api.nuez.app/v1/auth/token",
json={"api_key": "nz_YOUR_KEY_HERE"},
).json()
client = httpx.Client(
base_url="https://sandbox-api.nuez.app/v1",
headers={"Authorization": f"Bearer {auth['token']}"},
)
# Balance
balance = client.get("/balance").json()
print(balance["available"], balance["asset"])
# Payout
response = client.post(
"/withdraws",
headers={"Idempotency-Key": "inv-2026-04-001"},
json={
"amount_ars": 5000,
"destination": "0000003100010000123456",
"destination_kind": "CBU",
},
)
print(response.json())

If you’re building an agent rather than a backend integration, the mcp SDK talks to nuez’s POST /mcp endpoint directly with your raw API key — no JWT exchange needed.