Monoize

What is Monoize

A Rust gateway that converts AI API protocols and routes one logical model across many upstream channels.

Overview

Monoize is an AI API gateway written in Rust. It accepts requests in OpenAI Responses, OpenAI Chat Completions, Anthropic Messages, embeddings, and image formats. It forwards each request to a configured upstream Channel. It returns the response in the protocol that the client used.

Monoize converts protocol semantics instead of renaming JSON fields. It decodes each request into a typed canonical representation. It then encodes that representation for the selected upstream protocol. The response follows the reverse path. Text, reasoning, encrypted reasoning, tool calls, tool results, images, usage counters, and stream boundaries keep their roles across conversion.

Core capabilities

  • Protocol conversion: Call any supported endpoint with any configured upstream Channel type. Monoize converts between Responses, Chat Completions, Messages, Gemini, and image protocols in streaming and non-streaming modes.
  • Routing and reliability: A logical model can route to multiple ordered Providers. Each Provider contains weighted Channels. Monoize retries retryable failures, advances to the next route, and stops fallback after sending the first response byte. See Routing and Reliability.
  • Transforms: 33 built-in transforms adjust requests and responses per Provider, per API key, or globally. See Transforms.
  • Request capture: Capture is disabled by default. When enabled, Monoize records the payload of each upstream attempt. A structured viewer displays each attempt. See Request Logs.
  • Dashboard: An embedded web dashboard manages Providers, Channels, models, API keys, users, billing, and logs. See Dashboard.

Supported endpoints

MethodEndpointContract
GET/v1/modelsOpenAI-compatible model list
POST/v1/responsesOpenAI Responses, streaming or non-streaming
GET/v1/responsesOpenAI Responses WebSocket transport
POST/v1/responses/compactResponses compaction
POST/v1/chat/completionsOpenAI Chat Completions
POST/v1/messagesAnthropic Messages
POST/v1/embeddingsEmbeddings
POST/v1/images/generationsImage generation
POST/v1/images/editsMultipart image edits

Every forwarding endpoint also has an /api/v1/... alias.

Upstream Channel types

TypeNative upstream contract
responsesOpenAI Responses-compatible
chat_completionOpenAI Chat Completions-compatible
messagesAnthropic Messages-compatible
geminiGoogle Gemini native
openai_imageOpenAI-compatible image API
replicateReplicate predictions

Limits

  • Monoize forwards tool definitions and tool calls. It does not execute tools locally.
  • Monoize does not provide OpenAI Files, vector stores, or local retrieval.
  • Fallback stops after sending the first downstream response byte. Monoize never switches Providers during an active stream.
  • Cross-family conversion preserves supported semantics. Provider-specific nested fields without a target representation are removed.
  • Image compression is disabled by default. Monoize does not fetch remote image URLs unless you configure the image_resolve_urls transform.

Next steps

On this page