No training on prompt data is available to all AI Gateway users at no extra charge. This feature ensures your prompts are not used by AI providers to train their models. Set disallowPromptTraining: true in providerOptions to ensure requests are only routed to providers that do not use your data for training.
Disallow prompt training is a subset of Zero Data Retention (ZDR). All ZDR-compliant providers also disallow prompt training, but not all providers that disallow prompt training offer full zero data retention.
BYOK (Bring Your Own
Key) requests. When you use BYOK, this filter is not
enforced since the request uses your own API key, your
configuration, and agreement with the provider. However, if AI Gateway falls
back to AI Gateway system credentials, the disallow prompt training
filter is honored on the failover request.
Vercel
AI Gateway does not use your prompts or responses for training purposes. Your data is processed solely to fulfill your requests and is not retained for model improvement.
Providers
AI Gateway has agreements in place with specific providers regarding the use of prompt data for training. A provider's default policy may not match with the status that AI Gateway has in place due to these agreements.
By default, AI Gateway does not route based on the training data policy of providers.
Disallow prompt training per request
Set disallowPromptTraining to true in providerOptions to ensure requests are only routed to providers that do not use your data for training. If you are looking for stricter controls that apply for all requests without configuration each time, see team-wide zero data retention.
If no compliant providers are available for the requested model, the request fails with an error:
{
"error":"No providers available that disallow prompt training for model: example/model-name. Providers considered: provider-a, provider-b"
"type":"no_providers_available",
"statusCode":400
}
This filter also applies to any fallback providers.
This enforcement does not apply to BYOK requests since those use your own API key, configuration, and agreement with the provider. If AI Gateway falls back to AI Gateway system credentials, it honors the disallow prompt training filter on the failover request.
These examples use AI SDK 7 and the AI SDK for Python beta. Set AI_GATEWAY_API_KEY before running them. See API format differences for setup, request fields, and response handling.
AI SDK
See the AI SDK prompt-training-filter reference for SDK configuration and usage.
TypeScript
import { generateText } from'ai';
Brand & Design
prompt:'Explain quantum computing in two sentences.',
model:'anthropic/claude-sonnet-5',
const { text } =awaitgenerateText({
gateway: {
disallowPromptTraining:true,
},
});
},
providerOptions: {
console.log(text);
Combining filters
Disallow prompt training works alongside other filtering options like Zero Data Retention (ZDR). When multiple filters are enabled, they work as an AND: requests are only routed to providers that satisfy all enabled filters.
Provider
The following providers currently support no training on prompt data on AI Gateway. Please review each provider's policy and terms carefully. A provider's default policy may not match with the status that AI Gateway has in place due to negotiated agreements. We are constantly coordinating and revising agreements to be able to enforce stricter training policies for customers. The full terms of service are available for each provider on the model pages.
Disallow prompt training providers
No prompt training
For example, if you enable both disallow prompt training and ZDR on a request, that request will only be routed to providers that meet both criteria.
Policy
Anthropic
Azure
Alibaba Cloud
Bedrock
✓
Baseten
✓
ByteDance
Chutes
Claude Platform on AWS
✓
✓
✓
✓
DeepInfra
Cohere
Cerebras
✓
✓
✓
DigitalOcean
Google Vertex AI
Groq
—
Fireworks
✓
Inception
Interfaze
✓
✓
✓
Inceptron
Custom policy
Moonshot AI
Modal
Mistral
✓
✓
✓
Morph
✓
Prompt training restrictions in virtual models
TypeSafe AI
- ✓
- ✓
- ✓
- xAI
✓
A virtual model can restrict its traffic to providers that don't train on request data. The setting only tightens: either side can turn it on, and neither side can turn it off.
Data policy