API details
Base API URL
All API endpoints in the reference documentation are relative to the following base URL:
Authentication
For any request you make when communicating with Merge Gateway, you will need an API key to authenticate yourself as an authorized user.
Add your API Key with a “Bearer ” prefix as a header called Authorization to authorize your Merge API requests. This header must be included in every request in this format:
Key endpoints
Gateway’s public API surface is centered around three endpoint groups:
GET /models- list models
- filter by
providerorvendor - fetch a single model by query string with
?model=<provider/model_id>
GET /vendors- list execution vendors and the models they currently serve
- fetch a single vendor with
GET /vendors/{vendor_id}
POST /responses- create an LLM response
- the response includes the
vendorthat ultimately served the request and theservice_tierthat actually served it
Models API shape
GET /models returns canonical model identity at the top level and vendor-specific execution metadata under vendors.
Example:
Use GET /models?model=<provider/model_id> when you want one specific model object but prefer a query parameter over a path parameter. The slash is fine there because it is part of the query parameter value.
Vendors API shape
GET /vendors returns execution hosts, not canonical model owners.
Example:
Responses
POST /responses returns the canonical model that served the request and a top-level vendor field for the execution host that actually handled it.
Request parameters
Beyond the message input, the request accepts these optional fields:
Served tier and billing
The response echoes a top-level service_tier — the tier that actually served the request and the rate you were billed at. On a throttle fallback this differs from the tier you sent (e.g. you requested flex but were served and billed at standard).
See Service tiers for the full flow, supported vendor routes, and fallback behavior.