Skip to content

OpenAI-compatible proxy

The route is:

POST https://api.maskdoor.com/v1/proxy/chat/completions
Authorization: Bearer mp_live_...

The key needs proxy:llm. Store the provider credential in the workspace. An owner or admin does that at app.maskdoor.com/settings?tab=byok. MaskDoor decrypts the provider key for the outbound call and does not put it in the prompt.

Send the workspace and session so the dictionary matches the rest of the agent run:

X-Muteproxy-Workspace: your-workspace-id
X-Muteproxy-Session: your-session-id

Both headers are required. The body is a chat completion with a messages array. MaskDoor tokenizes message content, calls the provider, and restores tokens in the completion before it returns.

This is not base_url = https://api.maskdoor.com/v1 with no other changes. The path is /v1/proxy/chat/completions. LangChain and CrewAI should set that endpoint and keep one session id for the whole run.

If the LLM client is not configured on the cluster, the route returns 503.

A completion is charged against the document-page allowance. One page is 2,500 characters. An image or a scanned PDF on this route counts as OCR pages in that same pool. MCP calls are a separate counter. The numbers are in Plans.