Skip to main content
POST
Resource
Unlike the other capabilities, /resource is a session-based workflow. You dispatch on an action field and carry a sessionId between calls.

Workflow

1

start

Open a session. Returns a sessionId.
Optionally scope with contextMode, unitId or lessonId.
2

configure

Supply the topic and resource configuration.
3

generate

Produce the resource.
4

refine (optional, repeatable)

Iterate on the result.
5

persist

Save it to the library.

Other actions

action
{ "action": "get_session", "sessionId": "..." } — read current session state.
action
{ "action": "cancel", "sessionId": "..." } — abandon the session.
Persisted resources carry a structured_content payload. That is the authoritative form — render from it rather than from any markdown field, or you will reproduce the mangled-markdown class of bug.