How lolmaobruhhh/mimo2api- works
MiMo2API is a FastAPI proxy that exposes MiMo AI Studio through OpenAI-compatible and Anthropic-compatible APIs. The main workflow accepts a client request, prepares messages and optional media/tools, sends it to MiMo, and returns a converted response or stream. Separate branches provide model discovery, account management, Anthropic batches, and usage/session tracking. Some relationships are supported by README architecture or module references rather than complete call-site excerpts; those limits are reflected in the edges.
Main entry points: routes.py OpenAI API and admin routes · main.py FastAPI application · anthropic_routes.py Anthropic endpoints · mimo_client.py MiMo HTTP and SSE client
Components 17
API interfaces
- FastAPI application
main.py - OpenAI API and admin routes
app/routes.py - Anthropic endpoints
app/anthropic_routes.py - Message batches
app/batch.py
Request processing
- Anthropic format conversion
app/anthropic.py - OpenAI data models
app/models.py - Streaming tool sieve
app/tool_sieve.py - Tool-call parsing
app/tool_call.py - Message and media preparation
app/utils.py
Configuration and state
- Accounts and settings
app/config.py - Conversation sessions
app/session_store.py - Usage statistics
app/usage_store.py - Response storage
app/response_store.py
MiMo integration
- MiMo HTTP and SSE client
app/mimo_client.py
Other components
- API client
- Admin user
- MiMo AI Studio
Connections 21
- API client → FastAPI application: sends requests
README.md - Admin user → OpenAI API and admin routes: manages accounts
README.md - FastAPI application → OpenAI API and admin routes: registers routes
main.py - FastAPI application → Anthropic endpoints: registers routes
main.py - FastAPI application → Message batches: initializes batches
main.py - OpenAI API and admin routes → MiMo HTTP and SSE client: proxies chat
README.md - OpenAI API and admin routes → Streaming tool sieve: streams filtered output
README.md - OpenAI API and admin routes → Tool-call parsing: parses tool calls
README.md - OpenAI API and admin routes → Message and media preparation: prepares messages
app/routes.py - OpenAI API and admin routes → OpenAI data models: uses request models
app/routes.py - OpenAI API and admin routes → Accounts and settings: reads account settings
app/routes.py - OpenAI API and admin routes → Conversation sessions: tracks conversations
app/routes.py - OpenAI API and admin routes → Usage statistics: records usage
app/routes.py - OpenAI API and admin routes → Response storage: stores responses
app/routes.py - Anthropic endpoints → Anthropic format conversion: converts messages
app/anthropic_routes.py - Anthropic endpoints → MiMo HTTP and SSE client: calls MiMo
app/anthropic_routes.py - Anthropic endpoints → Message batches: serves batch APIs
app/anthropic_routes.py - Message batches → Anthropic format conversion: converts batch requests
app/batch.py - MiMo HTTP and SSE client → Accounts and settings: uses account credentials
app/mimo_client.py - MiMo HTTP and SSE client → MiMo AI Studio: sends chat requests
README.md - Message and media preparation → MiMo AI Studio: uploads media
app/utils.py