apihub_call
Sends payment. Calls a paid endpoint on an onboarded APIHub service. Debits the endpoint's price from your credit balance and forwards the request to the upstream provider. Returns an object with the upstream response body, HTTP status, and credits_charged_microdollars. Requires a valid API key and sufficient credit balance; if balance is insufficient the call returns a 402 with payment requirements (use apihub_topup to add credits, apihub_balance to check). Use this for services already onboarded to APIHub (find slugs via apihub_search or apihub_list_services); use apihub_call_external for arbitrary x402 URLs not onboarded here, or apihub_read_content for content gateways.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Optional. Request body as a JSON string for POST/PUT. Ignored for GET/DELETE. The proxy forwards this verbatim with Content-Type: application/json. | |
| method | No | Optional HTTP method, default GET. Must match the method declared on the endpoint or the request will fail. | |
| service_slug | Yes | Required. The service slug as returned by apihub_search or apihub_list_services, e.g. 'exchange-rates' or 'weather'. | |
| endpoint_path | Yes | Required. The endpoint path including any leading slash, e.g. '/latest/USD' or '/v1/forecast'. Get valid paths from apihub_get_service. |