La documentation est disponible en anglais.

Documentation / Native API

Pipeline settings

Read and patch api_keys.pipeline_settings for the authenticated key: thresholds, default_model, pii_options — not module on/off (governance policies).

GET/api/v1/sdk/pipeline-settings

PATCH/api/v1/sdk/pipeline-settings

GET — read settings & effective modules

curl -sS "https://api.tokensaver.fr/api/v1/sdk/pipeline-settings" \
  -H "Authorization: Bearer $TS_KEY"

Key fields: pipeline_settings (thresholds stored on the key), effective_modules (resolved use_cache / use_rag / … from policies + plan), plan_features, allowed_keys, server_defaults, module_gate_source (governance_policies).

PATCH — merge thresholds

curl -sS -X PATCH "https://api.tokensaver.fr/api/v1/sdk/pipeline-settings" \
  -H "Authorization: Bearer $TS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pipeline_settings": {
      "cache_similarity_threshold": 0.88,
      "default_model": "openai/gpt-4o-mini"
    }
  }'

Partial merge into existing settings. Optional clear_fields (array of keys to remove) or reset: true to wipe before merge. Response includes updated pipeline_settings and effective_modules.

Allowed pipeline_settings keys

Key Purpose
cache_similarity_threshold Semantic cache floor (0–1)
rag_similarity_threshold RAG retrieval floor (0–1)
rag_top_k Max chunks (1–100)
compression_level Compression aggressiveness (1–5)
compression_rag_budget_tokens RAG context token budget
pii_options Default PII engine / strategy / entities
cache_embedding_compute local | provider
cache_embedding_model Embedding model id
use_embedding_cache Default for POST /openai/v1/embeddings vector cache
default_model Catalogue default provider/model_id

Python SDK: get_pipeline_settings(), effective_modules(), patch_pipeline_settings() — see sdk/python/governance.