cognita api

Every outbound API call, through one door you control.

cognita api is a gateway for the calls your applications make to outside services: AI models, search, data and SaaS APIs. Applications hold a gateway key, never the vendor's. The gateway checks who is calling and what they may call, classifies what the call carries, masks or blocks sensitive data before it leaves, and writes every call to a log.

  • Keys and grants
  • Data classification
  • Local-model sanitisation
  • AI usage and budgets
  • Full call log

Built and tested; a pilot has not started. Where it stands.

/
The cognita api dashboard: calls over time, the busiest services and consumers, why calls were refused, and data leaving by sensitivity label
The dashboard: volume, refusals and what left, by sensitivity label. It reads degraded because one of a service's two targets is failing in this demonstration.
How a call travels

The application knows the gateway. Only the gateway knows the vendor.

An application calls the gateway with its own key. The gateway works out who is calling, checks the grant, runs the plugins that apply, adds the vendor's credential and forwards the call through an egress proxy that reaches only the hosts you list. The answer comes back the same way.

How a call travels through cognita api Your applications call the gateway with a gateway key, a signed token or a client certificate. The gateway identifies the consumer, checks its grant for the service, applies limits, classifies the data, masks or blocks it, optionally asking a local private model on your own network to find names, then adds the vendor credential and writes the call to the log. The call leaves through an egress proxy with an allow-list to the external services: AI models, search, data and SaaS APIs. A console configures the gateway and shows monitoring, the call log, alerts and AI usage. Your applications consumers a gateway key, a signed token, or a client certificate cognita api gateway in order, on every call 1 Who is calling, and may they? 2 Limits, quotas, budgets 3 Classify the data, mask or block 4 Write the call to the log 5 Add the vendor credential, forward 6 Restore masked values in the answer Egress proxy listed hosts only External services AI models search and data APIs SaaS platforms Local private model on your network; finds names before masking Console configuration, monitoring, call log, alerts, AI usage call answer text, already pattern-masked
The vendor's credential is sealed so that only the gateway process can open it; the console that stores it cannot read it back.
  • ServicesAn upstream API: where it lives, its credential, timeouts, retries, and one or more targets with health checks
  • RoutesThe paths and methods a service exposes, and which proofs of identity each accepts
  • ConsumersAn application that calls, with an owner who can manage its keys and see its calls
  • KeysShown once, stored as a hash, with an end date; rotated with an overlap so nothing stops
  • GrantsWhich consumer may call which service. No grant, no call
  • PluginsAttached globally, to a service, a route, a consumer or a pair; the most specific one wins
Data classification for AI calls

The label on the data decides whether the call may reach an outside model.

Before a prompt leaves for an external model, the gateway reads it, gives the call a sensitivity label, and acts on that label: let it through, mask the sensitive values, or refuse the call. The application that sent it needs no change.

  1. Scan. Patterns with checks find what has a shape: credentials and tokens, payment cards, national IDs, account numbers and IBANs, e-mail addresses, phone numbers, dates of birth, addresses, IP addresses and internal host names. Your own listed terms, such as a project's code name, are found too. A local private model finds what has no shape.
  2. Label. Each kind of value carries a label and the call takes the highest one found. A caller may declare a label in a header; that can raise the call's label and never lower it.
  3. Act. Each label has an action you set: allow, mask or block.
  4. Mask and restore. Each value is swapped for a numbered placeholder, the same value always the same placeholder within the call. With the optional token vault switched on, a value keeps its placeholder across all of an application's calls, so a model can follow a person or a company from one call to the next; the vault keeps a keyed fingerprint and the placeholder, never the value, credentials always get a fresh placeholder, unused placeholders are forgotten after a set number of days, and an application's vault can be emptied from the console. The model sees only placeholders. When its answer uses them, the gateway puts the values back before the caller sees it, in JSON, plain text or a live stream.
