Account

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

POSThttps://thecrusible.systems/api/crucible

Runs your question through the multi-stage analysis pipeline and streams the result as Server-Sent Events (SSE).

Request Body

Content-Type: application/json

questionstring · requiredThe question to analyse. Min 10 chars, max 2000 chars.
supportingContextstring · optionalAdditional background text to inform the analysis. Max 5000 chars.
supportingUrlstring · optionalA URL to fetch and include as context. Must be a valid URL.

Response (SSE Stream)

The response is a text/event-stream. Each event is a JSON object on a data: line.

phase_starteventFired when each analysis phase begins.
phase_completeeventFired when a phase finishes.
session_completeeventFinal event. Contains revelationId and the full output object.
erroreventContains code and message fields. Stream ends after this.
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-buffer

Example — 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

401 unauthorizedHTTPMissing or invalid API key.
402 limit_reachedHTTPMonthly session limit reached. Resets on the 1st of next month.
422 validation_errorHTTPInvalid request body. Check the question field.
429 rate_limitedHTTPToo many requests — wait 30 seconds between sessions.
500 server_errorHTTPInternal error. Check Retry-After header and try again.

Questions or integration support

Contact Us