API Reference

Endpoints overview

Every Meridian Blue endpoint, grouped by purpose. The proxy endpoints accept the OpenAI request shape (or each upstream vendor's native shape on the SDK-compatibility paths) and add per-key billing on top.

OpenAI-compatible proxy

These endpoints accept the OpenAI request and response shape. Any OpenAI SDK works without modification — just point base_url at https://api.meridianblue.ai/v1.

MethodPathPurpose
POST/v1/chat/completionsChat completions (streaming, tool calls, structured outputs).
POST/v1/completionsLegacy text completions.
POST/v1/embeddingsVector embeddings.
POST/v1/images/generationsImage generation. Billing matches the upstream provider's reported cost.
POST/v1/images/editsImage editing.
POST/v1/audio/transcriptionsSpeech-to-text (Whisper-style).
POST/v1/audio/speechText-to-speech.
GET/v1/modelsList active model mappings — returns the catalogue with pricing, capabilities, and lifecycle status.

Native SDK passthroughs

Each major vendor's native endpoint is also mounted at its original path so you can use that vendor's SDK by changing only the base URL. The request and response shapes are the upstream vendor's, not OpenAI's.

VendorMounted atSDK
AnthropicPOST /v1/messages@anthropic-ai/sdk with baseURL changed.
GroqPOST /openai/v1/chat/completionsGroq SDK with baseUrl changed.
Cohere v1POST /v1/chatCohere v1 SDK.
Cohere v2POST /v2/chatCohere v2 SDK.
Google GeminiPOST /v1beta/models/{model}:generateContentGoogle Gen AI SDK.

Model catalogue

GET /v1/models returns the active model catalogue with pricing, capabilities, mode, lifecycle status, free-tier eligibility, and (for admins) the provider mapping. See Model catalog for the entry shape.

Account & keys

MethodPathPurpose
POST/api/v1/auth/registerCreate a new account (also bootstraps a tenant).
POST/api/v1/auth/loginEmail + password login → JWT.
POST/api/v1/auth/oauthExchange a Clerk session token for a Meridian Blue JWT.
GET / POST / PATCH / DELETE/api/v1/developer/keysList, create, edit, and revoke API keys.
GET/api/v1/developer/usagePer-key usage history with token and cost roll-ups.
GET / POST / PATCH / DELETE/api/v1/provider-keysBYOK — register, rotate, and revoke your own provider credentials. See BYOK.
GET / POST/api/v1/teamTenant team management.

Billing

MethodPathPurpose
GET/api/v1/billing/balanceCurrent credit balance + recent transactions.
POST/api/v1/billing/checkoutStart a Revolut checkout session for a credit bundle.
POST/api/v1/billing/webhookRevolut webhook receiver (raw body, HMAC-verified — internal use).
GET / POST/api/v1/couponsList, redeem, and assign coupon codes.
POST/api/v1/admin/creditsOwner / admin: grant or transfer credits between accounts.

Governance routes

These mirror the EU AI Act compliance surface: audit log, deployer policy, human-review queue, incidents, and data lineage. Most are read-only for users; mutations require the admin or owner role.

PathWhat it covers
/api/v1/policiesDeployer policy CRUD + signing. See Policy engine.
/api/v1/audit-logsTamper-evident audit log query. See Audit vault.
/api/v1/vaultForensic vault entries + regulator credential validation.
/api/v1/data-lineagePer-request provenance + GDPR Article 15 export.
/api/v1/reviewHuman-review queue for high-risk responses.
/api/v1/appealsSubmit / review risk-classification appeals.
/api/v1/literacyArticle 4 AI literacy module + completion records.
/api/v1/redteamingScheduled red-team runs and result history.
/api/v1/conformityConformity assessments + Annex IV bundles.
/api/v1/incidentsArticle 73 serious-incident reporting.
/api/v1/gpaiGPAI compliance posture per provider.
/api/v1/shadow-aiShadow-AI detector.
/api/v1/sub-processorsPublic sub-processor list (Article 28).
/api/v1/corrective-actionsDrift-driven corrective-action workflow.
/api/v1/notificationsPer-user notification feed.

Observability

MethodPathPurpose
GET/healthLiveness probe — returns DB connection state.
GET/metricsPrometheus scrape (text/plain version 0.0.4). See Observability.

Conventions

  • Versioning — Path-prefixed (/api/v1/...). Breaking changes get a new version.
  • Timestamps — ISO 8601 with millisecond precision (2026-04-29T13:34:42.123Z).
  • IDs — Mongo ObjectId hex strings (24 chars) for resources; ULIDs for request IDs.
  • Body limits — 2 MB for most routes; 50 MB for proxy routes (multimodal payloads).
  • Content-Typeapplication/json for everything except SSE streams (text/event-stream).