Publish a paid x402 route
publish_x402_routeMonetize your existing API by creating a paid x402 route that collects USDC per call before forwarding to your upstream endpoint.
Instructions
Publish an API endpoint as a paid x402 route on the Apiosk gateway. The route gets a paid URL that returns 402 Payment Required until the caller pays in USDC, then forwards to your upstream API. New routes enter Apiosk's review queue (status pending_review) and go live on approval. Requires an Apiosk provider token (Authorization: Bearer sk_live_…).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable API name, e.g. 'Weather API'. | |
| path | No | Public path under the route's gateway slug, e.g. /weather. Defaults to the last segment of upstream_url. | |
| slug | No | Optional gateway slug override (lowercase letters, numbers, hyphens). Defaults to a slug derived from name. | |
| tags | No | ||
| price | Yes | Price per call in USDC, e.g. "0.01". | |
| method | No | Defaults to GET. | |
| network | No | Settlement network. Defaults to base. | |
| currency | No | Only USDC is supported. | |
| description | No | ||
| input_schema | No | ||
| upstream_url | Yes | Full HTTPS URL of your existing endpoint the gateway forwards paid requests to. | |
| output_schema | No | ||
| settlement_address | Yes | Wallet that receives 98% of each payment (Apiosk keeps a 2% platform fee). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||