Documentation

A single SDK across language, image, and voice models.

LMHaven exposes Anthropic-, OpenAI-, Gemini-, and ElevenLabs-compatible endpoints under one base URL. Most SDKs work after a one-line change.

Getting started

Sign in, create an API key from the dashboard, and point your existing SDK at our base URL. Keys begin with sk-lmh-.

# environment
export OPENAI_API_KEY="sk-lmh-…"
export OPENAI_BASE_URL="https://api.lmhaven.app/v1"

# anthropic
export ANTHROPIC_API_KEY="sk-lmh-…"
export ANTHROPIC_BASE_URL="https://api.lmhaven.app/v1"

Authentication

Send your API key in the Authorization header. Every request is scoped to the key’s owning workspace; revoked keys return 401 immediately.

curl https://api.lmhaven.app/v1/chat/completions \
  -H "Authorization: Bearer sk-lmh-…" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-4-7","messages":[{"role":"user","content":"hi"}]}'

Models

The full active roster, billed in the unit native to each modality. Ratios update weekly against each provider’s public list price.

ModelModalityRatio
claude-opus-4-7Text28× tokens / $
claude-sonnet-4-6Text32× tokens / $
claude-haiku-4-5Text50× tokens / $
gemini-3-1-proText36× tokens / $
gemini-3-flashText55× tokens / $
seedream-5Image40× images / $
novelai-v4Image45× images / $
pixai-v4Image60× images / $
nano-banana-proImage38× images / $
elevenlabs-v3Voice22× minutes / $

Endpoints

Text — chat completions

POST /v1/chat/completions — OpenAI- and Anthropic-compatible body shape. Streaming via stream: true emits SSE chunks.

Image — generations

POST /v1/images/generations — pass model, prompt, size. Returns a signed URL valid for 24 hours.

Voice — text-to-speech

POST /v1/audio/speech — pass model, voice, input. Returns audio bytes inline.

Errors

Error responses follow a consistent envelope. Status codes mirror the underlying provider where possible.

CodeMeaning
400Malformed request body or disallowed parameter.
401Missing or invalid API key.
402Insufficient balance — top up from the dashboard.
403Email not verified or feature not enabled for this workspace.
429Rate limit exceeded. Backoff value is in Retry-After.
5xxUpstream provider failure. We retry once before surfacing.

Rate limits

Default workspace limit is 600 requests / minute and 100 concurrent streaming connections. Limits scale with prepaid balance; contact support on Discord for higher tiers. The number you see is the number you get — we do not throttle behind the scenes or reroute to weaker checkpoints under load.

Webhooks & receipts

Top-up receipts and email-verification messages come from verify@lmhaven.dev. Webhook events for billing land in your dashboard Billing tab and are delivered as email receipts.

Need a hand?

Open the Discord — a real human replies in under an hour, 24/7. Never a chatbot.

Docs · LMHaven