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
| Method | Endpoint | Contract |
|---|---|---|
GET | /v1/models | OpenAI-compatible model list |
POST | /v1/responses | OpenAI Responses, streaming or non-streaming |
GET | /v1/responses | OpenAI Responses WebSocket transport |
POST | /v1/responses/compact | Responses compaction |
POST | /v1/chat/completions | OpenAI Chat Completions |
POST | /v1/messages | Anthropic Messages |
POST | /v1/embeddings | Embeddings |
POST | /v1/images/generations | Image generation |
POST | /v1/images/edits | Multipart image edits |
Every forwarding endpoint also has an /api/v1/... alias.
Upstream Channel types
| Type | Native upstream contract |
|---|---|
responses | OpenAI Responses-compatible |
chat_completion | OpenAI Chat Completions-compatible |
messages | Anthropic Messages-compatible |
gemini | Google Gemini native |
openai_image | OpenAI-compatible image API |
replicate | Replicate 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_urlstransform.