OpenAI API Mode
What Is OpenAI API Mode?
OpenAI API mode exposes the configured MADA agent team through an OpenAI-compatible HTTP API. This is intended for tools that already know how to speak to /v1/models and /v1/chat/completions, such as Open WebUI.
Starting OpenAI API Mode
Launch the API server with:
You can also launch it through the main entrypoint:
By default, the server listens on http://0.0.0.0:8000 and exposes the model name mada.
Useful Options
If you want the API to require a client key:
If your streamable HTTP MCP servers require a bearer token:
Connecting Open WebUI
In Open WebUI, add a new OpenAI connection with:
- Base URL:
http://localhost:8000/v1 - API Key: any string if you did not configure
--api-key, otherwise the value you configured - Model: the value from
--model-name, such asmada-team
Open WebUI sends the full chat history in each request. The MADA API mode rebuilds the conversation for each HTTP request so callers do not share state with the CLI or Gradio sessions.