Skip to main content
SecuAI API

OpenAI-compatible, sovereign, Loi 25-ready

Drop-in replacement: just change the base_url. Compatible with OpenAI SDK, LangChain, LlamaIndex, Haystack.

# Chat completion via API OpenAI-compatible avec anonymisation activée
curl -X POST https://api.secuai.secuaas.com/v1/chat/completions \
  -H "Authorization: Bearer $SECUAI_API_KEY" \
  -H "X-Anonymize-Input: true" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "secuai-local-large",
    "messages": [
      {"role":"system","content":"Tu es un assistant juridique québécois."},
      {"role":"user","content":"Analyse cette clause : ..."}
    ],
    "temperature": 0.2
  }'
bash

Authentication

Per-tenant API tokens. OpenAI SDK compatible: `Authorization: Bearer sk-secuai-...`.

PII anonymization

Automatic detection before inference via the X-Anonymize-Input header, Quebec French support.

Webhooks

Signature in the `X-Gateway-Signature` header.

OpenAPI 3.1

Public spec available for download (/openapi.json). Compatible with the official OpenAI SDK for zero-code migration.

Restore the original values

Restore original values from the anonymized text and the mapping_id (or session_id) returned at anonymization time.

reverse-opt-in.sh
// Reverse opt-in : restituer les valeurs d'origine
curl -X POST https://api.secuai.secuaas.com/v1/anonymize/reverse \
  -H "Authorization: Bearer $SECUAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "...", "mapping_id": "map_01HX..." }'

Endpoints principaux

  • POST /v1/chat/completionsOpenAI-compatible: sovereign models including secuai-local-large (Qwen3.6-35B-A3B, 65K context). SSE streaming, tools.
  • POST /v1/anonymizeDetect and replace personal information in a text.
  • POST /v1/anonymize/reverseRestore original values from the anonymized text and mapping_id (or session_id).
  • GET /v1/modelsModels available for your key.