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.