Rana AI — Chat & API

Rana API

One authenticated entry point into every Rana AI capability.

Every Rana product — Rana Brain, Rana Dive, and every Rana Plug-in — is reachable through the same API. One key, one integration point, and the optimization, grading, and cost-control layer underneath every one of them comes along for free.

Access

Authentication & access control

API key authentication

Every request authenticates with a Bearer API key issued to your account. Simple, standard, and how every Rana integration in production works today.

Customer sub-keys

Issue scoped sub-keys under your own parent key so you can offer Rana-powered features to your own customers — each sub-key's usage is tracked and capped independently of the others, and independently of yours.

OAuth 2.0 (planned)

OAuth 2.0 client-credentials support is on the roadmap for teams that need it as part of a broader identity setup. API-key auth is what's live today.

Usage & billing

Track it, cap it, bill it — down to the customer

Prompt request logging

Full request and response capture is available per key, encrypted at rest, so you have a real audit trail when you need to see exactly what a call sent and got back.

Per-customer usage tracking

Every call is attributed down to the sub-key and end user that made it, so "how much did this one customer actually use" is always a real number, not an estimate.

Bill your own customers

Usage is broken out per sub-key, so you can invoice your own customers for exactly what they consumed instead of eating the cost or guessing at a flat fee.

Set your own markup

Add your own margin on top of usage costs when you resell metered AI access — the economics are yours to set, not fixed by us.

Budget caps that actually hold

Hierarchical spend and request caps — company, sub-company, and individual user — are enforced before a call goes out, not after the invoice arrives.

Under every call

The optimization layer

Prompt Engineering Optimization

Vague or underspecified prompts get rewritten against four building blocks — Role/Context, Task, Audience, Format — before they ever reach a model. Optional, and off by default when exact wording matters.

Model & Prompt Route Optimization

Every request is routed to whichever model in a real, evaluated pool actually fits that specific kind of task, instead of a single fixed model handling every call.

Model Cost Optimization

Routing weighs quality against price, so you're not paying frontier-model rates for a question a smaller, cheaper model could have answered just as well.

Response grading

Every response is graded before it's billed. One that grades below quality threshold is a $0 chargeback, and it's automatically retried on a stronger model.

Provider fallback

An automatic fallback chain moves to the next-best model when a provider errors or rate-limits, so an outage on their end doesn't become an outage on yours.

Built-in abuse & safety moderation

Every request passes a moderation gate before it ever reaches a model — the same gate, whether the caller is a paying customer or a public demo visitor.