Reference
API Documentation
Available on Practitioner, Pro Team, and Enterprise plans. Generate your API key from your account page.
Authentication
Pass your API key as a Bearer token in the Authorization header. Keys begin with cruc_ and are shown once at generation time.
Authorization: Bearer cruc_YOUR_KEY_HERE
Keep your key secret. Revoke and regenerate it from your account page if compromised. Each API call consumes one session from your monthly allocation.
Endpoint
Runs your question through the multi-stage analysis pipeline and streams the result as Server-Sent Events (SSE).
Request Body
Content-Type: application/json
Response (SSE Stream)
The response is a text/event-stream. Each event is a JSON object on a data: line.
data: {"type":"phase_start"}
data: {"type":"phase_complete"}
data: {"type":"phase_start"}
data: {"type":"phase_complete"}
data: {"type":"phase_start"}
data: {"type":"phase_complete"}
data: {"type":"phase_start"}
data: {"type":"phase_complete"}
data: {"type":"session_complete","revelationId":"uuid","output":{...}}Output Shape
The output field on session_complete contains:
{
"revelation": "string — the core answer",
"question_behind_question": "string — the deeper question uncovered",
"confidence_architecture": "string — what would need to be true for this to be wrong",
"raw_outputs": {
"stage_1": "string",
"stage_2": "string",
"stage_3": "string",
"stage_4": "string"
}
}Example — curl
curl -X POST https://thecrusible.systems/api/crucible \
-H "Authorization: Bearer cruc_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"question": "Should I expand into a new market this year?"}' \
--no-bufferExample — JavaScript (SSE)
const response = await fetch('https://thecrusible.systems/api/crucible', {
method: 'POST',
headers: {
'Authorization': 'Bearer cruc_YOUR_KEY_HERE',
'Content-Type': 'application/json',
},
body: JSON.stringify({
question: 'Should I expand into a new market this year?',
supportingContext: 'We are a 12-person SaaS company, 3 years old, profitable.',
}),
})
const reader = response.body.getReader()
const decoder = new TextDecoder()
let buffer = ''
while (true) {
const { done, value } = await reader.read()
if (!done) buffer += decoder.decode(value)
const lines = buffer.split('\n')
buffer = done ? '' : lines.pop()
for (const line of lines) {
if (!line.startsWith('data: ')) continue
const event = JSON.parse(line.slice(6))
if (event.type === 'session_complete') {
console.log(event.output.revelation)
console.log(event.output.question_behind_question)
}
}
if (done) break
}Error Codes
Questions or integration support
Contact Us