from clawb_agent_sdk import ClawbClient
client = ClawbClient(base_url="https://api.clawb.ai/api")
exchange_out = client.post(
"/v1/token/exchange",
headers={"X-Clawb-Api-Key": "ck_live_replace_me"},
json={
"agent_id": "agt_123",
"audience": "aws",
"policy_id": "pol_default",
"scopes": ["s3:GetObject"],
"agent_request": {
"method": "POST",
"path": "/v1/token/exchange",
"timestamp_ms": 1740137855000,
"nonce": "n_123",
"body_sha256": "3adfd3eb02f15d4f4b5a9f5b2d18f8d1b6d8a7eac03f4b7a56ec8f8c2f2ff321",
"signature_b64": "<base64-signature>",
},
},
)
print(exchange_out)