# Inola API overview

> What the Inola API does - three models, Inola Decider, Inola Resolver and Inola Cordon, one endpoint for all of them, and where each one fits.

This page describes the Inola API: the three models it serves, the one endpoint they are called through, what the
Cordon detects and what it leaves to you, and where a check sits in an AI system. No account is needed
to read it; making a request needs an [API key](https://inola.ai/docs/reference/glossary.md#api-key).

## What the API does

Inola models return a decision, a passage from your document, or a verdict, not text to parse. One API, processed
in the EU. The API serves three [models](https://inola.ai/docs/reference/glossary.md#model):

| model | what it does | name in the API | access |
|---|---|---|---|
| [Inola Decider](https://inola.ai/docs/models/decider.md) | Answers your questions about a document: yes or no, one of your choices, or a score on your scale. Routing, filtering and policy checks become a single API call. | `decider-mini` | with an API key |
| [Inola Resolver](https://inola.ai/docs/models/resolver.md) | Everything Inola Decider does, and it also answers an open question with a quote from the document, or "unsure" when the document does not say. | — | closed access: early access on request |
| [Inola Cordon](https://inola.ai/docs/models/cordon.md) | Indirect prompt injection detection for everything your AI system reads: retrieved documents, browsed pages, emails, tool and agent outputs. | `cordon-mini` | with an API key |

Every model is called through one endpoint, `POST /v1/infer`: the request names the model and gives its `input`, and
the response carries the model's result in `output`, in the same envelope for every model. Inola Decider and the
Cordon both take the document in `input.state` and return their answers in `output.answers`: the
detector is a decision model with one built-in yes-or-no question. `GET /v1/models` lists the models of your plan.
The `input` of each model is on its page. One request to Inola Decider:

```bash
curl -sS "https://api.inola.ai/v1/infer" \
  -H "Authorization: Bearer $INOLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "decider-mini", "input": {"state": "I was charged twice. Please fix this ASAP.", "questions": {"billing": {"type": "noul", "instructions": "Is this ticket about billing?"}}}}'
```

- All requests and responses are JSON over HTTPS, UTF-8. The base URL is `https://api.inola.ai`.
- Two modes: **real-time** (one document per request, the answer in the response) and **batch** (a file of
  documents, results as they are ready). See [Batches](https://inola.ai/docs/guides/batches.md).

## Real-time and batch

| name in the API | model | real-time | batch |
|---|---|---|---|
| `decider-mini` | [Inola Decider](https://inola.ai/docs/models/decider.md) | while running | yes |
| `cordon-mini` | [Inola Cordon](https://inola.ai/docs/models/cordon.md) | yes | yes |

A real-time request to a model available only through batches in your region returns `400 batch_only`; one to a
model that is not running at the moment may wait minutes for it to start, or return `429 serverless_cold`.
Inola Resolver is in closed access and is not in this table. `GET /v1/models` lists the models of your plan with
their versions, prices and `availability` in your region. See [Models and versions](https://inola.ai/docs/concepts/models-and-versions.md).

## Inola Cordon

The rest of this page describes Cordon, a detector of **indirect prompt injection**: instructions hidden
in documents, web pages, emails or tool outputs that your AI system reads and that try to make an AI system do something its user did not ask for.
It receives a text and returns a [verdict](https://inola.ai/docs/reference/glossary.md#verdict): whether the text contains an injection, a
[score](https://inola.ai/docs/reference/glossary.md#score) between 0 and 1.

### What it detects and what it does not

| case | covered |
|---|---|
| Instructions inside the data an AI system reads: retrieved documents, web pages, emails, files, tool and API outputs (indirect injection) | yes: this is the task of the detection model |
| What the AI system does with a flagged text | no: the API returns a verdict; the decision to drop, quarantine or pass the text stays with you |
| Requests a user types to the system directly | a separate case, not described on this page |
| Changing or cleaning the text | no: the text is checked as sent and is not modified |

### Where the check sits

The check runs on text **before** the AI system reads it:

- **RAG pipeline:** between retrieval and the prompt. Each retrieved document is checked; a document with
  `output.answers.injection.verdict: true` is left out of the context. See [Protect a RAG pipeline](https://inola.ai/docs/guides/protect-a-rag-pipeline.md).
- **Agent:** between a tool call and the next model call. The output of each tool that reads outside content (a web
  page, an email, a file) is checked before it is appended to the conversation. See
  [Protect an agent](https://inola.ai/docs/guides/protect-an-agent.md).
- **Large volumes:** a whole corpus is checked at once through the Batch API, for example before indexing.

One check is one HTTP call to `POST /v1/infer`, the endpoint every model is called through: the request names the
model and gives its `input`, the response carries the model's answer in `output.answers.injection`.

```bash
curl -sS "https://api.inola.ai/v1/infer" \
  -H "Authorization: Bearer $INOLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "cordon-mini", "input": {"state": "Meeting notes, 14 October: the vendor contract renews on 1 March. Legal reviews the new terms before the end of the year."}, "options": {"threshold": 0.5}}'
```

Response:

```json
{
  "id": "req_01JBXQ7M3T8K2V9R4N6PZC5HDA",
  "model": "cordon-mini",
  "version": "2.2.1",
  "output_schema_id": "decision.v1",
  "output": {
    "answers": {
      "injection": {"type": "noul", "noul": 0.02, "threshold": 0.5, "verdict": false,
                    "verdicts": {"fpr_1e-03": false, "fpr_1e-04": false}}
    }
  },
  "usage": {"input_tokens": 27, "output_tokens": 0, "tokens": 27, "latency_ms": 41},
  "created_at": "2026-11-16T12:00:00Z"
}
```

Clients written for an earlier request form keep working; see [Compatibility](https://inola.ai/docs/reference/compatibility.md).

## Cost

Requests are billed in [tokens](https://inola.ai/docs/reference/glossary.md#token) of your input. Each model has its own price per token;
prices are listed by `GET /v1/models` for your key. Rejected requests are not
billed. See [Tokens and billing](https://inola.ai/docs/concepts/tokens-and-billing.md).

## Next steps

- [Create an account](https://console.inola.ai/signup) in the console, then an API key under **API keys**.
- [Quickstart](https://inola.ai/docs/quickstart.md) — the first request in curl, Python and JavaScript, the response and the errors.
- [Inola Decider](https://inola.ai/docs/models/decider.md), [Inola Resolver](https://inola.ai/docs/models/resolver.md),
  [Inola Cordon](https://inola.ai/docs/models/cordon.md) — what each model does and its request.
- [Authentication](https://inola.ai/docs/authentication.md) — API keys and their permissions.
- [Verdicts and scores](https://inola.ai/docs/concepts/verdicts-and-scores.md) — how to read the response.
- [API reference](https://inola.ai/docs/reference/api.md) — every endpoint, field and error.
