The Lab API is the core of cf0’s research platform. It lets you start streaming AI research sessions, manage conversation threads, and retrieve message history. The primary chat endpoint uses Server-Sent Events to stream incremental responses. All Lab endpoints are prefixed withDocumentation Index
Fetch the complete documentation index at: https://docs.cf0.ai/llms.txt
Use this file to discover all available pages before exploring further.
/api/lab.
Chat (streaming)
Rate limit: 12 requests per minute per user. Requests over the limit return HTTP 429.
Request body
The user’s message or research query.
Thread ID to continue an existing conversation. If omitted, a new thread is created automatically.
Deprecated. Use
threadId instead.Contextual mentions to inject into the prompt. Each item has:
type(string) — mention type, e.g."reports"or"screener"items(array) — selected items, each withid,title,context, and optionalsubtitlequery(string, optional) — search query associated with this mention
Maximum spend in USD for this query. Range: 0.01–10.0. Defaults to
null — the server applies its own default cap (currently around $1.50 per query for standard effort).List of tool names to exclude from this query.
Set to
true to skip injecting the user’s saved memory context.SSE event types
The response is a stream ofdata: lines, each containing a JSON object. Parse each line after stripping the data: prefix.
The event type. Possible values:
Example
Thread management
List threads
Array of thread objects, each with
threadId, title, created_at, and updated_at.Create thread
Optional display title for the thread.
threadId.
Get thread
Thread ID.
Thread title.
Array of message objects with
role (user or assistant) and content.Update thread
New title for the thread.
{ "ok": true } on success.
Delete thread
{ "ok": true } if deletion succeeded.
Audit trail
"markdown" (default) or "pdf". PDF is returned as a binary file download.Filesystem
Response
Your personal files and folders (uploads, threads, memory).
Files shared at the organisation level (shared documents, org skills).
Map of system-skill identifiers to their metadata. Useful for discovering which slash-command Skills are available in your workspace without calling
/api/skills separately.File upload
multipart/form-data.
