The One-Minute Integration.
Our gateway is fully compatible with standard OpenAI and Anthropic SDKs. You do not need to rewrite your prompt logic. Simply change your baseURL and add your target provider in the headers.
BASE URL
https://api.autark.ai/v1/chat/completionsStandard Request (PII Vault + Compress)
Pass feature toggles in the headers to intercept, clean, compress, and forward your requests natively.
curl -X POST https://api.autark.ai/v1/chat/completions \
-H "Authorization: Bearer autark_sk_12345" \
-H "x-target-provider: anthropic" \
-H "x-target-model: claude-4-6-sonnet-20261022" \
-H "x-autark-pii-vault: true" \
-H "x-autark-compress: true" \
-H "Content-Type: application/json" \
-d '{ "messages":[{"role": "user", "content": "Review John Doe. SSN 000-11-2222."}]}'// Vaulting and Compression enabled via headers.
Autark automatically appends a custom metrics payload to the standard JSON response:
{
"id": "autark_req_987654321",
"choices":[{"message": {"content": "John Doe has a clean account..."}}],
"autark_metrics": {
"latency_added_ms": 11,
"pii_entities_vaulted": 1,
"tokens_original": 10245,
"tokens_compressed": 3100,
"savings_usd": "$0.021"
}
}// Real-time ROI and latency tracking.
Streaming Responses (SSE)
Autark fully supports "stream": true. We utilize a sub-5ms Buffer. When providers stream chunks back, our proxy scans the byte stream, swaps "[PERSON_1]" for real PII from Redis, and flushes instantly.
data: {"choices": [{"delta": {"content": "for "}}]}
data: {"choices": [{"delta": {"content": "Jane "}}]}
data: {"choices": [{"delta": {"content": "Smith "}}]}// Autark swaps [PERSON_1] instantly inside the stream chunk.
Custom PII & Enterprise Rules
Custom Extraction
Pass custom terms via header. The NER engine will treat these as protected entities.
-H 'x-custom-entities: ["Titan"]'Enterprise Fail-Safes
- Compression "Fail-Open": Uncompressed prompts bypass and forward instantly if load is heavy.
- Vaulting "Fail-Closed": Vaulting blocks requests entirely if an error occurs to prevent leaks.