Documentation

MrVinci Claude API

Claude-compatible proxy API. Everything below is a drop-in for the Anthropic Messages API.

Surfaces

One host, landing and API together

The marketing pages you're reading and the API share this domain — the browser gets HTML at /, your client hits the API path below.

https://claude.mrvinci.app/v1/messages
Anthropic Messages · POST
https://claude.mrvinci.app/v1/messages/count_tokens
Token count · POST
https://claude.mrvinci.app/v1/models
Model list · GET
Prerequisites

What you need

Install

The one-minute path

The npx mrvinciapi wizard asks for your key, lets you pick your client, writes the config, and verifies the connection. Zero dependencies, pure Node — it only edits local files, never sends anything anywhere.

npx mrvinciapi

Direct (no wizard)

# Claude Code
npx mrvinciapi sk_mv_YOUR_KEY
# Codex (OpenAI Responses)
npx mrvinciapi sk_mv_YOUR_KEY --codex
# Cursor / Cline
npx mrvinciapi sk_mv_YOUR_KEY --openai

Other flags

# print env, change nothing
npx mrvinciapi sk_mv_YOUR_KEY --print
# revert Claude Code
npx mrvinciapi --undo

Override hosts with MRVINCI_CLAUDE_BASE / MRVINCI_OPENAI_BASE for a self-hosted gateway.

Reasoning

Thinking is passed through

The model's chain of thought streams back as native Anthropic thinking blocks, so Claude Code shows reasoning as it works — including in extended-thinking / ultra modes. Send "thinking": {"type":"disabled"} to turn it off for a request.

Manual setup

Configure it yourself

Claude Code

Add to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk_mv_YOUR_KEY",
    "ANTHROPIC_BASE_URL": "https://claude.mrvinci.app"
  }
}

Cursor / Cline

Base URL https://claude.mrvinci.app, API key sk_mv_…, model claude-opus-4-8.

Claude Desktop

Menu → Developer → Configure Third-Party Inference. Set Connection to Gateway, then:

API reference

POST /v1/messages

curl https://claude.mrvinci.app/v1/messages \
  -H "x-api-key: sk_mv_YOUR_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-4-8",
    "max_tokens": 256,
    "messages": [{"role":"user","content":"Hello"}]
  }'

Authenticate with x-api-key: sk_mv_… or Authorization: Bearer sk_mv_…. List models at /v1/models.

Capabilities

Tools, streaming, vision, caching

Everything the Messages API supports works through the gateway — these aren't add-ons, they're the same wire format you already use.

Tool use (function calling)

Send a tools array exactly as the Anthropic SDK does — tool_use blocks stream back exactly as the API specifies. Agents like Claude Code, Cursor, and Cline run their whole tool loop through the gateway unmodified.

curl https://claude.mrvinci.app/v1/messages \
  -H "x-api-key: sk_mv_YOUR_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-4-8",
    "max_tokens": 1024,
    "tools": [{
      "name": "get_weather",
      "description": "Current weather for a city",
      "input_schema": {"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}
    }],
    "messages": [{"role":"user","content":"Weather in Florence?"}]
  }'

Streaming

Set "stream": true for server-sent events with no added buffering — text deltas, tool calls, and native thinking blocks arrive as they're generated.

Vision

Send images as image content blocks (base64 or URL) — exactly as the API specifies, streaming included.

Prompt caching

Cache reads are metered separately (cache_read_input_tokens in every response's usage) and billed at a fraction of the input price — keep your system prompt stable and long agent sessions get dramatically cheaper. No opt-in needed.

Token counting

POST /v1/messages/count_tokens returns an estimate for a request body without running it — Claude Code uses this to decide when to compact context.

Errors

Error reference

Errors come back in the Anthropic error envelope, so SDK retry logic behaves correctly. The rule: 429 and 529 are retryable (wait, then retry); 4xx everything else means fix the request.

StatusMeaningWhat to do
401Key missing, invalid, expired, or revoked — the message says which.Check the key on /usage; ask an admin to renew.
404Unknown model id.Pick an id from /v1/models.
413Request body over 32 MB (a very long unmanaged conversation).Don't retry the same body — compact or clear the conversation.
4295-hour window, weekly cap, or per-minute limit reached; the message names the limit and reset time.Honor retry-after.
529The service is temporarily overloaded.Retry with backoff — official SDKs do this automatically.
Troubleshooting

When something's off

Changes not applied

Restart your IDE after editing its settings so it re-reads the base URL.

Is it us or you?

The status page live-checks every endpoint from your browser. If it's green and you're still stuck, it's the key or the request.

Key behaving oddly

Paste it on the usage page — revoked/expired state, limits, and per-model consumption are all visible, read-only.

Streaming stalls

Proxies and some serverless runtimes buffer SSE. Test with curl -N first; if that streams, the issue is between your app and us.