Skip to main content
This tutorial covers how to point a red team run at models hosted by different providers. Only the target block changes between them — the rest of the payload is identical.

Prerequisites

  • Python basics
  • Accounts with the model providers you want to test
  • An Enkrypt AI API key from app.enkryptai.com

Setup

Shell
Shell
Export a key for whichever provider you are testing:
Shell

The script

This template works for every provider. Swap the target block from the sections below.
Before spending a run, check the target is reachable with POST /rt/model-health. It calls the target once and returns the probe query and the reply. It is free.

Provider configurations

OpenAI

Anthropic

Azure OpenAI

For Azure the model_name is your deployment name, not the underlying model name, and the API version belongs in the endpoint query string.

AWS Bedrock

Google Gemini

Together

Replicate

HuggingFace Inference Endpoint

Any OpenAI-compatible endpoint

The general escape hatch — vLLM, Ollama, LM Studio, OpenRouter, Groq, Fireworks, self-hosted gateways and most other services expose an OpenAI-shaped API.
provider is a routing hint. When in doubt, use openai_compatible — if the endpoint speaks the OpenAI chat-completions shape, it will work. Other recognised values include mistral, cohere, deepseek, groq, fireworks, openrouter, xai, ai21, ollama, litellm and portkey.

Saved models

Rather than repeating a target block, save the model once through the Models API and reference it:
Shell
The payload carries no target at all — the saved model supplies it. See Run Red Team with a Saved Model for the exact headers.

Targets inside a private network

If the model is not reachable from the public internet, route it through the Relay bridge with connect_via_relay on the target and a metadata.relay block naming the bridge. See Red Teaming Through the Relay Bridge for the end-to-end walkthrough, and Configuration Reference for the field reference.

Comparing providers

Because only target changes, you can run the same scope against several models and compare summary.overall_asr:
Python
For a like-for-like comparison, use the same generation_config.dataset_name across runs so every model sees an identical prompt set. Generate it once with threat modeling.