ADAPTIVE INTELLIGENCE API · ORCHESTRATION
Ask for intelligence when the schema can be dynamic.
The Adaptive Intelligence API requires an active evaluation or paid entitlement and a live key, accepts one self-contained question of 1–4,000 characters and streams Server-Sent Events. Use mode: "ai" for a written answer plus tool data, or mode: "data" for data-oriented output.
const response = await fetch(
"https://companyproof.ai/v2/intelligence/query",
{
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.COMPANYPROOF_API_KEY,
"Content-Type": "application/json",
"Accept": "text/event-stream"
},
body: JSON.stringify({
query: "Find Acme Holdings in GB and show its directors and financials",
mode: "ai"
})
}
);
// Consume response.body as Server-Sent Events.statusProgress message; may occur more than once.
tool_callNames a CompanyProof operation selected for the question.
tool_resultReturns data or a module-level error for a selected operation.
textStreams answer text. Concatenate events in order.
suggested_actionsOptional follow-up questions.
doneTerminal success event. Inspect completeness metadata when supplied.
errorTerminal stream failure. Do not treat preceding partial text as complete.
The initial HTTP request can fail with the normal JSON error envelope. Once streaming begins, errors arrive as SSE error events. The server does not promise replay IDs; retry the complete request with your own correlation ID. Clients must ignore unknown event types for forward compatibility.
Adaptive output depends on the question and the tools selected at runtime. Use Company Profile REST when a predictable envelope matters. Adaptive intelligence does not create a CompanyProof proof or monitoring record.
