Skip to main content
Your prompt passes through us on the way to the provider. Four fields decide what we do with it. We remove all four from the body before we call the provider, so the provider never sees them. The first three only run on Managed Keys. On your own keys we forward your request untouched. Masking and moderation read your request first, then your organization’s default, then off. Trace storage reads the request and nothing else.

PII masking

We can mask personal data in your prompt before it reaches the provider. Each match becomes a stable placeholder such as [EMAIL_1], so the model can still tell people apart. It covers emails, phone numbers, and other patterns such as card numbers.
Send false on one request to skip masking that your organization turned on. If masking is on and it fails, we stop the request with 500 pii_masking_failed rather than send it unmasked.

Moderation

We can check a prompt for harmful content before sending it. A blocked prompt returns 403 moderation_blocked and reaches no provider.

Trace storage

We can store your prompts and answers, encrypted, so the Logs page can show them. Only your request turns this on. A managed request otherwise keeps what a BYOK request keeps, which is billing data and nothing else.
A later request without the field stores nothing new. What you already stored stays until you delete it on the Logs page.

Prompt caching

We cache every Claude request on the direct Anthropic route. A repeated prefix then bills at one tenth of the normal input price. Writing the cache costs 1.25 times input price. A prefix you never reuse costs 25 percent more. That’s why you can turn caching off.
Your own markers always win. If your request has any cache_control, we forward it and add nothing of our own. A request too short to cache just runs uncached. The response reports cached_tokens and cache_write_tokens in its usage block.

Identity fields on managed keys

On Managed Keys we replace four identity fields with a stable hash of your organization id before we call the provider. The identity a provider sees on our credential has to come from us, so these are the only fields we change instead of forwarding.
  • user
  • safety_identifier
  • prompt_cache_key
  • metadata.user_id
On your own key we forward all four as you sent them. We leave every other key in metadata alone. Workers AI takes no identity field on the body, so we attach the hash to the request itself instead. Gemini, Vertex and Bedrock take no identity field we can set. On those three routes we remove yours and send nothing in its place.

One reserved marker in tool call ids

Gemini needs a signature replayed with each tool call, so we carry it inside the tool call id. The id we hand you looks like <id>::gsig::<signature>, and we take the signature back off before any other provider sees it. Your own ids pass through untouched, even when they contain ::. The one thing to avoid is the literal text ::gsig:: inside an id you invent, because we’d read it as ours and cut the id short.

File names on Gemini models

You can send a document inline, as base64 bytes or as a data: URL. On a Gemini model we send Google the media type and the bytes, and we leave out filename and file_id. Google’s document format has no field for them and rejects a request that carries one. The model reads the bytes and never sees a name, so nothing you sent is lost. Every other provider still gets the name.