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

# Safety and privacy

> What the safety filters refuse, how personal data in replies is masked, and what to do when a request is blocked.

Early access
**Gnani Evon v3.5** is now available as an API to early access registrants.

## Overview

Every request goes through safety filters, with or without streaming:

| Filter | Checks | What happens |
| - | - | - |
| **Prompt injection and jailbreaks** | User messages and tool results | The request is refused with `400 content_filter` before the model runs. |
| **Personal data in replies** | The reply and the thinking | Identifiers such as phone numbers and PAN are replaced with placeholders. |
| **Unsafe replies** | The reply | A withheld reply ends with `finish_reason: "content_filter"`. |

You do not need to turn anything on.

***

## Blocked requests

A request is refused when a user message or a tool result tries to:

* override, replace or cancel the assistant's instructions ("ignore your previous instructions...");
* get the assistant to reveal, list, repeat or summarise its own system prompt, instructions or hidden configuration;
* make the assistant drop its safety rules through role-play, "developer mode", or similar tricks;
* disguise new instructions as system, developer or tool content.

Clearly harmful requests are refused in the same way.

The refusal is an ordinary error response, sent before anything is generated:

```json theme={null}
{
  "error": {
    "message": "The request was blocked by the input guardrails.",
    "type": "invalid_request_error",
    "param": null,
    "code": "content_filter"
  }
}
```

> [!NOTE]
>
> **What is not blocked:** asking how prompt injection or jailbreaks work in general, asking for help writing your own prompts, quoting an example to discuss it, and ordinary requests, even unusual or rude ones.

> [!NOTE]
>
> **Your `system` message is not screened.** It is yours, so it can contain any instructions you like.

### When your request is blocked

* **Do not retry it unchanged.** It is refused again.
* **Tell your user plainly** that the request could not be processed, and let them rephrase.
* **Check tool results.** If you pass web pages, emails or documents to the model as `tool` messages, text inside them that gives the model instructions can block the request.
* **Contact support** with the `X-API-Request-ID` of the request if you think it was blocked by mistake.

***

## Personal data in replies

Personal identifiers in the model's reply are replaced with a placeholder that names the type. This applies to `content` and to the thinking in `reasoning`, with or without streaming.

| Detected | Placeholder |
| - | - |
| Aadhaar number | `[REDACTED_AADHAAR]` |
| PAN | `[REDACTED_PAN]` |
| Phone number | `[REDACTED_PHONE]` |
| Email address | `[REDACTED_EMAIL]` |
| Credit or debit card number | `[REDACTED_CREDIT_CARD]` |
| UPI ID | `[REDACTED_UPI_ID]` |
| GSTIN | `[REDACTED_GSTIN]` |
| Voter ID | `[REDACTED_VOTER_ID]` |
| Driving licence number | `[REDACTED_DRIVING_LICENCE]` |
| Passport number | `[REDACTED_PASSPORT]` |
| Bank account number | `[REDACTED_BANK_ACCOUNT]` |
| Date of birth | `[REDACTED_DATE_OF_BIRTH]` |

For example, a reply that would have been *"Call the customer on 98450 12345"* arrives as *"Call the customer on \[REDACTED\_PHONE]"*.

Names and postal addresses are not detected and are returned as written.

> [!WARNING]
>
> **Masking also applies when you ask the model to extract these details.** If you ask for the phone number in a message, the reply contains `[REDACTED_PHONE]`, not the number. Extract such identifiers in your own code instead, for example with a regular expression on the original text.

### Personal data in your requests

Personal data that you send is **not changed and not refused**. The model receives your messages exactly as you sent them, so it can use the details to answer. Only the reply is masked.

***

## Withheld replies

Replies are also checked for unsafe content. If a reply is withheld, `finish_reason` is `content_filter`, and without streaming `content` is replaced with:

```text theme={null}
The response was withheld by the content safety guardrails.
```

Check `finish_reason` and show your own message when it is `content_filter`.

***

## Related errors

| HTTP | `error.code` | Meaning | What to do |
| - | - | - | - |
| `400` | `content_filter` | The request was refused by the safety filters. | Change the request. |
| `413` | `request_too_large` | The messages hold more than 1 MB of user and tool text, too much to screen. | Send less text. |
| `503` | `guardrail_unavailable` | The safety check could not run. The request was not sent to the model unscreened. | Retry with backoff. |

***

## Related

> [card] [Errors](https://docs.gnani.ai/api/LLM/errors.md)
>
> Every error code, and how to retry safely.

> [card] [Tool calling](https://docs.gnani.ai/api/LLM/tool-calling.md)
>
> Tool results are screened like user messages.

> [card] [JSON output](https://docs.gnani.ai/api/LLM/structured-outputs.md)
>
> Masking applies to values inside JSON replies.

> [card] [Limits](https://docs.gnani.ai/api/LLM/limits.md)
>
> Request size and the text that can be screened.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.