免费开始 →

API 参考

网关调用

通过受治理的网关调用模型——以及围绕一次调用的操作:是否需要模型、首次调用可用的模型、恢复被暂挂的调用、申请例外、依据核查,以及您自有保险库的回执。

完整的 API 参考

路由摘要和字段名称均以英文撰写,本页与文件中都是如此。

/api/v1/chat

POST /api/v1/chat/completions

The governed gateway, OpenAI-compatible

认证
API 密钥
密钥作用域
inference:write
请求头
X-Azoth-Usecase · X-Azoth-Decision-Ref · X-Azoth-Subject-Zone · X-Azoth-End-User · X-Azoth-Challenge-Passed · X-Azoth-On-Behalf-Of · X-Azoth-Locale · X-Azoth-Alternative · X-Azoth-Refusal-Ref · Idempotency-Key
请求体
model (必填) · messages (必填) · temperature · max_tokens · stream · azoth_use_cache · azoth_task · azoth_cache_policy · azoth_agent_id · azoth_workflow_id · azoth_compute_os · azoth_sources

POST /api/v1/chat

The governed gateway with an explicit provider, fallbacks and streaming

认证
API 密钥
密钥作用域
inference:write
请求头
X-Azoth-Usecase · X-Azoth-Decision-Ref · X-Azoth-Subject-Zone · X-Azoth-End-User · X-Azoth-Challenge-Passed · X-Azoth-On-Behalf-Of · X-Azoth-Locale · X-Azoth-Alternative · X-Azoth-Refusal-Ref · Idempotency-Key
请求体
provider (必填) · model (必填) · messages (必填) · temperature · maxTokens · stream · useCache · task · cachePolicy · agentId · workflowId · fallbackProviders · azureEndpoint · azureDeployment · ollamaBaseUrl · onApprovalRequired · azoth_sources
应答

/api/v1/infer

POST /api/v1/infer/resume

Run a held call once a reviewer approved it

POST /api/v1/infer/preflight

Score whether a request needs a model call at all

认证
API 密钥
密钥作用域
advisory:read
模块
在部署运行 FEATURE_IAE 时提供。
请求体
connectorId · request

/api/v1/models

GET /api/v1/models/defaults

Which model a first call can use, per provider

认证
API 密钥
密钥作用域
advisory:read

/api/v1/exceptions

POST /api/v1/exceptions

Ask the rule's owner for a time-limited exception to a refusal

认证
API 密钥
密钥作用域
inference:write
模块
在部署运行 FEATURE_HELPFUL_REFUSALS 时提供。
请求体
refusal_ref (必填) · justification (必填) · duration_days · requester_label

GET /api/v1/exceptions/{id}

Where an exception this key asked for stands

认证
API 密钥
密钥作用域
inference:write
模块
在部署运行 FEATURE_HELPFUL_REFUSALS 时提供。
参数
id (必填)

/api/v1/grounding

POST /api/v1/grounding/release

Fetch a high-stakes answer the grounding check held, once approved

认证
API 密钥
密钥作用域
inference:write
模块
在部署运行 FEATURE_GROUNDING_CHECK 时提供。
请求体
approval_request_id (必填)

POST /api/v1/grounding/receipts

Seal the receipt of a grounding check run on your side

认证
API 密钥
密钥作用域
inference:write
模块
在部署运行 FEATURE_GROUNDING_CHECK 时提供。
请求体
traceId (必填) · claims (必填) · supported (必填) · judgeVersion (必填) · claimsVersion (必填) · sourcesHash (必填) · sourceCount (必填) · latencyMs · usecaseId

/api/v1/vault

POST /api/v1/vault/receipts

Seal the receipt of a call kept in your own vault

认证
API 密钥
密钥作用域
inference:write
模块
在部署运行 FEATURE_CLIENT_VAULT 时提供。
请求头
X-Azoth-Decision-Ref
请求体
traceId (必填) · plaintextHash (必填) · ciphertextHash (必填) · keyId