External consumer reference
Minimal external app pattern
This is a reference implementation pattern, not an in-repo application. Your real app should live in its own repository and call PlurisUnum from its backend.
Repo separation
your-product-repo/
app-ui/
app-backend/
routes/summarizeIncident.ts
lib/plurisunum.ts
plurisunum/
core-v1/
operator-console/
docs/
Your product repo owns the user journey. The PlurisUnum repo remains infrastructure-only and should not absorb app-specific workflow logic.
Backend client helper
export async function callPlurisUnum(prompt) {
const response = await fetch(
'https://plurisunum-core-v1.highpower.workers.dev/api/prompt/route',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PLURISUNUM_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt,
providers: ['openai', 'google'],
preferenceMode: 'balanced'
})
}
);
return response.json();
}
Example route handler
import { callPlurisUnum } from './lib/plurisunum.js';
export async function summarizeIncident(req, res) {
const payload = await callPlurisUnum(
`Summarize this incident timeline in five bullets: ${req.body.timeline}`
);
res.json({
summary: payload.response_text,
telemetry: {
request_id: payload.request_id,
run_id: payload.run_id,
provider: payload.provider,
routing_strategy: payload.routing_strategy,
latency_ms: payload.latency_ms,
estimated_cost: payload.estimated_cost
}
});
}
Response handling
- Read response_text for the answer your app will show.
- Store or log request_id and run_id so engineers can inspect the run later.
- Surface routing metadata in internal developer tooling, support tooling, or a protected debug panel in your app.
Operator console usage
When a developer needs to understand why a run behaved a certain way, they use the protected operator console with the same issued access model. The console is for infrastructure inspection, not for end-user workflow handling.
Frontend telemetry display
const result = await fetch('/api/summarize-incident', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ timeline })
}).then((res) => res.json());
summaryNode.textContent = result.summary;
requestIdNode.textContent = result.telemetry.request_id;
routeNode.textContent = `${result.telemetry.provider} via ${result.telemetry.routing_strategy}`;