call_api
Call an API endpoint on Zyla API Hub. Requires the user's API key and a credit card on file. Billing is pay-per-successful-request: you only pay for 2xx responses. Each API has its own price per call (shown in get_api_info), and every successful response includes cost_usd — the exact amount billed for that call. There are no monthly subscriptions or minimums — usage is charged to your credit card automatically. If a 402 error is returned with a payment_url, the user MUST open that URL in their browser to add a credit card before retrying. Pass the api_id, endpoint_id, HTTP method, and parameters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_id | Yes | The numeric API ID | |
| method | No | HTTP method: GET or POST (default: GET) | |
| params | No | Key-value parameters to send with the request | |
| endpoint_id | Yes | The numeric endpoint ID within the API |