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.

Quick Start

  1. Sign up and confirm your email address. Without a confirmed email address you cannot subscribe.
  2. Add a card under Account → Payment & usage.
  3. Your VAT ID is checked automatically. Only once it has been checked as valid can you subscribe. You can see its status under Account → Company details.
  4. Subscribe to the API you want in the catalog.
  5. Create a key under API keys and call the gateway: /v1/<slug>/<path> — the path after the slug is part of the URL.

Responses and Errors

StatusMeaning
200Success — the provider's response is passed through.
400invalid_request — the parameters do not match the product's input schema. The gateway checks this only if the provider has switched the check on.
401Invalid or missing key.
402No 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.
402subscription_suspended — a card charge failed and the subscription is suspended. Settle it at /balance; access is restored automatically.
403subscription_required — there is no active subscription for this API. Subscribe in the catalog.
404API not found.
405method_not_allowed — the method is not allowed for this API. The Allow header lists the allowed ones.
425objection_window_pending — an automatically created subscription is still inside its objection window. Wait for the window to close or confirm it at /keys.
429rate_limit_exceeded — too many calls in a short time. Retry with increasing delay (exponential backoff).
502Error at the provider — the call is not counted.
503platform_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.