This guide walks you through controlling OpenModelStudio with OpenClaw (chat bots) and Claude Code (terminal) using the same API and API key.
- OpenModelStudio running (API reachable).
- An API key from OpenModelStudio: log in to the UI → Settings → API Keys → Create (e.g. name:
OpenClaw). Copy the key once (oms_...).
OpenClaw is an AI agent that runs 24/7. You talk to it in natural language; it uses tools to call the OpenModelStudio API.
cd /path/to/OpenModelStudio
make k8s-deploy- API: http://localhost:31001
- UI: http://localhost:31000 (login:
test@openmodel.studio/Test1234)
Or API only: make dev-api → API at http://localhost:8080.
openclaw plugins install -l ./integrations/openclaw
cd ~/.openclaw/extensions/openmodelstudio && npm installEdit ~/.openclaw/openclaw.json. Under plugins.entries["openclaw-plugin"].config set:
"openclaw-plugin": {
"enabled": true,
"config": {
"baseUrl": "http://localhost:31001",
"accessToken": "oms_your_api_key_here"
}
}- Use
http://localhost:8080if you usedmake dev-api. - Allow the plugin for your agent, e.g.
agents.list[].tools.allow: ["openclaw-plugin"].
openclaw gateway- Control UI: http://127.0.0.1:18789
- Add your Anthropic (or other) API key for the agent:
openclaw agents add mainor via the UI.
In Telegram, Discord, or the Control UI, say things like:
- "List my OpenModelStudio projects."
- "Create a project called Sales and add a dataset named sales_data."
- "Start training for model X with dataset Y."
The agent uses the oms_* tools and reports back. No user needs to paste a token.
Claude Code is the Claude CLI in your terminal. You give it the same base URL and API key; it runs curl or scripts to call the OpenModelStudio API.
Same as Part 1 — e.g. make k8s-deploy (API at http://localhost:31001) or make dev-api (http://localhost:8080).
In the same terminal where you will run claude:
export OMS_BASE_URL="http://localhost:31001"
export OMS_API_KEY="oms_your_api_key_here"Use http://localhost:8080 if you used make dev-api.
claudeTell Claude: "Use the env vars OMS_BASE_URL and OMS_API_KEY for OpenModelStudio API calls."
Examples:
- "List my OpenModelStudio projects."
- "Create an OpenModelStudio project named Test."
- "Create a dataset in project <project_id> named mydata."
- "Create dummy CSV data and upload it to OpenModelStudio dataset <dataset_id>."
- "Create a PyTorch model in project <project_id> named MyModel."
- "Start OpenModelStudio training for model <model_id> with dataset <dataset_id>."
- "Get status of OpenModelStudio training job <job_id>."
- "Get metrics for OpenModelStudio training job <job_id>."
- "Launch an OpenModelStudio workspace for project <project_id>."
Claude will call the API (e.g. with curl or the Python SDK) using your base URL and API key.
| OpenClaw | Claude Code | |
|---|---|---|
| Where | Telegram, Discord, Control UI | Terminal (claude) |
| Config | ~/.openclaw/openclaw.json → baseUrl + accessToken |
OMS_BASE_URL + OMS_API_KEY in shell |
| Auth | API key in config (no user-provided token) | API key in env |
| Same API | Yes | Yes |
Both use the same REST API and API key. Production: use HTTPS and good secret handling; see OpenClaw Integration and API for agents.