Quickstart Guide

Protect Your First AI Request

Integrate TrustChain AI in minutes. Change a single line of code—redirect your SDK's base URL to the TrustChain proxy gateway to scan prompts, enforce policy, and capture deterministic audit evidence.

1Connect Provider

Add your provider credentials in Dashboard Settings.

2Create Key

Issue a TrustChain API key for your application.

3Route Traffic

Redirect `baseURL` to `https://trustchainai.app/api/proxy`.

Select Provider:
Language:
curl -X POST "https://trustchainai.app/api/proxy/openai" \
  -H "Authorization: Bearer <YOUR_TRUSTCHAIN_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<YOUR_MODEL>",
    "messages": [{"role": "user", "content": "Hello, TrustChain protected OpenAI!"}]
  }'
Replace <YOUR_MODEL> with a model supported by your OpenAI account (e.g. gpt-4o).

Understanding Request Outcomes

ALLOWED

Prompt passed all compliance scans cleanly and was forwarded to the upstream LLM provider.

BLOCKED

Request violated policy (e.g. prompt injection, severe PII). Blocked at gateway before provider dispatch.

REDACTED

Sensitive facts (e.g. SSNs) were sanitized from the prompt before sending to provider.

Troubleshooting Common Gateway Error Codes

401 UNAUTHORIZED / INVALID_API_KEY

The TrustChain API key in your Bearer header is invalid, revoked, or missing.

422 UNPROCESSABLE_ENTITY / PROVIDER_NOT_CONFIGURED

Your organization has not configured provider credentials for this provider in Settings.

503 SERVICE_UNAVAILABLE / AUDIT_EVIDENCE_UNAVAILABLE

TrustChain could not safely persist pre-provider audit evidence. Provider dispatch was denied to prevent un-audited traffic.