> ## Documentation Index
> Fetch the complete documentation index at: https://zerodrift.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Content

> Validate content with the v2_frontier agentic engine or the Anchor 3.0 SLM — async or sync

Submit content for compliance validation, with a choice of validation engine.
Requests require `mode` and `model_engine`. With `mode: "async"`, the endpoint
returns a `job_id` you poll via
[Get Validation Results](/api-reference/validate/get-results). Set
`mode: "sync"` to run the validation inline and receive the completed result in
a single response.

## Request Body

<ParamField body="email_text" type="string" required default="Guaranteed 15% returns, no risk. Act now — this opportunity wont last!">
  Plain text email body to validate.
</ParamField>

<ParamField body="model_engine" type="string" required default="anchor_3_0">
  Validation engine to use: `v2_frontier` runs the agentic multi-model engine
  (GPT-4o-mini, Claude, Gemini). `anchor_3_0` runs the Anchor 3.0 compliance
  SLM on Modal — 30–50% faster with lower token overhead — carrying a
  sentinel-head detection adapter (per-line, per-rule calibrated probabilities
  over the deployed checkpoint's frozen 235-rule vocabulary) and a
  judge-rewarded rewrite adapter. Both engines return the same result shape;
  `anchor_3_0` results additionally include `relevant_rule_ids` and
  input/output token counts. If `anchor_3_0` fails, the request falls back to
  `v2_frontier` automatically with the `fallback_engine` field set in the
  response.
</ParamField>

<ParamField body="mode" type="string" required default="async">
  Execution mode: `async` returns `202` with a `job_id` to poll; `sync` runs
  inline for short content and returns the completed result with `200`,
  falling back to async if it would exceed the inline budget.
</ParamField>

<ParamField body="metadata" type="object">
  Optional metadata merged into the job. `document_type` is always forced to
  `email`.
</ParamField>

<ParamField body="document_category" type="string">
  Optional explicit scenario id to validate against, e.g.
  `scenario_email_general` (the default when omitted). Your account's active
  custom rules (from policy imports) are evaluated as well.
</ParamField>

<ParamField body="validation_scope" type="object">
  Optional nested form to narrow live validation to a subset of already-active
  rules, rule packs, and imports.

  <Expandable title="validation_scope properties">
    <ParamField body="rules" type="array">
      Rule IDs to evaluate.
    </ParamField>

    <ParamField body="rulepacks" type="array">
      Rule pack IDs to evaluate.
    </ParamField>

    <ParamField body="imports" type="array">
      Import IDs to evaluate.
    </ParamField>
  </Expandable>
</ParamField>

## Response

Returns `202 Accepted` for async submissions. Poll
[Get Validation Results](/api-reference/validate/get-results) for the outcome.

<ResponseField name="api_version" type="string">
  Always `v3`.
</ResponseField>

<ResponseField name="job_id" type="string">
  Unique identifier for the validation job.
</ResponseField>

<ResponseField name="status" type="string">
  `queued` for async submissions. For `sync` responses the completed result
  envelope is returned inline (`status: done`).
</ResponseField>

<ResponseField name="mode" type="string">
  Mode the request was actually processed in: `async` or `sync`. A `sync`
  request that fell back returns `async`.
</ResponseField>

<ResponseField name="model_engine" type="string">
  Engine that accepted the job: `v2_frontier` or `anchor_3_0`.
</ResponseField>

<ResponseField name="poll" type="object">
  Where to poll for the result (async only).

  <Expandable title="poll properties">
    <ResponseField name="method" type="string">
      Always `GET`.
    </ResponseField>

    <ResponseField name="url" type="string">
      Poll URL, e.g. `/api/v3/jobs/{job_id}`.
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  For the `sync` response body (HTTP 200), the envelope is identical to a
  **done** poll — see
  [Get Validation Results](/api-reference/validate/get-results) — with
  `"mode": "sync"` added.
</Note>

## Error Responses

| Status | Description                                                    |
| ------ | -------------------------------------------------------------- |
| 400    | Bad Request — invalid `model_engine` or unsupported parameters |
| 403    | Forbidden — missing, invalid, inactive, or unresolved API key  |
| 422    | Unprocessable Entity                                           |

<ResponseExample>
  ```json 202 Accepted (async) theme={null}
  {
    "api_version": "v3",
    "job_id": "a1b2c3",
    "status": "queued",
    "mode": "async",
    "model_engine": "anchor_3_0",
    "poll": { "method": "GET", "url": "/api/v3/jobs/a1b2c3" }
  }
  ```
</ResponseExample>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.zerodrift.ai/api/v3/content/validate \
    --header 'content-type: application/json' \
    --header 'x-api-key: <ApiKey>' \
    --data '{
    "email_text": "Guaranteed 15% returns, no risk. Act now — this opportunity will not last!",
    "model_engine": "anchor_3_0",
    "mode": "async"
  }'
  ```

  ```python Python theme={null}
  import requests

  API_KEY = "<ApiKey>"
  API_BASE = "https://api.zerodrift.ai"

  response = requests.post(
      f"{API_BASE}/api/v3/content/validate",
      headers={
          "x-api-key": API_KEY,
          "Content-Type": "application/json"
      },
      json={
          "email_text": "Guaranteed 15% returns, no risk. Act now — this opportunity wont last!",
          "model_engine": "anchor_3_0",
          "mode": "async"
      }
  )

  print(response.json())  # -> {"job_id": "...", "status": "queued", ...}
  ```

  ```javascript JavaScript theme={null}
  const axios = require('axios');

  const API_KEY = '<ApiKey>';
  const API_BASE = 'https://api.zerodrift.ai';

  const response = await axios.post(
    `${API_BASE}/api/v3/content/validate`,
    {
      email_text: 'Guaranteed 15% returns, no risk. Act now — this opportunity wont last!',
      model_engine: 'anchor_3_0',
      mode: 'async'
    },
    {
      headers: {
        'x-api-key': API_KEY,
        'Content-Type': 'application/json'
      }
    }
  );

  console.log(response.data);
  ```
</CodeGroup>
