Image and multimodal content safety with NeMo Guardrails

Image checks in NeMo Guardrails depend on what your installed version and chosen vision guard support. This page explains the decisions, the setup order and the tests that show unsafe images are blocked before you rely on them.

On this page

Why image input changes the safety design for NeMo Guardrails assistants

If your assistant accepts screenshots, photos or scanned documents, part of the content it receives is never inspected by a text-only rail. An input rail that reads the user's typed message sees a caption or a question about an image, not the pixels. Unsafe text can sit inside a screenshot, a document scan can carry instructions aimed at the model, and a photo can depict material your acceptable use policy prohibits. A vision model as judge is a guard model that receives the image, usually with a policy prompt, and returns a verdict before the application LLM acts on it. Teams need this check when image input is open to users or to untrusted documents, and when the assistant's answers could expose data or cause harm based on what was shown to it.

The position of that check in the request path is a design decision. A vision judge placed as an input rail runs before the application LLM sees the image, so a blocked image never reaches the model. A judge placed on output checks what the assistant generates, which matters when the model can describe or transform an image into text that a user could copy elsewhere. Most teams need both directions, and each adds a model call, latency and a second place where image data is sent. Before design work starts, confirm in the NeMo Guardrails documentation which image checking options exist for the version you run. The current release is 0.25.0, and capabilities, supported image input formats and model options must be verified against that version rather than assumed from text-based rails.

DeployOpen scopes image safety work only after that confirmation. Checking what your version supports, which guard models are available to you and how images must be passed in is the first step of the engagement, and it determines whether the design needs a custom action, a different guard or a change to your application's upload path. Ask your team to inventory every place images enter the assistant, including file uploads, retrieved documents and pasted screenshots, so the scope can name each one.

Where the image check sits in the request flow

The request starts when a user uploads an image with a text prompt and reaches the NeMo Guardrails input rails first, so text and image are checked before the application model sees anything. The vision guard is called from the input rails, either inside your network or on a hosted endpoint, and that hand-off is the one to verify: if the image leaves your network, it leaves at that point. Output rails then check the application model's response before it returns to the user. Confirm where each guard runs and what it receives.

The image check runs in the input rails, before the application model receives the request.

Choosing hosted or self-hosted vision guards and the image input form

This table compares hosted and self-hosted vision guards and base64 versus URL image input across where the image travels, data residency, operational burden, failure behavior and fit. Confirm each row against current NVIDIA and model vendor documentation before committing, because hosting options for NeMo products changed in late 2026. The main takeaway is that the image transport choice and the hosting choice are separate decisions, and the NeMo Microservices sunset affects only one of the hosting paths.

OptionWhere the image goesData residency effectOperational burdenFailure behaviorWhen it fits
Base64 image in the requestEncoded inside the message body and sent to the guard model endpointImage bytes leave the application only to the endpoint you configure; confirm where that endpoint runsLarger payloads; confirm body size limits at your gateway and proxyOversized payloads may be rejected before any check runs; confirm the error pathImages held only in memory or supplied by users directly
Image URL referenceThe guard model or its host fetches the image from the URLThe fetching service sees the URL and may reach hosts outside your network; confirm egress rulesSmaller requests, but you must manage URL access, expiry and allowlistsUnreachable or expired URLs can produce errors or unchecked content; confirm the guard's behaviorImages already stored in your own object storage behind controlled access
Hosted vision guard APISent to the vendor's hosted service over the public networkImages leave your environment; confirm the vendor's data retention and processing termsLowest hosting effort; you manage keys, quotas and vendor changesDepends on vendor availability and rate limits; confirm timeout and fallback settingsNon-sensitive images where external processing is approved
Self-hosted vision guard modelServed on infrastructure you control, such as your own GPUs or clusterImages stay inside your boundary; confirm logs and traces do not capture raw image dataGPU capacity, model updates and serving operations fall to your teamYou define timeouts and fallback behavior; confirm what happens when the model is downRegulated or air-gapped workloads that need the image kept in your network
NVIDIA NeMo Guardrails microservice container (NGC)Deployed as a container in your environment when usedData stays where you host it, but NVIDIA no longer supports the artifactNVIDIA states it is sunset as of October 1, 2026 with no new releases; treat it as a migration itemNo vendor fixes or security updates for this artifact; confirm with your NVIDIA account teamOnly as a legacy reference while you plan a move off it
NeMo Helix hosting pathGuardrail configurations applied as middleware to model endpoints in NeMo HelixDepends on where you deploy Helix; confirm the image and model traffic paths in its documentationNew control plane to learn; confirm image support and version maturity before adoptionGateway-level failures affect model traffic; confirm fail-open or fail-closed settingsTeams already standardizing on a gateway pattern, after confirming image input support
Open-source library in your own serviceThe NeMo Guardrails Python library runs inside your application or server processImage handling stays in your service; you control logging and retentionYou own the integration code, versions and testing; the library is Apache 2.0Your code decides error handling; test timeouts and exceptions explicitlyTeams that want full control of the image path and version pinning

