The gateway is accessible at the following URL pattern:
https://metergate.dev/v1/<slug>/<path>
Where <slug> is the short name of the product you want to call. The example calls a fictional endpoint demo at path /get:
curl -H "Authorization: Bearer YOUR_API_KEY" https://metergate.dev/v1/demo/get
The Authorization header carries the API key as a bearer token. Every call the provider has answered is counted, including one answered with a 4xx error. The X-Metered header tells you for each response. Calls are billed together after the end of the calendar month.
Until billing starts the response additionally carries X-Billing-Starts: unannounced: up to then no call costs anything. As long as no start has been announced it reads unannounced; once announced (by email, at least 14 days in advance), it carries the moment. The header is set only until billing starts and only on delivered responses, never on gateway error responses. If it is absent on a delivered response, billing is active and the listed price applies.
/v1/<slug>/<path> — the path after the slug is part of the URL.| Status | Meaning |
|---|---|
| 200 | Success — the provider's response is passed through. |
| 400 | invalid_request — the parameters do not match the product's input schema. The gateway checks this only if the provider has switched the check on. |
| 401 | Invalid or missing key. |
| 402 | No card on file, the subscription's credit limit is exhausted, or the key's spending cap is reached. In the latter two cases the response names in retry_at when it will work again. |
| 402 | subscription_suspended — a card charge failed and the subscription is suspended. Settle it at /balance; access is restored automatically. |
| 403 | subscription_required — there is no active subscription for this API. Subscribe in the catalog. |
| 404 | API not found. |
| 405 | method_not_allowed — the method is not allowed for this API. The Allow header lists the allowed ones. |
| 425 | objection_window_pending — an automatically created subscription is still inside its objection window. Wait for the window to close or confirm it at /keys. |
| 429 | rate_limit_exceeded — too many calls in a short time. Retry with increasing delay (exponential backoff). |
| 502 | Error at the provider — the call is not counted. |
| 503 | platform_frozen — operations are temporarily halted. Nothing is metered and nothing is billed; try again later. |
Provider responses with a status below 500, including 4xx, are passed through and counted. The X-Metered header tells you for each response. All error codes with their meaning are listed at /api/v1/errors.