Workflow6 min read

safety_tolerance and auto_fix: Brand-Safe Veo Pipelines

Two parameters decide whether your Veo pipeline fails loudly or silently rewrites your brand voice. Here is how to configure safety_tolerance and auto_fix.


If you run Veo in production for a brand that cares about its voice, two parameters will save you from a bad weekend: safety_tolerance and auto_fix. Get them wrong and the model rewrites your prompt, ships a clip you did not ask for, and charges you for it.

This post walks through both flags on fal-ai/veo3.1/text-to-video. Veo 4 will likely keep the same shape.

Brand-safe Veo pipeline overview
Brand-safe Veo pipeline overview

What the two flags do

safety_tolerance is an integer from 1 to 5. 1 is strictest; 5 is loosest. The filter runs on both input prompt and generated frames. If a pass trips, the request returns a safety error instead of a video.

auto_fix is a boolean. When true, the model may silently rewrite your prompt. The rewritten text comes back under actual_prompt. When false, a borderline prompt fails cleanly.

For a brand-safe pipeline you want strict tolerance and auto_fix off. You want the loud failure.

The two-pipeline pattern

Run two:

  1. Strict lane for brand spots, hero content, talent likenesses. safety_tolerance: 1, auto_fix: false.
  2. Permissive lane for exploration, moodboards, previz. safety_tolerance: 3, auto_fix: true.

Route by caller. Production queue goes strict. Designer clicking preview goes permissive. Never let permissive bleed into strict.

Real code for both lanes

TS
1import { fal } from "@fal-ai/client";
2
3// or fal-ai/veo4/text-to-video once available
4const ENDPOINT = "fal-ai/veo3.1/text-to-video";
5
6export async function strictRender(prompt: string) {
7 return fal.subscribe(ENDPOINT, {
8 input: {
9 prompt, duration: 6, resolution: "1080p",
10 aspect_ratio: "16:9",
11 safety_tolerance: 1, auto_fix: false,
12 },
13 });
14}
15
16export async function exploreRender(prompt: string) {
17 const result = await fal.subscribe(ENDPOINT, {
18 input: {
19 prompt, duration: 6, resolution: "1080p",
20 aspect_ratio: "16:9",
21 safety_tolerance: 3, auto_fix: true,
22 },
23 });
24
25 if (result.data.actual_prompt && result.data.actual_prompt !== prompt) {
26 await logPromptRewrite({
27 original: prompt,
28 rewritten: result.data.actual_prompt,
29 request_id: result.requestId,
30 });
31 }
32
33 return result;
34}

At $0.40 per second for 1080p on Veo 3.1, a 6 second clip is $2.40. Letting auto_fix run without capturing the diff means paying for a clip you cannot audit.

SQL diff capture for auto-fix rewrites
SQL diff capture for auto-fix rewrites

Logging the diff

If auto_fix runs on any traffic, write every rewrite to a table:

SQL
1CREATE TABLE prompt_rewrites (
2 id BIGSERIAL PRIMARY KEY,
3 request_id TEXT UNIQUE NOT NULL,
4 original TEXT NOT NULL,
5 rewritten TEXT NOT NULL,
6 diff_chars INT GENERATED ALWAYS AS
7 (LENGTH(rewritten) - LENGTH(original)) STORED,
8 created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
9);

Then review what the model has been quietly changing:

SQL
1SELECT original, rewritten, diff_chars
2FROM prompt_rewrites
3WHERE created_at > NOW() - INTERVAL '7 days'
4 AND diff_chars != 0
5ORDER BY ABS(diff_chars) DESC LIMIT 50;

Biggest diffs usually point at a celebrity name, a weapon reference from a moodboard, or a trademark landed in a rushed copy paste. Reviewing the top 50 weekly takes 10 minutes.

Policy drift review dashboard
Policy drift review dashboard

When strict is too strict

Sometimes tolerance 1 refuses a prompt that is clearly fine, typically when an ambient cue (shattering glass, sirens, a shouted line) reads as violent. Two options: rewrite the cue to remove the trigger, or step tolerance to 2 for that single request and log the escalation.

Do not globally raise tolerance to avoid one-off refusals. Raise it per call, with a flag that a human signed off.

Audit checklist

  • Strict lane has safety_tolerance: 1 and auto_fix: false, confirmed in code.
  • Permissive lane writes every rewrite to prompt_rewrites in the same transaction.
  • A reviewer checks the top 50 largest diffs weekly.
  • No route silently falls back from strict to permissive when a strict render fails.
  • The request_id is stored on both the render record and the rewrite record, so you can join them.

Do this and your Veo pipeline becomes boringly predictable. Brand safety is not about the model being careful. It is about being able to prove, months later, exactly what the model rendered.