Create a chat completion
OpenAI-compatible chat completions endpoint. Accepts the OpenAI chat completions request shape and routes to any catalogued model.
Also served at /v1/openai/chat/completions; both paths accept the same requests. This bare path matches the OpenAI SDK’s default base URL shape, so pointing the SDK at https://api-gateway.merge.dev/v1 works with no other changes.
Authentication
Request
Processing tier. ‘flex’ = discounted best-effort (slower, may be throttled); ‘priority’ = premium low-latency (not currently priced on any route, so it fails closed). Omit or ‘standard’ for normal processing. Allowed only on routes that price the requested tier, otherwise the request fails closed with 400.
If the provider throttles the requested tier (429/503), retry once at the standard tier, billed at standard rates. The response service_tier shows the tier that actually served.
Number of most likely tokens to return per position; requires logprobs.
Project ID (UUID) to attribute this request to.
Customer ID (UUID) to scope this request to, applying that customer’s routing policy, provider keys, budget, and usage attribution.
Routing policy ID for this request: an org-level policy, or a project or customer policy when the request carries that scope.
Ordered list of models to try, first success wins, with the same rules as priority_order on POST /v1/responses.
Restrict routing to one vendor (hosting platform).
Ordered list of acceptable vendors; the first available one wins.
Provider-specific options, keyed by provider family.
Prompt-cache routing hint forwarded to providers that cache automatically.
Return prompt-injection and DLP results in a top-level guardrails object.