# Framework knowledge

> For AI agents: the complete documentation index is at https://docs.ismscopilot.com/llms.txt.

URL: https://docs.ismscopilot.com/docs/api/framework-knowledge
Markdown: https://docs.ismscopilot.com/docs/api/framework-knowledge.md

Why the ISMS Copilot API is not any model: curated framework modules injected before the answer, with auto/none/pin controls and a public catalog.

The ISMS Copilot API is OpenAI-compatible on the wire. That is how you call it. The product is **framework knowledge**: curated modules assembled into the prompt before generation, so completions about ISO 27001, SOC 2, GDPR, and the rest of the catalog are grounded in a maintained reference instead of training recall plus a persona you wrote.

Marketing argument: [Why the ISMS Copilot API instead of any model](https://www.ismscopilot.com/learn/isms-copilot-api-vs-any-model).

## Why this is not any model

A generic completions API gives you tokens. If you need a compliance-literate answer you must:

1. Write a system prompt that pretends the model is a specialist.
2. Retrieve and maintain your own corpus of standards, transpositions, and edition notes.
3. Guess, after the fact, which source (if any) the model used.

This API does those three jobs server-side. You keep the OpenAI request shape. You do not keep a standards RAG stack.

  The model can still be wrong. Knowledge injection grounds the answer when a module is selected. It is not a claim that hallucinations are impossible, and it is not an audit opinion.

## What gets injected

When a module is selected, the server appends that module's curated reference to the assembled prompt (after your system/developer messages when the published server prompt is active). Modules carry identifiers, concise titles, and original reference notes. They are **not** a dump of copyrighted ISO or AICPA text.

Intellectual-property rules live in the published [Reference Integrity](https://docs.ismscopilot.com/docs/api/system-prompt) suffix: identifiers and concise titles may be used; explanations must be original phrasing; verbatim copyrighted standard text is declined.

Your own documents (policies, evidence, risk registers) are not in this catalog. Send them in `messages`, or retrieve them yourself and pass them in.

## How selection works

The `ismscopilot` request extension controls injection. Omission uses the defaults.
```json
{
  "model": "isms-fast",
  "messages": [{ "role": "user", "content": "List ISO 27001 access control themes." }],
  "ismscopilot": { "frameworks": "auto" }
}
```
| Value | Effect |
| --- | --- |
| `"auto"` (default) | Detection over user messages and the last assistant turn selects matching modules. |
| `"none"` | No knowledge injected. No knowledge tokens billed. |
| `["ISO_27001", "SOC_2"]` | Pin exactly these modules (max 8), regardless of detection. |

Valid ids come from the public catalog:
```
GET https://api.ismscopilot.com/v1/frameworks
```
The catalog listed **144** modules on 2026-10-25, including one NIS 2 module per EU member state (`NIS_2_NL`, `NIS_2_IT`, and so on). Treat the live endpoint as authoritative. Do not hard-code the count. Each entry carries the `version` it tracks and a `last_verified` date: when that module's edition was last checked against its official publisher, not a guarantee that every sentence is correct.

Knowledge changes since the 2026-08-25 baseline are listed at `GET https://api.ismscopilot.com/v1/frameworks/changelog` (public, `ETag`, one-hour cache): event type, date, module ids, a note and usually the official source. Building a product with customers in several countries? Pin per customer and follow the changelog: [Serve customers in many countries](https://docs.ismscopilot.com/docs/api/serve-customers-in-many-countries).

Full schema, opt-out of the persona (`ismscopilot.system: "none"`), and the verbatim prompt text: [The API system prompt, in full](https://docs.ismscopilot.com/docs/api/system-prompt).

## In the model name

Some tools only let you set a model name: the n8n OpenAI Chat Model node, or a gateway or no-code model step that does not forward custom fields. In a proxy such as LiteLLM, a pinned model name is also simpler than a per-entry `extra_body`. For those, put the pin in the model name: one of the five aliases, a colon, then up to 8 comma-separated catalog ids.
```json
{
  "model": "isms-fast:NIS_2_DE",
  "messages": [{ "role": "user", "content": "Which incidents must we report, and to whom?" }]
}
```
- `isms-fast:NIS_2_DE` pins the German NIS 2 module, exactly like `"ismscopilot": { "frameworks": ["NIS_2_DE"] }`. Several modules: `isms-fast-eu:GDPR,ISO_27001`.
- Works on all five aliases: `isms-fast`, `isms-thinking`, `isms-fast-eu`, `isms-thinking-eu`, `isms-mini`.
- Same price and same backend as the base alias.
- Ids are the exact, case-sensitive catalog ids from `GET /v1/frameworks`. An unknown id returns `400` `framework_not_found`. `:none` and `:auto` are not accepted: for those, use the plain alias (`auto`) or the request field (`"none"`).
- Use the suffix or `ismscopilot.frameworks`, not both: sending both returns `400` `framework_conflict`, even when they agree. `ismscopilot.system` still combines with the suffix.
- Responses echo the base alias (`"model": "isms-fast"`). The pin shows in the `x-isms-frameworks` header and the `ismscopilot` response object.
- `GET /v1/models` still lists the five aliases only. `GET /v1/models/isms-fast:NIS_2_DE` returns `200` when the id is valid (`404` while extensions are switched off), so SDKs that look a model up before calling it accept the name.

## What the response tells you

Successful completions disclose what ran:

- Header `x-isms-frameworks`: injected module ids
- Body `ismscopilot` object: module ids, `knowledge_characters`, and a labelled token estimate (`knowledge_tokens_method: "chars_div_3_v1"`)

The estimate is not a billed-token delta. Billing truth stays `usage.prompt_tokens`. Everything added server-side (persona, labels, knowledge, policies) is part of the prompt and is billed as input.

## Honest limits

- **Detection is name-level in `auto`.** A bare control id such as `5.23`, with no framework name, can inject nothing. Pin the module when you already know the framework.
- **Selection is not a search over the full standard.** The injected text is the curated module, not a retrieved paragraph from a private PDF of the standard.
- **This API is not the chat app.** Workspaces, uploads, memories, and audit-shaped tools are chat features. Completions do not create hosted files.
- **Guidance, not legal advice.** Recommend human review where the stakes require it. Do not put that caveat inside a user-requested artefact unless asked.

  If you send the `ismscopilot` field while extensions are disabled on a deployment, the API returns a deterministic `400` with code `ismscopilot_extension_disabled`. It does not silently ignore `"none"`. A model name with a framework suffix gets the same `400` there.

## First request that should trigger knowledge
```bash
curl https://api.ismscopilot.com/v1/chat/completions \
  -H "Authorization: Bearer sk-isms-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "isms-fast",
    "messages": [
      {"role": "user", "content": "What does ISO 27001 say about supplier relationships?"}
    ]
  }'
```
Check `x-isms-frameworks` on the response. If you already know the module, pin it:
```json
{ "ismscopilot": { "frameworks": ["ISO_27001"] } }
```
Or set `"model": "isms-fast:ISO_27001"` and leave the body as it is.

## Related

- [Get an API key and first completion](https://docs.ismscopilot.com/docs/api/get-api-key)
- [The API system prompt, in full](https://docs.ismscopilot.com/docs/api/system-prompt)
- [Models and regions](https://docs.ismscopilot.com/docs/api/models-and-regions)
- [Zero Data Retention](https://docs.ismscopilot.com/docs/api/zero-data-retention)
- Product page: [ismscopilot.com/products/api](https://www.ismscopilot.com/products/api)
