Skip to main content
POST
Create x402 Session
セッションを使用すると、繰り返しの x402 API コールに対して支出バジェットを事前承認できます。セッション内の支払いはセッションバジェットから差し引かれ、各コールに対する個別の承認は不要です。

リクエストボディ

string
必須
セッションに資金を提供するエージェント。
string
必須
セッションが使用できる最大合計金額(例:"100.00")。
string
必須
決済用の CAIP-2 チェーン識別子(例:eip155:84532)。
integer
必須
セッションの有効期間(秒)。この期間後にセッションは期限切れになります。
string[]
このセッションが支払いを許可する URL のリスト(オプション)。省略した場合、すべての x402 対応 URL が許可されます。

Response

承認

X-API-Key
string
header
必須

API key authentication. Keys are prefixed with awx_.

ボディ

application/json
agent_id
string
必須

The agent whose wallet funds the session.

budget_limit
string
必須

Maximum total amount the session can spend (e.g., "100.00").

chain
string
必須

CAIP-2 chain identifier for settlement (e.g., eip155:84532).

ttl_seconds
integer
必須

Session time-to-live in seconds. The session expires after this duration.

allowed_urls
string<uri>[]

Optional list of URLs this session is authorized to pay. If omitted, all x402-enabled URLs are allowed.

レスポンス

Session created successfully.

An x402 payment session with a pre-authorized spending budget.

id
string

Unique session identifier (e.g., sess_xyz789).

agent_id
string

Agent whose wallet funds the session.

budget_limit
string

Maximum total amount the session can spend.

budget_spent
string

Total amount spent so far.

budget_remaining
string

Remaining budget available.

chain
string

CAIP-2 chain identifier for settlement.

status
enum<string>

Session status.

利用可能なオプション:
active,
expired,
deleted
allowed_urls
string<uri>[]

URLs this session is authorized to pay.

expires_at
string<date-time>

ISO 8601 expiration timestamp.

created_at
string<date-time>

ISO 8601 creation timestamp.