Skip to content

AI Services — Anthropic, OpenRouter & Claude Subscription

Services & Costs · AI Content Editing Architecture

Three different “Claude” products

ProductWhat it isPays for portal AI?
Anthropic APIPay-per-token API keys from console.anthropic.comYes — primary production path
OpenRouterMulti-model API gateway at openrouter.aiYes — if OPENROUTER_API_KEY is set
Claude Pro / Team / MaxChat subscription at claude.ai for humansNo — does not replace app API billing

Important: A Claude Pro subscription gives developers access to claude.ai in the browser. The Governance Portal backend calls the Messages API with ANTHROPIC_API_KEY or OPENROUTER_API_KEY. Those are billed separately on Anthropic Console or OpenRouter — unless your organisation has a specific enterprise/API bundle.

If your team uses Claude Pro for daily work, that cost is developer tooling, not application inference.


How the portal chooses a provider

Code: backend/src/lib/anthropic-client.ts

If OPENROUTER_API_KEY is set  →  OpenRouter (base URL openrouter.ai/api)
Else if ANTHROPIC_API_KEY     →  Direct Anthropic API
Else                          →  AI features disabled (500 on AI routes)

Model override (optional):

Env varExample
AI_MODELanthropic/claude-sonnet-4 (OpenRouter slug)
OPENROUTER_MODELSame
ANTHROPIC_MODELDirect Anthropic model ID

Default models in code include Claude Sonnet 4 / 4.5 depending on feature.


Pricing (indicative, August 2026)

Anthropic API (direct)

Model (examples)InputOutput
Claude Sonnet 4~$3 / MTok~$15 / MTok
Claude Sonnet 4.5Check anthropic.com/pricing

Billing: prepaid credits or invoiced — set spend limits in Anthropic Console.

OpenRouter

AspectDetail
BillingPrepaid credits; per-model pricing on openrouter.ai/models
MarkupSmall fee over provider price
BenefitOne key for multiple models; easy model switching via AI_MODEL

OpenRouter is useful if you want fallback models or consolidated billing across providers.

Claude Pro / Team (chat only)

PlanPriceIncludes API?
Claude Pro~$20/moNo — chat only
Claude Team~$25–30/user/moNo — team chat + admin
Claude MaxHigher tierNo

Estimated monthly spend

Usage profileEst. cost
Light (occasional AI edits, few users)€5–20
Moderate (regular content teams)€20–80
Heavy (bulk AI, many concurrent features)€80–200+

Controls in the app: Budget caps and feature flags where implemented — monitor Anthropic/OpenRouter dashboards weekly during rollout.


Environment variables

VariableRequiredDescription
ANTHROPIC_API_KEY✅*Direct Anthropic API key (sk-ant-...)
OPENROUTER_API_KEYIf set, overrides Anthropic (sk-or-v1-...)
OPENROUTER_BASE_URLDefault https://openrouter.ai/api
OPENROUTER_HTTP_REFERERAttribution for OpenRouter
OPENROUTER_APP_TITLEApp name for OpenRouter
AI_MODELGlobal model override

* At least one of ANTHROPIC_API_KEY or OPENROUTER_API_KEY required for AI features.

Set on Rendermqa-backend secrets. Never expose in VITE_* frontend vars.


Staging vs production

RuleWhy
Separate API key for stagingPrevent test traffic from consuming prod budget
Lower spend limit on staging keyAnthropic/OpenRouter dashboard caps
Do not share unlimited prod keySee STAGING-SETUP

Features using AI

Non-exhaustive list (see AI Content Editing Architecture):

  • Streaming content editing
  • Sharia compliance checker
  • Due diligence assessor
  • Tender / feasibility / vendor generators
  • Bulk AI edit, module replication
  • Masterplan concept generator

All share the same client in anthropic-client.ts.


ItemRecommendation
Production keyAnthropic Console or OpenRouter — pick one primary
Spend alertsEnable in provider dashboard at 50% / 80% of monthly budget
Staging keySeparate key, hard cap (e.g. €10/mo)
Claude Pro for devsOptional — improves developer productivity, not app runtime
Model policyDocument approved models for compliance (Sonnet 4+ for production)
AuditLog AI usage in application where available