SDKs

Configuration & endpoints

Timeouts, retries, and pointing the SDKs at a provisioned Integrity endpoint.

Both SDKs default to the hosted service and need no configuration beyond an API key. This page covers the knobs for pointing them elsewhere and tuning transport behavior.

Endpoints#

The default base URL is https://integrity.triage-sec.com. Per-classifier routes derive from it:

ClassifierRoute
INT-Input/v1/prompt-guard
INT-CoT/v1/cot-integrity
INT-Tooling/v1/tool-guard
INT-Output/v1/output-guard

The hosted domain also fronts these gateway routes:

Gateway pathPurpose
/v1/chat/completionsOpenAI-compatible Chat Completions ingress.
/v1/responsesOpenAI Responses API ingress, including reasoning summaries for INT-CoT.

Set a different SDK base URL to move its classifier routes:

Python
triage_sdk.init(api_key="tsk_...", base_url="https://integrity.example.internal")
TypeScript
triage.init({ apiKey: 'tsk_...', baseUrl: 'https://integrity.example.internal' });

base_url moves the SDK’s classifier routes. Configure an OpenAI-compatible client’s base URL separately for /v1/chat/completions or /v1/responses, and send the Integrity key in x-triage-api-key.

Per-classifier overrides#

To route classifiers independently (for example during a migration), pass full URLs. Python accepts input_url, cot_url, tooling_url, output_url. TypeScript accepts inputUrl, cotUrl, toolingUrl, outputUrl.

Python
triage_sdk.init(
    api_key="tsk_...",
    input_url="https://integrity.example.internal/v1/prompt-guard",
    cot_url="https://integrity.example.internal/v1/cot-integrity",
    tooling_url="https://integrity.example.internal/v1/tool-guard",
)

The legacy names prompt_guard_url / promptGuardUrl and tool_guard_url / toolGuardUrl are still accepted as deprecated aliases.

Timeouts & retries#

timeout (seconds in Python, milliseconds in TypeScript) and max_retries / maxRetries control transport behavior. Set retries to 0 to disable them entirely. Retries apply only to connection errors, timeouts, and HTTP 429, 500, 502, 503, and 504. Other 4xx responses fail immediately. See the errors reference.

Provisioned endpoints#

After Triage provisions a compatible endpoint for your environment, point base_url at it. Confirm authentication, supported routes, operational ownership, and cutover criteria as part of that engagement. The public /health endpoint reports only the routed INT-Input service, not aggregate readiness. Confirm deployment-specific probes during provisioning.