API: Research workspace
Asynchronous research jobs: attach documents, start a multi-step agent run, follow its event stream, and read the cited report.
Every HTML route returns JSON with Accept: application/json. Authentication: session cookie, X-API-KEY, Authorization: Bearer or Basic.
/researchMemberWorkspace with document tray, live run trace, report, charts and recent jobs.
curl -X GET -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research'
const response = await fetch("/research", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/research", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"jobs": [],
"mode": "research"
}
Not sent yet.
/research/jobsMemberThe signed-in member's started jobs, newest first.
curl -X GET -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research/jobs'
const response = await fetch("/research/jobs", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/research/jobs", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"jobs": []
}
Not sent yet.
/research/jobsMemberCreates a draft job that accepts documents until it starts.
curl -X POST -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{}' 'https://molodetz.nl/research/jobs'
const response = await fetch("/research/jobs", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/research/jobs", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"status": "draft",
"uid": ""
}
Not sent yet.
/research/jobs/{uid}MemberStatus, attached documents, and the final result when finished.
curl -X GET -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research/jobs/{uid}'
const response = await fetch("/research/jobs/{uid}", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/research/jobs/{uid}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"result": {},
"status": "done"
}
Not sent yet.
/research/jobs/{uid}/documentsMemberMultipart upload in field file. Accepts PDF, DOCX, TXT, MD, CSV, TSV, JSON, HTML, and ZIP archives of those.
| Field | Type | Location | Required |
|---|---|---|---|
file | file | body | yes |
curl -X POST -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{}' 'https://molodetz.nl/research/jobs/{uid}/documents'
const response = await fetch("/research/jobs/{uid}/documents", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/research/jobs/{uid}/documents", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"added": [],
"rejected": []
}
/research/jobs/{uid}/documents/{document_uid}MemberRemoves one document from a draft job.
curl -X DELETE -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research/jobs/{uid}/documents/{document_uid}'
const response = await fetch("/research/jobs/{uid}/documents/{document_uid}", { method: "DELETE", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("DELETE", BASE + "/research/jobs/{uid}/documents/{document_uid}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"ok": true
}
Not sent yet.
/research/jobs/{uid}/startMemberStarts the agent on a draft job. Output preferences such as tone, format, tables and charts are read from the question.
| Field | Type | Location | Required |
|---|---|---|---|
query | string | body | yes |
curl -X POST -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"query": "probe"}' 'https://molodetz.nl/research/jobs/{uid}/start'
const response = await fetch("/research/jobs/{uid}/start", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/research/jobs/{uid}/start", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"status": "running"
}
Not sent yet.
/research/jobs/{uid}/cancelMemberStops a running job; gathered events stay readable.
curl -X POST -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' -H 'Content-Type: application/json' -d '{}' 'https://molodetz.nl/research/jobs/{uid}/cancel'
const response = await fetch("/research/jobs/{uid}/cancel", { method: "POST", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("POST", BASE + "/research/jobs/{uid}/cancel", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"status": "cancelled"
}
Not sent yet.
/research/jobs/{uid}MemberDeletes a finished or draft job with its documents and events.
curl -X DELETE -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research/jobs/{uid}'
const response = await fetch("/research/jobs/{uid}", { method: "DELETE", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("DELETE", BASE + "/research/jobs/{uid}", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"ok": true
}
Not sent yet.
/research/jobs/{uid}/streamMemberServer-sent events with ids for resume: status, plan, step, progress, review, warning, usage, telemetry, result, error, done.
curl -X GET -H 'Accept: application/json' -H 'X-API-KEY: YOUR_API_KEY' 'https://molodetz.nl/research/jobs/{uid}/stream'
const response = await fetch("/research/jobs/{uid}/stream", { method: "GET", headers: { "Accept": "application/json" } });
console.log(await response.json());
import httpx
print(httpx.request("GET", BASE + "/research/jobs/{uid}/stream", headers={"Accept": "application/json", "X-API-KEY": API_KEY}).json())
{
"event": "step"
}