# Khwan API

**Canonical:** https://apis.io/apis/khwan-ai/khwan-ai-api/  
**Provider:** Khwan — https://apis.io/providers/khwan-ai/  
**Base URL:** https://api.khwan.ai  
**Documentation:** https://docs.khwan.ai/api-reference

Khwan API is one of 2 APIs that [Khwan](https://apis.io/providers/khwan-ai/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 6 JSON Schema definitions. The published artifact set on APIs.io includes an OpenAPI specification and 6 JSON Schemas.

Khwan API as documented publicly: 17 operations. Contract generated from the documentation by API Evangelist (2026-11-13); not the provider's own document.

## Operations (17)

| Method | Path | Summary |
|---|---|---|
| GET | `/cores` | List the account’s cores (includes the virtual default ). |
| POST | `/cores` | Create a core. |
| DELETE | `/cores/{slug}` | Delete a core and its memory. |
| GET | `/cores/{slug}` | Fetch a single core. |
| PATCH | `/cores/{slug}` | Update a core’s name or context (the slug is immutable). |
| GET | `/learning` | How often this brain has had to be told the same thing twice. |
| GET | `/lessons` | The standing rules synthesis has written for the selected core, newest first. |
| DELETE | `/lessons/{id}` | Remove a rule the agent should not have learned. Admin only. |
| PATCH | `/lessons/{id}` | Correct a rule’s wording, keeping its source_link and use history. Admin only. |
| GET | `/memory` | Returns recent memory entries for the selected core. |
| GET | `/metrics` | Returns coherence / learning / usage metrics for the selected core. |
| POST | `/prepare` | Builds the context for one turn (memory + constitution + coherence). Does not call an LLM. |
| POST | `/record` | Persists your model’s answer and lets Khwan learn from the turn. |
| POST | `/sync` | Triggers a learning / consolidation pass for the selected core (distilling lessons from recent turns). |
| POST | `/synthesize/prepare` | Everything synthesis does before a model is needed — handed to you instead. Admin only, and no model is called. |
| POST | `/synthesize/record` | Store the rules your model distilled, and close the pass. Admin only. |
| POST | `/verify` | Scores a model’s answer against the brain after it was produced, so a host can block or rewrite a reply before it ships. |

## Machine-readable artifacts (7)

- **OpenAPI** — https://artifacts.apis.io/khwan-ai/openapi/_ae-authored/khwan-ai-openapi-generated.yml
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-post-prepare-response-schema.json
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-post-verify-response-schema.json
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-post-prepare-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-post-cores-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-get-learning-response-schema.json
- **JSONSchema** — https://artifacts.apis.io/khwan-ai/json-schema/khwan-ai-post-verify-request-schema.json

## Other Khwan APIs (1)

- [Khwan API](https://apis.io/apis/khwan-ai/api/)

## Use this from code or an agent

- **REST, no key:** `GET https://apis.io/api/v1/providers/khwan-ai` returns the provider's full profile as JSON.
- **MCP:** `https://apis.io/mcp` (Streamable HTTP) — search the catalog, read any provider, compare providers, check agent readiness.
- **Free API key** for catalog-wide search, ratings and comparisons: sign in with GitHub, Google or LinkedIn at https://apis.io/developer/account/ (plans: https://apis.io/developer/plans/).

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/khwan-ai/khwan-ai-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/khwan-ai/.
