v1 REST API

Meridian Blue Documentation

An OpenAI-compatible LLM gateway. Drop in by changing two lines: base_url and api_key. Meridian Blue routes your request across providers, falls back on failure, and gives you a single audited surface for the AI traffic you ship to production.

Overview

Meridian Blue is a multi-provider LLM gateway. You write your application against the OpenAI SDK you already use; Meridian Blue handles routing, fallback, billing, and per-key spend caps without any changes to your inference code.

The API lives at https://api.meridianblue.ai/v1. The dashboard for keys, billing, and usage is at https://app.meridianblue.ai.

What you get

  • OpenAI-compatible chat completions. Same request and response shape; existing SDKs work unchanged.
  • Ordered fallback chains. Send models: ["primary", "fallback1", "fallback2"] and Meridian Blue walks the list in order, stopping at the first success.
  • Smart retries. Retryable upstream failures (429, 5xx, network) are retried with exponential backoff before the failure ever reaches your client.
  • Native SDK passthroughs. Anthropic, Groq, Cohere, and Google Gemini native endpoints are mounted at their original paths so SDKs from those vendors also work by changing only the base URL.
  • Per-key spend caps. Every key carries a credit limit. The key returns 402 Payment Required when exhausted, and webhooks fire at 50% / 80% / 100% of the cap.
  • Routing transparency. Every response carries X-Meridian-* headers showing which provider served it, latency, and whether a fallback was used.

Choose your path

If you are…Start here
A developer integrating Meridian Blue for the first time QuickstartChat completions
Wiring up resilience across providers Fallback chainsSmart retriesLoad balancing
Automating spend & usage alerts Per-key spend capsWebhooks
Bringing your own provider keys BYOK

SDKs

Meridian Blue is OpenAI-compatible, so the official OpenAI SDKs work unchanged: JavaScript, Python, Go, Ruby, PHP, .NET, raw HTTP. Just point base_url at https://api.meridianblue.ai/v1.

For native SDKs from other vendors, Meridian Blue exposes their original endpoint paths so you can keep using their client:

  • Anthropic SDKPOST /v1/messages
  • Groq SDKPOST /openai/v1/chat/completions
  • Cohere SDKPOST /v1/chat (v1) or POST /v2/chat (v2)
  • Google Gemini SDKPOST /v1beta/models/{model}:generateContent

Status & support

  • HealthGET https://api.meridianblue.ai/health returns server & database liveness.
  • MetricsGET https://api.meridianblue.ai/metrics exposes a Prometheus scrape target.
  • Email[email protected] for everything else.