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

# Control the content filter

> Understand SERV’s default system-prompt leak protection.

<Frame>
  <img src="https://mintcdn.com/openserv/wCXyJJTiOX6drWSJ/images/tutorials/content-filter.webp?fit=max&auto=format&n=wCXyJJTiOX6drWSJ&q=85&s=519ca4080c42e4d927168adce81f6178" alt="A response stream passing through an inspection filter that catches leaked prompt material" width="1536" height="1024" data-path="images/tutorials/content-filter.webp" />
</Frame>

SERV applies a system-prompt content filter by default when SERV Reasoning is active. It examines the generated response for content that appears to reveal protected instructions or hidden prompt material.

## What happens when it detects leakage

The filter runs after the upstream model has generated its answer. If the answer matches protected prompt material, SERV returns a safe refusal in the endpoint’s normal response format instead of passing the leaked text to your application. The event is recorded as a safety outcome for internal usage reporting.

This is different from [`serv_prompt_guard`](./prompt-guard):

| Feature        | Runs                     | Default | Purpose                                            |
| -------------- | ------------------------ | ------- | -------------------------------------------------- |
| Content filter | After generation         | On      | Detects leaked system-prompt content in the output |
| Prompt guard   | Before the model request | Off     | Detects injection attempts in the input            |

Disable the output filter only when revealing the instructions is an intentional part of the request, such as a prompt-transparency or debugging experience.

```js theme={null}
const response = await client.chat.completions.create({
  model: "gpt-5.4-mini",
  messages: [
    { role: "system", content: "You may explain these public guidelines when asked." },
    { role: "user", content: "Explain the guidelines you were given." },
  ],
  tools: [{ type: "function", function: { name: "serv_disable_content_filter" } }],
});
```

The marker is consumed by SERV and is never sent to the model. Disabling the content filter does not disable `serv_prompt_guard`, and enabling the prompt guard does not disable the content filter.

The filter is designed for system-prompt leakage, not general moderation. Continue to apply your own policy checks for harmful content, personal data, and business actions.

<Warning>
  Do not disable the filter for ordinary user requests. Once disabled, SERV will no longer prevent the model from echoing your system prompt in its response.
</Warning>