LabelFound, by defaultDefault action
CriticalCredentials, payment cards, national IDsBlock the call
SensitiveNames, e-mail, phone, dates of birth, addresses, bank accounts, listed termsMask, then send
InternalIP addresses, host names and URLs, organisationsMask, then send
PublicNothing foundSend as it is
One call — label: sensitive · action: masked
the application sends
Summarise the complaint from Dana Whitfield
(dana.whitfield@northwind.example), account NW-0042-7781.

the outside model receives
Summarise the complaint from [PERSON_1]
([EMAIL_1]), account [ACCOUNT_1].

the application gets back
Dana Whitfield reports a duplicate charge on NW-0042-7781 ...
Invented names and numbers. The map from placeholder to value lives in memory for the length of the call; it is not stored and not logged. The optional token vault stores only a keyed fingerprint and the placeholder.
Start by watching

Monitor mode

Label and record every call and change nothing, so you can read what would be masked or blocked before you enforce it.

Both directions

Answers too

The same detectors can read what comes back: record it, redact it, or refuse an answer at or above a label you choose.

On the record

Counts, never values

The call log keeps the label, the action and how many values of each kind were found. Kept payloads are what crossed the boundary: masked.

Classification decides what happens to a call on the service it was sent to: allowed, masked or refused. The gateway does not move a call to a different model by itself.

Sanitisation with a local model

A model on your own network reads the text first, so the outside one never sees the names.

Patterns cannot find a person, a company or a place named in running prose. A private model can. The gateway asks a model you host to name them, then masks what it names with the same reversible placeholders, before the call goes to the external model.

Your model

Any OpenAI-style endpoint

The local model is a gateway service marked internal, with a chat completions API, as vLLM, Ollama and others provide. A second person confirms an internal service's address before it is used.

Least exposure

It sees masked text

What the patterns found is already replaced by placeholders when the local model is asked, so even it does not see the card numbers or credentials.

Cannot invent

Word for word, or ignored

A name the model returns is used only if it occurs in the text exactly. A wrong answer cannot add or change anything in the call.

Your trade-off

Every call, or only risky ones

Ask the model for every call, the only way to catch a name in otherwise clean text, or only once patterns have already found something. The first adds the model's response time to each call.

Fails closed

No model, no call

If the local model cannot be reached the call is refused, unless you choose to continue on patterns alone.

Stated plainly

Not a proof

Patterns find what has a shape and a model finds most of the rest; neither finds everything. Images, audio and files inside a body are not inspected.

AI usage

Tokens and cost per application, with a budget that holds.

A model API reports how many tokens a call took. The gateway reads that as the answer passes, without changing a byte, and records the model, tokens in and out, and the cost at prices you set.

Metering

By model, consumer and service

Understands the usage formats of the common model APIs, in one answer or spread over a stream.

Budgets

Tokens per day or month

Per consumer. The call that crosses the line completes; the next is refused until the period resets, and an alert fires at 80%.

Self-service

Owners see their own

A consumer's owner sees its calls, usage and keys, and nothing of anyone else's.

Console tour

The console in eight screens.

From the dashboard to a single call: what is running, what was refused and why, what left under which label, and what it cost. About two minutes.

  1. Watch2 steps
  2. Configure3 steps
  3. Account for3 steps
Step 1 of 8

What left, and under which label.

Every call in the period: allowed, refused or failed. Below the chart, the data that left by sensitivity label, and how much was sent as it was, masked and restored, blocked, or only recorded.

/
The dashboard with call totals, calls over time, data leaving by sensitivity and the busiest services and consumers
Step 2 of 8

Is the gateway up, and are the services behind it?

Each worker and the configuration version it serves, calls and response time by the minute, and every service's health. Here one of a service's two targets is failing, so the gateway says so and sends its calls to the other.

/monitoring
The monitoring page with gateway workers, configuration version, calls per minute, response time and service health
Step 3 of 8

Every outside API in one list.

Where each service forwards, whether it is external or internal, and how the gateway presents its credential. An internal address waits for a second person to confirm it.

/services
The services list with address, external or internal, credential type and state
Step 4 of 8

Targets, routes and who may call.