Setting up an image check in order

This sequence takes an image check from a clean Python environment to a deployed server that refuses unsafe images and records which rail acted. Each step closes with a check you can run, so a failure is caught before the next step depends on it.

  1. Confirm Python and the NeMo Guardrails version

    The platform engineer creates a fresh virtual environment on Python 3.11, 3.12 or 3.13 and installs the nemoguardrails package from PyPI. Pin the version to 0.25.0, the current release listed on PyPI, so every later step tests the same code. Record the version in your change ticket. The step is done when the package imports cleanly and the installed version matches the pin in your dependency file.

  2. Choose the vision guard and hosting model

    The security engineer and the platform team choose a vision-capable judge model and decide whether it runs as a hosted API or on your own GPUs. Confirm with the model provider or your NeMo Guardrails version notes whether the model accepts base64-encoded images, image URLs, or both, and what its context length limit is for images plus policy text. Check the model directly with one safe and one unsafe image. The step is done when the model returns an answer the output parser can read for both.

  3. Define the policy categories the guard judges

    The policy owner writes the categories the guard must judge, such as violence, sexual content or self-harm, and states what counts as acceptable for each. Map each category to at least one test image in your evaluation set so no category is untested. Have the owner sign off on the wording before it goes into a prompt. The step is done when every category has a written definition and a matching test case.

  4. Add the image input rail to config.yml

    The platform engineer declares the vision model in the models section of config.yml, enables an input rail for image content, and adds a Colang file only if the flow must route image messages differently from text. Keep the policy text in a separate prompt definition so reviewers can read it. Load the folder with the Python API or the server and confirm it starts without configuration errors. The step is done when the configuration loads and the image rail appears in the active configuration.

  5. Build and deploy the guardrails server image

    The platform team builds the server image from the Dockerfile provided with NeMo Guardrails, mounts the configuration folder into the container, and deploys the vision guard endpoint it references. Confirm that the guard endpoint is reachable from the server network and that secrets are passed through your secret store, not written into config files. The step is done when the server starts and answers a plain text request through its HTTP API.

  6. Test with unsafe image requests

    The QA or security engineer sends the safe and unsafe images from the evaluation set through the HTTP API, once as base64 and once as a URL, and records each response. Unsafe requests should return the configured refusal, and safe requests should reach the application model. Repeat near the context length limit to see how the rail handles oversized input. The step is done when every test case produces the expected outcome in both formats.

  7. Verify that rail outcomes are logged

    The operations engineer checks that each blocked image request writes a log entry naming the rail that fired, and that each allowed request shows it passed the rail. Confirm which fields your logging setup records and whether request content is captured, since image data may be sensitive. Review the entries against the test results from the previous step. The step is done when every blocked test case has a log line that identifies the image input rail.

Testing unsafe image requests before release

Base64 uploads place the image bytes inside the request body, so the guard judges exactly what the user sent. This path is usually the first one used by chat front ends, and a missing check here lets content through without anyone noticing. Confirm with your version and configuration how inline image data reaches the vision guard before you write expected outcomes.

  • Unsafe cases: build images that violate the categories in your own written policy, including harmful text embedded inside a picture. Keep unsafe test material in a restricted location and handle it under your organization's safety procedures.
  • Benign cases: include ordinary photos, medical diagrams and artwork that resembles restricted content in style, so you can measure false positives as well as misses.
  • Encoding variants: test valid base64, malformed base64, mismatched MIME types and payloads close to your gateway's size limit, and record how each one is rejected.
  • Expected outcome: unsafe images should be blocked before the application model answers, and benign images should pass with a normal response. Record the outcome for each image.
  • Evidence to keep: image hash, configuration version, guard decision, timestamp and the response the user received.

Check that each block comes from the guard's decision, not from a parsing error that happens to return a refusal.

Security and operational risks in image checks

Image checks add attack surface that text-only guards do not have: the image itself, the network path that carries it, and the service that judges it. The cards below name the control to review for each risk, so your team can confirm how a vision guard behaves in your environment before it is trusted with user uploads.

Format and size bypasses

