Skip to main content
POST
/
plan
curl --request POST \
  --url http://localhost:3774/plan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "question": "What's the capital of France?"
}
EOF
"event: session\ndata: {\"session_id\":\"s_01H...\",\"external_session_id\":\"client-session-42\",\"created\":true}\n\nevent: plan\ndata: {\"plan_id\":\"m_01H...\",\"session_id\":\"s_01H...\"}\n\nevent: task.started\ndata: {\"task_id\":\"call_01H...\",\"agent\":\"research\",\"agent_did\":null,\"skill\":\"search\",\"input\":{\"input\":\"Find 3 recent papers on LLM evaluation.\"}}\n\nevent: task.artifact\ndata: {\"task_id\":\"call_01H...\",\"agent\":\"research\",\"agent_did\":null,\"content\":\"<remote_content agent=\\\"research\\\" verified=\\\"unknown\\\">Paper A ...\\nPaper B ...\\nPaper C ...</remote_content>\",\"title\":\"@research/search\"}\n\nevent: task.finished\ndata: {\"task_id\":\"call_01H...\",\"agent\":\"research\",\"agent_did\":null,\"state\":\"completed\"}\n\nevent: text.delta\ndata: {\"session_id\":\"s_01H...\",\"part_id\":\"p_01H...\",\"delta\":\"Here are three recent papers on LLM evaluation:\\n\\n\"}\n\nevent: final\ndata: {\"session_id\":\"s_01H...\",\"stop_reason\":\"stop\",\"usage\":{\"inputTokens\":1820,\"outputTokens\":312,\"totalTokens\":2132,\"cachedInputTokens\":0}}\n\nevent: done\ndata: {}\n"

Documentation Index

Fetch the complete documentation index at: https://docs.getbindu.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Shared-secret bearer token(s) configured via config.gateway.auth.tokens. Validated in constant time against a SHA-256 hash of each configured token, so neither timing nor length leaks which token matched. Set gateway.auth.mode: "none" in config to disable bearer auth (not recommended outside of localhost).

Body

application/json
question
string
required

The user's natural-language question. Non-empty — an empty string is rejected upstream because some LLM providers (Anthropic) reject empty user messages with a 400 mid-stream, surfacing as a vague "Provider returned error". Validating here gives a clean 400 with invalid_request instead.

Minimum string length: 1
Example:

"Summarize the latest quarterly results for Apple."

agents
object[]

Catalog of A2A peers the planner may call. Empty array = planner runs with no tools (useful for questions the configured planner LLM can answer on its own, e.g., general knowledge).

preferences
object

Caps and shaping hints. All keys are snake_case; an earlier draft declared them camelCase, which caused docs-compliant clients to silently lose the caps — the schema is now strict on casing and unknown keys pass through via additionalProperties: true for forward compatibility.

session_id
string

Opaque external session identifier. If provided AND a session row exists with the matching external_session_id, that session is resumed (history persists). If omitted or unmatched, a new session is created and its server-assigned id is surfaced in the first SSE session event.

Example:

"client-session-42"

Response

SSE stream of the plan. Each event is one of the types documented under SSEEvent below. The stream closes after event: done.

The text/event-stream body is a sequence of event: / data: pairs. Each data: value is a JSON object matching one of the SSEEvent_* schemas below. OpenAPI doesn't model SSE natively; $ref the per-event schemas to generate typed consumers.