Libraries and tools

Recovea speaks the OpenAI wire protocol, so the official OpenAI SDKs work unmodified. You override the base URL (scheme, host, and the /v1 prefix) and the SDK still appends the same resource paths, injects Authorization: Bearer, sets the JSON content type, and applies its own retry and backoff. Pointing an SDK at Recovea changes only the host; everything else is byte-for-byte OpenAI.

You don't install a Recovea client to get started. The drop-in path is the OpenAI SDK plus two settings.

Python (openai)

Override base_url on the client, or set the environment variables and change no code at all.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.recovea.ai/v1",  # or env OPENAI_BASE_URL
    api_key="rcv_live_…",                  # or env OPENAI_API_KEY
)

resp = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Node / TypeScript (openai)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.recovea.ai/v1",   // camelCase in the JS SDK
  apiKey: process.env.RECOVEA_API_KEY,
});

const resp = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);

Env-var setup (zero code change)

OPENAI_BASE_URL is the authoritative override read by every official SDK and the CLI. If your code already reads the standard OpenAI variables, you touch no source. Set these and run:

export OPENAI_BASE_URL="https://api.recovea.ai/v1"
export OPENAI_API_KEY="rcv_live_…"

The non-standard OPENAI_API_BASE spelling is third-party only. Use OPENAI_BASE_URL.

Other official SDKs

Each of these supports a base-URL override and works unchanged. Set the URL below and the key as you normally would.

LanguagePackageOverride
Gogithub.com/openai/openai-gooption.WithBaseURL("https://api.recovea.ai/v1")
.NETOpenAI (NuGet)Endpoint = new Uri("https://api.recovea.ai/v1") on OpenAIClientOptions
Javaopenai-javaOpenAIOkHttpClient.builder().baseUrl("https://api.recovea.ai/v1")
AnyOPENAI_BASE_URL env varPicked up by every SDK above and the CLI
// Go
client := openai.NewClient(
    option.WithBaseURL("https://api.recovea.ai/v1"),
    option.WithAPIKey("rcv_live_…"),
)

The OpenAI CLI and other OpenAI-compatible tools

The official openai CLI and any tool that reads OPENAI_BASE_URL (LangChain, LlamaIndex, Vercel AI SDK, and similar) reroute through Recovea with no flags or patches:

export OPENAI_BASE_URL="https://api.recovea.ai/v1"
export OPENAI_API_KEY="rcv_live_…"

openai chat.completions create --model gpt-4o --message user:"hello"

curl

Useful as a smoke test before touching app code:

curl https://api.recovea.ai/v1/chat/completions \
  -H "Authorization: Bearer rcv_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "ping"}]
  }'

The OpenRouter long tail (Gemini, Llama, Mistral, DeepSeek, …)

The same /v1 drop-in covers every model OpenRouter serves. Connect an OpenRouter key in the dashboard and pass the model's vendor/model id, exactly as listed by GET /v1/models — no other change:

resp = client.chat.completions.create(
    model="google/gemini-2.5-pro",  # vendor/model id → routed via your OpenRouter key
    messages=[{"role": "user", "content": "Hello"}],
)

A bare non-OpenAI id on /v1 (claude-…, gemini-…) returns an honest 404 whose message names the vendor/model id to use instead.

A thin recovea SDK (planned)

Planned — coming soon. There is no recovea client package to install today; pip install recovea and npm install recovea are name reservations only, not a working client. Use the drop-in above — the official OpenAI (or Anthropic) SDK with base_url and your rcv_ key. That is the supported, documented path and there is nothing else to install.

A thin convenience package that presets base_url and reads RECOVEA_API_KEY is on the roadmap. When it ships it will be a re-export of the OpenAI client with the same methods and response shapes, so anything you write against openai today will keep working unchanged. Until then, the two-setting drop-in is the whole integration.

Scan your logs first

If you want to estimate savings before integrating, run the hosted scan at recovea.ai/scan: you submit your monthly-spend band and providers (no logs, prompts, or response bodies uploaded) and we return a dollar-figure savings gap report — currently prepared and delivered within about 48 hours.

A local, open-source npx recovea scan ./logs CLI that runs entirely on your machine with no upload is planned — coming soon; until it ships, the hosted scan is the way to get an estimate.

Anthropic-shaped clients

If you use the Anthropic SDK or Anthropic's wire format, point it at the namespaced Anthropic endpoint instead of /v1:

https://api.recovea.ai/anthropic

Set base_url and your rcv_ key and the official Anthropic SDK works unmodified — it sends the key on x-api-key (an Authorization: Bearer rcv_… header is also accepted), and Recovea re-signs the upstream call with your stored Anthropic provider key:

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.recovea.ai/anthropic",
    api_key="rcv_live_…",  # sent as x-api-key; Recovea swaps in your Anthropic key upstream
)

msg = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=64,
    messages=[{"role": "user", "content": "Hello"}],
)

The OpenAI-shaped contract at https://api.recovea.ai/v1 and the Anthropic-shaped contract are kept on separate paths so neither wire format leaks into the other — errors on /anthropic come back in Anthropic's own error envelope, and on /v1 in OpenAI's.

What stays the same, what we add

Every inference response carries two Recovea-added ids — x-request-id and x-recovea-trace-id — so each call is auditable back to your cost ledger. The wire stays additive: beyond those ids, Recovea only ever adds headers — x-recovea-cache: hit on an exact-cache hit, and rate-limit headers on responses Recovea mints itself (the six x-ratelimit-* plus Retry-After on the /v1 surface; Retry-After only on /anthropic, per Anthropic's convention). On a proxied response the provider's own rate-limit headers are passed through verbatim, never overwritten. Your provider's response body, streaming, tools, status codes, and error envelopes flow through unchanged, and if anything in our layer fails, the request flows straight through to your provider: it is fail-open, and any error you do see is in your provider's own wire format, never a Recovea-shaped envelope.

Next

  • Quickstart: your first request in under five minutes
  • Authentication: Recovea API keys (rcv_live_ / rcv_test_)
  • Streaming: server-sent events, unchanged
  • Errors: status codes and the error envelope