Skip to main content
POST
Scaffold a prompt
Returns the scaffolded prompt plus the focal node ids that shaped it. Composed for the effective subject: the API key owner by default, or the subject named by the X-Exo-Subject header.

Authorization

This route requires the read scope. A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.

Headers

These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.

Success responses

Errors

Every error is an RFC 9457 application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.

Authorizations

X-Exo-API-Key
string
header
required

An Exo API key (exo_...) sent as the X-Exo-API-Key header.

Body

application/json

POST /v1/condition/scaffold: backs the exo_scaffold_prompt MCP tool.

prompt
string
required
Required string length: 1 - 100000
userId
string
required
Minimum string length: 1
mode
string
default:default
recentSessionSummary
string | null
Maximum string length: 50000

Response

The scaffolded prompt and the focal node ids that shaped it.

ConditionScaffoldResponse + additive usage (existing keys unchanged).

scaffold
string
required
focalNodes
string[]
usage
ConditionUsage · object

Usage block on condition responses (spec D13), camelCase on the wire.

The compose builders are pure SQL reads (no LLM call today), so the token fields are null; readUnits meters one unit per compose call. If a future builder version starts spending LLM tokens, it reports them here.