This page explains which texts of a request are counted as tokens and billed.
Prices are not written here: GET /v1/models lists the price of each model on your plan.
Currency. Prices, credits, the balance and the spend limit are in euros (EUR). The API gives amounts as plain
numbers, without a currency sign or code: price.per_million in GET /v1/models and the estimated cost of a batch
in 402 payment_required.
What is counted
Section titled “What is counted”One rule for every model: the tokens of the texts you send, each counted once; nothing the service adds.
Cordon takes no text of yours beyond the document, so for Cordon the rule counts the document alone. Each model
counts with its own tokenizer; every response says what was counted in usage.input_tokens. Only a 200 answer is
billed; see Errors.
Inola Decider
Section titled “Inola Decider”usage.input_tokens of decider-mini is the sum of the tokens of:
- the document,
input.state, once, however many questions you ask. A state sent as a JSON object or array is counted as its JSON text; - for each question: its
instructions; - for each question: the text of each criterion or option you give in
criteria. Achoiceoption without a description is counted by its name.
Not counted:
- the JSON envelope: keys, braces,
type, the question keys and the option names that have a description; - the default wording of a yes/no question (
noul) asked withoutcriteria; - the service’s own text around your document and questions;
- the document read again for each question.
usage.output_tokens is always 0: the model chooses among your options and does not generate text.
Inola Cordon
Section titled “Inola Cordon”usage.input_tokens of cordon-mini is the tokens of the document, input.state (or input.text). A
question to Cordon names a kind of detection ("instructions": "ipi") instead of
carrying your text, so it adds no tokens: the same document costs the same with or without input.questions.
usage.output_tokens is 0.
Worked example: Inola Decider
Section titled “Worked example: Inola Decider”A support ticket and two questions: a yes/no (noul) and a choice of three described options (choice).
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?"}, "category": {"type": "choice", "instructions": "What is this ticket about?", "criteria": {"billing": "payments and invoices", "technical": "the product does not work", "other": "anything else"}}}}}'Python
Section titled “Python”import os
import requests
API_URL = "https://api.inola.ai"API_KEY = os.environ["INOLA_API_KEY"]
response = requests.post( f"{API_URL}/v1/infer", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "decider-mini", "input": { "state": "I was charged twice. Please fix this ASAP.", "questions": { "billing": {"type": "noul", "instructions": "Is this ticket about billing?"}, "category": {"type": "choice", "instructions": "What is this ticket about?", "criteria": {"billing": "payments and invoices", "technical": "the product does not work", "other": "anything else"}}, }, }, }, timeout=30,)response.raise_for_status()usage = response.json()["usage"]print("input tokens", usage["input_tokens"], "tokens counted", usage["tokens"])JavaScript
Section titled “JavaScript”const API_URL = "https://api.inola.ai";const response = await fetch(`${API_URL}/v1/infer`, { method: "POST", headers: { Authorization: `Bearer ${process.env.INOLA_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ model: "decider-mini", input: { state: "I was charged twice. Please fix this ASAP.", questions: { billing: { type: "noul", instructions: "Is this ticket about billing?" }, category: { type: "choice", instructions: "What is this ticket about?", criteria: { billing: "payments and invoices", technical: "the product does not work", other: "anything else" } }, }, }, }),});if (!response.ok) { const { error } = await response.json(); throw new Error(`${response.status} ${error.code}: ${error.message}`);}const { usage } = await response.json();console.log("input tokens", usage.input_tokens, "tokens counted", usage.tokens);Response:
{ "id": "req_01JBXQ7M3T8K2V9R4N6PZC5HDA", "model": "decider-mini", "version": "1.3.0", "output_schema_id": "decision.v1", "output": { "answers": { "billing": {"type": "noul", "noul": 0.97}, "category": {"type": "choice", "choice": "billing", "probabilities": {"billing": 0.95, "technical": 0.03, "other": 0.02}} } }, "usage": {"input_tokens": 32, "output_tokens": 0, "tokens": 32, "latency_ms": 62}, "created_at": "2026-11-16T12:00:00Z"}The 32 input tokens:
| text | where in the request | tokens |
|---|---|---|
I was charged twice. Please fix this ASAP. | state | 10 |
Is this ticket about billing? | questions.billing.instructions | 6 |
What is this ticket about? | questions.category.instructions | 6 |
payments and invoices | questions.category.criteria.billing | 3 |
the product does not work | questions.category.criteria.technical | 5 |
anything else | questions.category.criteria.other | 2 |
| total | usage.input_tokens | 32 |
The document is counted once for both questions; the keys, the type fields and the rest of the JSON are not
counted. A third question would add only its own texts.
Example: Inola Cordon
Section titled “Example: Inola Cordon”One document checked by Cordon, with a question named page:
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.", "questions": {"page": {"type": "noul", "instructions": "ipi"}}}}'Python
Section titled “Python”import os
import requests
API_URL = "https://api.inola.ai"API_KEY = os.environ["INOLA_API_KEY"]
response = requests.post( f"{API_URL}/v1/infer", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "cordon-mini", "input": { "state": "Meeting notes, 14 October: the vendor contract renews on 1 March.", "questions": {"page": {"type": "noul", "instructions": "ipi"}}, }, }, timeout=30,)response.raise_for_status()usage = response.json()["usage"]print("input tokens", usage["input_tokens"], "tokens counted", usage["tokens"])JavaScript
Section titled “JavaScript”const API_URL = "https://api.inola.ai";const response = await fetch(`${API_URL}/v1/infer`, { method: "POST", headers: { Authorization: `Bearer ${process.env.INOLA_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ model: "cordon-mini", input: { state: "Meeting notes, 14 October: the vendor contract renews on 1 March.", questions: { page: { type: "noul", instructions: "ipi" } }, }, }),});if (!response.ok) { const { error } = await response.json(); throw new Error(`${response.status} ${error.code}: ${error.message}`);}const { usage } = await response.json();console.log("input tokens", usage.input_tokens, "tokens counted", usage.tokens);Response:
{ "id": "req_01JBXV8M0P2R4T6W8Y0A2C4E6G", "model": "cordon-mini", "version": "2.2.1", "output_schema_id": "decision.v1", "output": {"answers": {"page": {"type": "noul", "noul": 0.01, "threshold": 0.5, "verdict": false, "verdicts": {"fpr_1e-03": false, "fpr_1e-04": false}}}}, "usage": {"input_tokens": 16, "output_tokens": 0, "tokens": 16, "latency_ms": 35}, "created_at": "2026-11-01T12:00:00Z"}All 16 input tokens are the document’s. The question page adds none: without input.questions the same document
is answered under injection and gives the same usage.
Reading usage
Section titled “Reading usage”Every POST /v1/infer response carries usage: input_tokens, the basis of billing; output_tokens, 0 for
decider-mini and cordon-mini; tokens, the input tokens counted against the token limits of your plan;
latency_ms, the processing time.
POST /v1/chat/completions reports the same counts in the OpenAI form: usage.prompt_tokens is input_tokens,
usage.completion_tokens is output_tokens.
Usage by day, model and key is in the console (Usage).
The minimum per request
Section titled “The minimum per request”A real-time request shorter than the model’s minimum is billed as the minimum; usage still shows the tokens
counted. The minimum, if a model has one, is price.min_tokens_per_request in GET /v1/models. Batch items have no
minimum.
Batches
Section titled “Batches”- Items are counted by the same rule and billed at
price.batch_pctof the real-time price (GET /v1/models). - Only completed items are billed; items in the error file are not.
- When a batch is cancelled, items answered before it are billed; items not started are not run or billed.
Errors
Section titled “Errors”Only a 200 answer is billed; no error answer is.
| status | codes | billed |
|---|---|---|
200 | — | yes: usage.input_tokens at the model’s price (at least the minimum, if any) |
400, 401, 402, 403, 404, 410, 413 | every code | no |
429 | every code, among them overloaded, maintenance, serverless_cold | no |
500, 503 | every code | no |
- If the service does not get the model’s answer in time, the request ends with
503 unavailableand is not billed. - A request is not cancelled when your client closes the connection or stops waiting. If the model answers it, it is billed as a successful request, even though your client did not receive the answer. Set your client’s timeout longer than the time the model needs, and retry only after an error answer.
Each code is explained in Error codes.
Credits, allowances and the spend limit
Section titled “Credits, allowances and the spend limit”Use beyond the plan is paid from credits.
Allowances and the spend limit are in the console
(https://console.inola.ai, Billing). With no credits left, requests return
402 payment_required; at a limit,
429 monthly_token_limit or
429 spend_limit_reached.
Next steps
Section titled “Next steps”- Inola Decider — the questions it answers.
- Inola Cordon — the detector and its questions.
- Limits and retries — the limits of your plan and the answers when one is reached.
- Batches — large volumes.
- Glossary — the terms used here.