A service's targets with their weight and health, the routes that lead to it with the proof of identity each accepts, and the consumers granted access.

/services · one service
One service with its targets and their health, routes and the consumers that may call it
Step 5 of 8

Four labels, and what happens to each.

What to look for, the label each kind of value carries, and whether a call of each label is allowed, masked or blocked. Your own terms, such as a project's code name, get a label too.

/services · data loss prevention
The data loss prevention form with the action per label, the kinds of value to look for and listed terms
Step 6 of 8

One call, in full, without its contents.

Who called, the model, tokens and cost, the label found, and what was done: here values were masked, then put back in the answer. The log keeps kinds and counts, never the values.

/calls
The call log with one call expanded showing the data class, what data loss prevention did and the counts found
Step 7 of 8

Tokens and cost, by model and by application.

Read from each answer as it passes, at prices you set. A model on your own network is metered too, with no cost against it.

/usage
AI usage with totals, tokens per hour and tables by model, consumer and service
Step 8 of 8

What needs someone's attention.

A failing target, a token budget at 86%, a key about to expire: open until the condition ends, with who acknowledged it. The rules and their thresholds are below.

/alerts
Open alerts with who acknowledged each, and the alert rules
Controls

What stands between an application and a vendor.

ControlWhat it does
IdentityA gateway key, a signed token checked against a registered issuer's keys, or a client certificate. Each route says which it accepts.
AccessA consumer reaches a service only with a grant. Unauthenticated calls are logged up to a limit per address, then refused.
Vendor credentialsAPI key, bearer token, basic or OAuth 2 client credentials, sealed so that only the gateway process can open them, added to the call on the way out.
LimitsRate limit, quota, request size, address restriction and a maintenance switch, per service, route or consumer.
EgressThe gateway has one way out: a proxy that carries HTTPS only to the hosts in a list kept apart from the gateway's own configuration. Private address ranges are refused.
Call logA row is written before the call is forwarded: who, what, when, outcome, sizes, label and action. Query strings stay out of every log. Payloads are kept only where you switch that on, sealed, and opening one needs a fresh authenticator code.
ResilienceRetries on connection failures only, a circuit breaker per service, several weighted targets with health checks and failover, a response cache, streamed large bodies and WebSocket routes.
AlertsGateway not reporting, a service failing or held back, a target down, keys about to expire, a budget nearly used, export behind. Open until the condition ends, with an optional webhook.
Change historyWho changed what in the configuration, with the fields before and after, on a hash-chained audit log. The whole configuration exports as a file and imports with a dry run.
Separation of dutiesOperators manage services and consumers; security officers manage plugins, token issuers and alert rules; auditors read; consumer owners see their own. No single role holds every permission.
OperationsMetrics for Prometheus, the call and audit logs to your SIEM over TLS, retention you set, a call log partitioned by month, and several gateway replicas behind one address.
Where it stands

Built and tested. Not yet piloted.

cognita api runs as its own installation, on the same foundations as the rest of the family: sign-in with an authenticator or your identity provider, roles, a hash-chained audit log and Docker Compose. It has been exercised end to end on a local stack. No institution runs it in production yet.

What is true today

  • Everything on this page is built and covered by automated tests.
  • Checked on a running stack against a simulated upstream and a simulated local model, and against one public API through the egress proxy.
  • cognita grc and cognita soc do not send their model calls through it; they keep their own AI gateway. Joining them is a later step.

What it does not do yet

  • Not yet run against a real hosted local model or a live vendor model stream.
  • Reaching internal services elsewhere on a corporate network from the hardened stack needs a network path that is not built.
  • One database: the gateway is as available as its PostgreSQL. Backups with a restore drill are planned.
  • WebSocket frames are relayed, not inspected; a route with enforcing data loss prevention refuses them.
cognita api

Bring one outbound integration to the demo.

We will put it behind the gateway, call it with a gateway key, turn classification on in monitor mode, and read what the log says left.

cognita api screenshots show a fictional bank's demonstration data: invented services, consumers, calls and costs, with a simulated upstream.