Attackers may try to hide unsafe content in image formats, encodings or sizes that the guard decodes differently from the application or the model. Review how your application validates and normalizes uploads before they reach the guard, and confirm the guard receives the same bytes the downstream model will see. Test with re-encoded, resized and oversized images, and treat a rejection or error as a case to handle explicitly.

Data leaving the network

A hosted vision guard sends every image to a provider outside your network, which can include faces, documents or other personal data. Confirm the provider's data handling terms, where requests are processed, and whether images are stored or used for training. If the data classification does not allow that transfer, plan a self-hosted guard instead.

Server-side request forgery through image URLs

When the guard or application fetches images from URLs supplied by users, an attacker can point the fetch at internal addresses, metadata endpoints or private services. Restrict outbound fetches to an allowlist, block private and link-local address ranges, and limit redirects and response size. Prefer passing image bytes directly where your design allows it.

Logging of image content and personal data

Traces, debug logs and blocked-request records can store the full image or its base64 string, which may leave sensitive content in log stores with weaker access controls. Review what the guard framework logs at each level, set retention for image-bearing logs, and restrict who can read them. Confirm that blocked content is recorded only as needed for review.

Guard availability and fail-open settings

If the vision guard is down or slow and the configuration passes requests through, unsafe images reach the model unchecked. Decide per use case whether a guard failure should block, queue or allow the request, and test that behavior by stopping the guard service during a load test. Monitor guard health separately from the model it protects.

Keys and credentials for hosted endpoints

Hosted vision guards are called with API keys that can be read from configuration files, environment variables or logs if handled carelessly. Store keys in your secrets manager, scope them to the guard only, and plan rotation and revocation. Confirm that keys are not echoed in error messages or traces.

Questions buyers ask about image safety work

What drives the cost of image safety work with NeMo Guardrails?

The main drivers are the hosting choice, the number of image types and languages that must be covered, the size of the test set, and how much policy definition the organization still needs. A self-hosted vision guard needs GPU capacity that runs continuously, so that cost recurs whether or not requests arrive. A hosted guard shifts the cost to usage charges set by the provider, so read its terms before comparing. One-time work includes integration into the rails, policy writing, building the test set and reviewing results. Recurring work includes model updates, retesting and capacity changes. Ask any quote to split these lines, name who pays for GPUs or API usage, and list the image types in scope. Changes to any of these drivers should be priced as a written change to scope.

How long does an image safety engagement usually take?

Duration depends on the number of image types, how settled the content policy is, how quickly the client provides model access and reviewers, and how much unsafe-image testing is agreed. Most engagements are fixed-scope, so the timeline is agreed in writing before work starts and should appear in the proposal. Ask the provider to show the phases, the dependencies on your team, and the point at which test results are reviewed. Common delays come from waiting for policy sign-off, network or GPU access in your environment, and disagreement over which edge cases count as unsafe. Confirm each dependency in the timeline with an owner and a date.

What must our team provide before image safety work starts?

Your team needs to provide the access and decisions that the work depends on:

  • Accounts and network access in the infrastructure where the guard and the application will run
  • A written content policy with categories, plus examples of images that are allowed and images that are not
  • Representative images from your product, including edge cases such as screenshots with text, medical or document scans, and images that are sensitive but legitimate
  • A decision on hosted or self-hosted guards, and approval of the data flows that come with that choice
  • Named reviewers who can judge test results and sign off on the policy
  • Access to the application's configuration repository and a test environment

Missing items usually show up as delays, so confirm each one in the written scope.

Can our internal engineering team build image safety themselves?

Yes, a team with Python and LLM application experience can build it. NeMo Guardrails is licensed under Apache 2.0 and installs from PyPI, and the current 0.25.0 release requires Python 3.11, 3.12 or 3.13. The harder parts are rarely the configuration files. They are defining the policy, building a test set that covers realistic unsafe image requests, handling base64 and URL images correctly, and judging whether the guard's decisions are good enough. Check whether your team also has model-serving and GPU operations skills, and who will own the system after go-live. A partner is often used when deadlines are fixed or when a compliance review needs independent evidence of testing.

Are hosted vision guard models acceptable for regulated data?

That decision belongs to your security and compliance teams, and it depends on the data, the provider contract and your regulator's expectations. A hosted model receives every image it checks, so the review should cover where images are processed, how long they are retained and logged, whether the provider uses them for training, and whether the contract matches your data classification. A self-hosted guard keeps images inside your network, but it adds GPU capacity and operations work. Ask the provider for a written data flow diagram and a list of who can access logs. DeployOpen prepares systems and evidence for compliance assessments, but independent auditors and certification bodies issue the reports.

