Use Memoh with Models Hub: Add a Model Provider
Add the NewAPI provider in Memoh's web admin panel pointed at Models Hub, set a bot's default chat model, with recommended models and error fixes.
Memoh is an open-source, self-hosted AI agent platform where each bot runs in its own container with persistent memory, supporting 9 channels including Telegram, Discord, Feishu, QQ, WeCom, WeChat, and email. Its provider management has a built-in NewAPI preset for gateways built on the open-source new-api project — which is exactly what powers Models Hub, so that's the one to pick. This page covers only the connection step — see the official documentation for containerization, the memory engine, and other features.
Three things you need
A Models Hub API key, the endpoint https://modelsok.com/v1, and a model name.
Prerequisites
-
Memoh deployed. One-click Docker install (Docker required):
curl -fsSL https://memoh.sh | sudo shAfter it starts, visit
http://localhost:8082. The default username and password areadmin/admin123— change the password immediately after your first login. Project page: GitHub. -
A Models Hub API key from the Tokens page, in a group that can access the models you want.
Recommended models
| Use case | Model | Pricing | Live status |
|---|---|---|---|
| First choice for everyday chat, a balance of speed and quality | claude-sonnet-4-6 | Price | Availability and latency |
| Complex reasoning and long context | gpt-5.5 | Price | Availability and latency |
| Cheap and fast, good for high-frequency channel traffic | gpt-5.4-mini | Price | Availability and latency |
Model names are authoritative on the pricing page.
Setup
-
After registering and logging in to Models Hub, click "Console" → "Token Management" → "Add Token" to create an API key, then click the copy button.

-
Log in to the Memoh web admin panel, go to provider management, and click NewAPI.

-
On the configuration page, fill in:
Field What to enter API Base URL https://modelsok.com/v1(usehttp://localhost:3000/v1for a local Models Hub deployment)API Key The Models Hub API key you just copied Click Save.
-
Once the provider is configured, go to the model management page and click auto-import, or manually add one of the recommended model names above.
-
Go to the bot settings page, and in the model configuration section, switch the default chat model to the one you just added, then click Save.

Verify
Send "hello" in Memoh's Web UI, or through a bound channel like Telegram or Feishu. A normal reply means you're connected. Then check Usage logs in the Models Hub console; a request under that model name appears within seconds, confirming traffic went through Models Hub.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
| Connection failure when saving the provider | Wrong API Base URL, or a local deployment used an address unreachable from the container | Use https://modelsok.com/v1 for a hosted site; confirm container networking for local deployments |
401 / Invalid API key | Incomplete key, or a disabled token | Re-copy from the Tokens page |
| Model management can't import models / model not found in chat | Misspelled model name, or the token's group can't access it | Check the spelling on the pricing page when adding manually |
Slow replies or 429 | Rate limiting, usually from high concurrency | Retry later; contact support for a higher limit if this persists |
| Nothing shows in usage logs | The bot's default chat model wasn't switched to the new one | Go back to bot settings and confirm the model configuration |
More in Troubleshooting.
FAQ
How is it billed? Per input and output token actually consumed in each conversation, at the price on each model's pricing page. Usage logs itemize every request.
Why is the provider called NewAPI instead of Models Hub? NewAPI is the provider type built into Memoh, named after the gateway protocol it's compatible with — it's not a specific site. You just enter the Models Hub endpoint and key into it.
How do I switch models? Go back to the bot settings page's model configuration section and pick another model already imported in model management.
Related
Use Chatbox with Models Hub: API Host and Key Setup
Add an OpenAI API-compatible model provider in the Chatbox desktop client, enter your Models Hub API host and key, and call Claude, GPT and more with one key, with verification and troubleshooting.
Use AstrBot with Models Hub: Model Provider Setup
Add an OpenAI model provider in AstrBot pointed at Models Hub, set it as the default chat model, and use it across QQ, Feishu, and more, with recommended models and error fixes.