payloadexchange-operator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePayloadExchange Operator
PayloadExchange 运营操作指南
Workflow
工作流程
- Start the Rust API service.
- If using sponsored APIs, ensure Postgres is configured () and migrations are applied.
DATABASE_URL - Create user profiles with role/tool attributes.
- Create sponsor campaigns with target roles, target tools, task gate, and budget.
- Record sponsor task completion before allowing proxy-sponsored usage.
- Create sponsored APIs via .
POST /sponsored-apis - If > 0, first call
SPONSORED_API_CREATE_PRICE_CENTSwithout payment, readPOST /sponsored-apis, then retry withPAYMENT-REQUIREDper x402.PAYMENT-SIGNATURE - Call sponsored APIs via . Calls are free while
POST /sponsored-apis/:api_id/runcovers the per-call price; once exhausted, server returnsbudget_remaining_centswith402, then retry withPAYMENT-REQUIRED.PAYMENT-SIGNATURE - Use for sponsored campaign flows and
/proxy/:service/runfor direct paid flows./tool/:service/run - Log skill usage outcomes to .
/creator/metrics/event - Read for agent campaign URL sources.
/campaigns/discovery - Read and
/creator/metricsfor operational monitoring./metrics
- 启动Rust API服务。
- 若使用赞助API,请确保已配置Postgres()并执行了数据迁移。
DATABASE_URL - 创建带有角色/工具属性的用户档案。
- 创建包含目标角色、目标工具、任务门控以及预算的赞助活动。
- 在允许代理赞助使用前,记录赞助任务完成情况。
- 通过创建赞助API。
POST /sponsored-apis - 如果> 0,首先不带支付参数调用
SPONSORED_API_CREATE_PRICE_CENTS,读取POST /sponsored-apis响应,然后按照x402规范携带PAYMENT-REQUIRED重试请求。PAYMENT-SIGNATURE - 通过调用赞助API。当
POST /sponsored-apis/:api_id/run余额足够支付单次调用费用时,调用免费;余额耗尽后,服务端返回携带budget_remaining_cents的PAYMENT-REQUIRED状态码,随后可携带402重试。PAYMENT-SIGNATURE - 赞助活动流程使用接口,直接付费流程使用
/proxy/:service/run接口。/tool/:service/run - 向接口上报技能使用结果。
/creator/metrics/event - 访问获取Agent活动的URL来源。
/campaigns/discovery - 访问和
/creator/metrics进行运营监控。/metrics
Sponsored API Tracking
赞助API追踪
Each sponsored API call inserts a row into with payment mode, amount, and caller metadata for budget reconciliation.
sponsored_api_calls每一次赞助API调用都会在表中插入一条记录,包含支付模式、金额以及调用方元数据,用于预算对账。
sponsored_api_callsMetric Event Contract
指标事件协议
Send one telemetry event per key skill action:
- when skill definition is created
event_type=created - when copied into Codex/other environment
event_type=installed - when skill starts handling a request
event_type=invoked - when task succeeds
event_type=completed - when task fails
event_type=failed
Required fields: , , , .
Optional field: .
skill_nameplatformevent_typesuccessduration_ms每个关键技能操作都需要发送一个遥测事件:
- 技能定义创建时发送
event_type=created - 技能被复制到Codex或其他环境时发送
event_type=installed - 技能开始处理请求时发送
event_type=invoked - 任务成功时发送
event_type=completed - 任务失败时发送
event_type=failed
必填字段:、、、。
可选字段:。
skill_nameplatformevent_typesuccessduration_msx402 Settlement Sync
x402结算同步
Use to ingest external settlement updates and keep sponsored/direct ledger state consistent with the payment rail monitor.
/webhooks/x402scan/settlement使用接口接收外部结算更新,保持赞助/直接交易账本状态与支付链路监控数据一致。
/webhooks/x402scan/settlement