Step 1: Set your API key
Use your Future AGI API key and secret to authenticate. Get them from the dashboard:Step 2: Call the Protect API
The backend exposes a Standalone Protect Eval endpoint. There is no separate “Protect client” in this service; you call the REST API (or use an SDK that wraps it). Endpoint:POST /sdk/api/v1/eval/
Headers:
| Header | Required | Description |
|---|---|---|
X-Api-Key | Yes | Your API key |
X-Secret-Key | Yes | Your secret key |
Content-Type | Yes | application/json |
| Field | Type | Required | Description |
|---|---|---|---|
inputs | array | Yes | List of one object. That object must have key input with the text (or URL/path) to evaluate. |
config | object | Yes | Eval config keyed by eval_id. For Protect Flash use "76"; value is the config object (e.g. {}). |
protect_flash | boolean | No | true → Protect Flash (faster, billed as Protect Flash Evaluator). Omit or false → Protect (billed as Protect Evaluator). |
requests):
os.environ.get("FI_API_KEY") and os.environ.get("FI_SECRET_KEY") in the headers.
Step 3: Request and response reference
Request
- inputs — Required. Must be a non-empty array. The first element must be an object with key
input(string: plain text, image URL, audio URL, or file path, as supported by the evaluator). - config — Required. Must be an object. Exactly one key: the eval_id as a string (e.g.
"76"for Protect Flash). The value is the eval config (e.g.{}). - protect_flash — Optional. Boolean. Default is
false.trueuses Protect Flash;falseuses full Protect.
Response (success)
HTTP 200 with JSON body:result[0].evaluations[0].
| Key | Type | Description |
|---|---|---|
name | string | Eval template name (e.g. protect_flash). |
reason | string | Explanation when available (e.g. why content failed). |
runtime | number | Time taken in seconds. |
output | string | "Passed" or "Failed" — use this to enforce the guardrail. |
output_type | string | Output type label. |
eval_id | string | sdk_uuid for this run (correlation/logging). |
output to decide whether to block, flag, or allow content; use reason for logging or user-facing messages.
Pass example
Fail example
Example: text content
Example: custom failure message in your app
The API does not accept a custom “action” message. You choose what to show whenoutput is "Failed":
Safety dimensions (evaluator behavior)
The Protect / Protect Flash evaluator (eval_id 76) checks for harmful or unsafe content. That includes the four dimensions described in the Protect overview: content moderation, bias detection, security (e.g. prompt injection), and data privacy compliance. You do not pass a list of “rules” or “metrics” in the request; a single call runs the evaluator and returns one Passed or Failed result and an optional reason.Multi-modal support
You pass oneinput string per request. The evaluator accepts:
- Text — Plain text.
- Image — URL or file path (formats and size limits depend on the evaluator).
- Audio — URL or file path (formats as supported).
input changes.
Text:
Important notes
- Eval ID — For Protect Flash the config key must be the template eval_id 76. The key must be a string that parses as an integer (e.g.
"76"). - One input per request — This endpoint accepts one object in
inputs(oneinputvalue). For multiple items, call the API once per item or use a batch endpoint if available. - Billing —
protect_flash: true→ Protect Flash Evaluator;protect_flash: false(or omitted) → Protect Evaluator. Rate limits apply per product. - Errors — Missing
inputs, emptyinputs, or missingconfigreturn 400. Invalid config key (non-numeric) returns 400. Authentication failures return 401/403.