Monoize
Transforms

Transforms Overview

Ordered rules that adjust requests and responses per Provider, per API key, or globally.

What a transform is

A transform is a rule that modifies a request before Monoize encodes it for the upstream, or modifies a response before Monoize returns it to the client. Transforms operate on the typed internal representation, not on raw JSON text. A transform therefore works the same way for every protocol pair.

Monoize ships 33 built-in transforms. Each transform has its own page in this section.

Where transforms attach

ScopeConfigured inRuns for
ProviderThe Provider edit dialogEvery request that Provider serves
GlobalSettings, global transform chainEvery request
API keyThe key edit dialog in Token ManagementEvery request with that key

Execution order per phase: Provider chain first, then the global chain, then the API-key chain. Inside one chain, rules run in list order. The output of one rule is the input of the next.

Not every transform supports every scope. API-key scope excludes transforms that could change routing, pricing, or token ceilings. Each transform page lists its supported scopes.

Rule fields

Each rule has five fields:

{
  "transform": "prompt_inject_system",
  "enabled": true,
  "phase": "request",
  "models": ["gpt-4*"],
  "config": { "content": "Answer in French.", "position": "append" }
}
  • transform: the transform type ID.
  • enabled: a disabled rule is skipped.
  • phase: request or response. The rule runs only in its phase.
  • models: optional glob list. The rule runs only when at least one glob matches the logical model. * matches any sequence; ? matches one character. Matching is case-sensitive and anchored.
  • config: transform-specific options. The dashboard renders a form from each transform's schema.

Model matching always uses the logical model name that the client requested, not the redirected upstream name.

Transform families

FamilyPurposeTransforms
Auto-cacheImprove provider-side prompt cachingcache_anthropic_system, cache_anthropic_tool_use, cache_openai_prompt, cache_openai_tool_use, cache_user_id
FieldSet, remove, or cap raw request/response fieldsfield_override_max_tokens, field_remove, field_set
ImageCompress, convert, or resolve imagesimage_compress_input, image_compress_output, image_enable_openai_generation_tool, image_markdown_to_output, image_output_to_markdown, image_resolve_urls
PromptReshape the message listprompt_append_empty_user, prompt_inject_system, prompt_strip_anthropic_billing_header, prompt_strip_orphaned_tool_calls
ReasoningMove, strip, or re-encode reasoning contentreasoning_content_to_summary, reasoning_effort_to_budget, reasoning_effort_to_model_suffix, reasoning_from_think_xml, reasoning_inject_content_field, reasoning_strip_encrypted, reasoning_strip_input, reasoning_strip_output, reasoning_summary_to_raw_cot, reasoning_to_think_xml
RoleRewrite or merge message rolesrole_developer_to_system, role_merge_consecutive, role_system_to_developer
StreamControl streaming behaviorstream_force, stream_split_sse_frames

Verify a transform

  1. Enable request capture for a test API key.
  2. Send a request that matches the rule's model globs.
  3. Open the capture viewer. Compare the request before transforms with the encoded upstream request.
  4. The viewer also lists the transform chain that ran, in order, with each rule's scope.

On this page