Add AI to your application with a single key

An OpenAI-compatible API, eight providers behind it, and the cost of each feature tracked apart. You switch models in the console, without touching your code.

Read the docs
  • Works with the OpenAI SDKs
  • Anthropic, OpenAI, Gemini, Mistral and four more
  • The cost of each feature, by folder
summarise-ticket.ts
const client = new OpenAI({
  baseURL: "https://api.erha.ai/v1",
  apiKey: process.env.ERHA_API_KEY,
  defaultHeaders: { "X-Erha-Folder": "support.summary" },})

const summary = await client.chat.completions.create({
  model: "ticket-summary",
  messages: [{ role: "user", content: ticket }],
})
200412 tokenssupport.summary0.08 cent

The right model for each feature

Your code calls a profile, not a model. The profile says which provider and which model answer: the most capable where quality matters, the fastest and cheapest elsewhere.

  • OpenAI
  • Anthropic
  • Gemini
  • Mistral AI
  • DeepSeek
  • Grok
  • Groq
  • Kimi

A newer model comes out? You change the profile in the console, your calls follow.

Space profiles
Profile calledModelWhy
contract-reviewClaude Opus 4.8Long reasoning, few calls
writingClaude Sonnet 4.6Writing quality
ticket-summaryClaude Haiku 4.5Fast, called often
classificationMistral SmallLowest cost, hosted in Europe

The cost of each feature, with no instrumentation

Add the X-Erha-Folder header to your calls. Each part of your product is counted apart, on the same key.

A header, or a parameter

X-Erha-Folder: billing, or ?folder=billing. With an OpenAI SDK, you set it once on the client.

Names that do not drift

A key can list its allowed folders and require one: a typo is refused instead of opening a new line.

History filtered

One click on a folder shows its calls: model, tokens, cost, duration.

Key “Production”October
FolderCallsTokensCost
billing12,4303.1 M€41.20
support.summary8,2101.9 M€18.75
crm.follow-up2,9401.2 M€14.30
No folder3100.2 M€4.10
Key total23,8906.4 M€78.35

Spending you control

Caps, restrictions and errors are designed for a production integration.

Spending caps

On the space, on the API or on one key. Once reached, the key answers 402 until the next period.

IP restriction

A leaked key is useless outside the listed servers.

Domain restriction

A key used in a web page cannot be replayed from another site.

One key per use

Each key has its own usage, and is revoked instantly.

No provider key to manage

Anthropic, OpenAI or Mistral keys stay with ERHA. Your code only knows yours.

Nothing billed on failure

A call that runs past 280 seconds answers 504 and is not billed.

Your OpenAI code works as is

Change the client's address and key. The rest of the format is OpenAI's chat completions.

OpenAI SDKs

TypeScript, Python, and any OpenAI-compatible client.

Tools

tools, tool_choice and the tool role, as OpenAI defines them.

Images and PDFs

Attached in the message, to read an invoice or a contract.

Streaming

OpenAI's SSE protocol, for clients that expect it.

The whole API is documented

Authentication, routes, folders, attachments, tools, errors and examples with the SDKs.

  • GET /v1/models
  • POST /v1/chat/completions
Open the docs

Frequently asked questions

Which providers are available?

Anthropic, OpenAI, Google Gemini, Mistral AI, DeepSeek, xAI, Groq and Moonshot. You call them all with the same ERHA key, through your space's profiles.

What is a profile?

A stable name your code calls, such as ticket-summary or contract-review. The profile says which provider and which model answer. Switching models happens in the console: your code does not change.

How do I track the cost of a feature?

Name a folder in the call, with the X-Erha-Folder header or the folder parameter. The console's API module shows, per key and per folder, the month's calls, tokens and cost.

How do I avoid a surprise bill?

Set a spending cap on the space, on the API or on one key. Once the cap is reached, calls are refused until the next period.

How is the API billed?

By usage: every call is measured and its cost is shown in the console. Usage goes through your plan's AI credit, then by usage within your caps.

Hand over your first piece of work this week

Open your space in a few minutes, or book a demo to scope a first use case with the ERHA team.