Import an OKF bundle into the caller's workspace without re-ingestion.
v0.2 imports are deliberately staged: validate all declaration conflicts, create active declarations, add items, then restore retired/superseded class state. A conflict returns before the first declaration or item write.
Send Authorization: Bearer <token>. The token is either a Clerk session JWT or a SmartMemory API key (prefix sm_live_, sm_test_, or legacy sk_).
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/memory/okf/import" \ -F file="string"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Import Chat Export
Import a ChatGPT or Claude conversation export into the caller's workspace. Conversations are ingested through the standard conversation pipeline, so entities, relations and links are extracted exactly as they would be for a live conversation. Items carry ``origin=import:chatgpt_export`` or ``import:claude_export``: tier 1, so they are recallable, and dedupe-eligible, so re-uploading a later export updates the overlap instead of duplicating it. One request imports at most ``max_conversations`` conversations, longest first. A larger export is imported in batches: upload the same file again with ``offset`` set to the previous response's ``next_offset`` until it is null. Each conversation is stored once, so repeating or overlapping batches never duplicate it. A Claude export is a manifest plus one zip per kind of data. Upload the manifest first for a checklist with the download links, then upload each zip in any order. Conversations, memories and projects are imported. Frames, design chats, Claude Code cloud data and account metadata are counted and named but not imported yet. Returns 400 for an unreadable export, 413 for an oversized upload, 422 for a negative offset.
Import Ontology
Import OntologyIR data to seed or migrate the ontology. Accepts a dict with OntologyIR format. Creates entity types and patterns.