How is the scope of an image safety engagement set?

Scope is set in writing before work starts. It should name the image types covered, whether input, output or both are checked, the languages of any text inside images, the hosting model, the number of rails and integrations, the size of the test set, and the form of the test report. It should also state whether unsafe-image testing and a retest are included. DeployOpen plans, implements and tests self-hosted platforms in your own infrastructure, and most engagements are fixed-scope with deliverables and timelines agreed in writing. Anything not listed in the scope should be treated as a change request with its own quote.

What should a quote for image safety work include?

DeployOpen does not publish a price list. A quote follows from the written scope, so ask for it to include these items:

  • Line items by phase, such as design, integration, test set creation, testing and handover
  • The assumptions on image types, volume and languages that the quote depends on
  • The hosting model, and who pays for GPUs or API usage
  • A clear split between one-time work and recurring costs
  • Test set creation, retesting and the form of the findings report
  • Documentation, handover and any training for your team
  • Support terms after go-live, if you want them
  • Exclusions, so you know what is not covered

Compare quotes on the same assumptions, not only on the total.

Limits to confirm in your environment

Multimodal guards depend on details that change between NeMo Guardrails releases, vision models and deployment modes. The cards below list the limits to confirm against the official documentation and vendor specifications for your exact versions before you commit to a design.

Accepted image input forms

Confirm which image input forms the installed version accepts, such as base64-encoded data inline in the message or an image URL that the guard model fetches. Also confirm the supported file types and whether remote URLs are reachable from the guard's network. A URL that works on a developer laptop may fail inside a segmented production network, and base64 payloads raise the size of every request that passes through the rail.

NeMo Guardrails docs

Context length of the vision model

Look up the context window of the chosen vision guard and how the platform counts image tokens against it. Image content can consume a large share of the budget before the policy text and the conversation are added. Ask whether oversized images are rejected, downscaled or truncated, because a silent truncation can let unsafe content pass unchecked.

Multiple images per request

Confirm whether the guard accepts more than one image in a single request and how it evaluates them together. Some models judge each image separately, while others consider the combined content. Multi-image messages such as a chat turn with several attachments can multiply token use, so test the largest realistic combination your application allows.

Language and policy coverage

Confirm which languages the vision guard judges reliably and which safety categories its published policy covers. Text written inside an image, such as signs or screenshots, may be judged differently from the same words typed as text. Compare the guard's categories with your own acceptable use policy and list any gaps that need a separate check.

GPU and memory for self-hosting

Ask the model publisher or NVIDIA for the GPU memory, accelerator type and host RAM needed to serve the vision guard at your expected concurrency. Vision models are generally heavier than text-only guards, so plan capacity for image-heavy traffic and for peak loads, not only average use. Budget the hardware cost as a recurring infrastructure line.

Where the image rail runs

Confirm whether the image rail runs inside the NeMo Guardrails server, through the Python API, or in the NeMo Helix gateway as an inference middleware plugin. Each location changes who handles the image payload, how logs capture it and which configuration files apply. Test the same unsafe image request in every location you plan to use.

NeMo Helix guardrail docs

How DeployOpen scopes and delivers image safety

DeployOpen plans, builds, tests and hands over image and multimodal checks for NeMo Guardrails inside your own infrastructure, so your security and compliance teams can review every rail, model endpoint and log. Engagements start from a written, fixed scope, and the work covers configuration, vision model choice, failure testing and operating documentation.

How we scope

  • We confirm which image input paths, output paths and file formats the assistant accepts before any build starts.
  • We agree whether images arrive as base64 payloads or URLs and document the limits each path creates.
  • We record which vision guard runs hosted or self-hosted, with the data each option sends outside your network.

How we build

  • We configure NeMo Guardrails input and output rails that send images to your chosen vision judge with a defined policy.
  • We set image size, context length and fallback behavior so oversized or unreadable images fail in a controlled way.
  • We deploy the guard model and rail configuration in your cloud accounts, data centers or air-gapped networks with access controls.

How we hand over

  • We test the setup with safe and unsafe image requests and keep the results as evidence for your review.
  • We deliver the rail configuration, policy text, model settings and a runbook covering blocked-request investigation.
  • We walk your engineers through the configuration so your team can change prompts, thresholds and endpoints later.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • We can retest the image rails when the vision model, the NeMo Guardrails version or the policy text changes.
  • Before a release, confirm the current NeMo Guardrails version and the guard model license terms with the vendor.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.