Models Hub
Agent Tools

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.

Edit this page

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 sh

    After it starts, visit http://localhost:8082. The default username and password are admin / 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.

Use caseModelPricingLive status
First choice for everyday chat, a balance of speed and qualityclaude-sonnet-4-6PriceAvailability and latency
Complex reasoning and long contextgpt-5.5PriceAvailability and latency
Cheap and fast, good for high-frequency channel trafficgpt-5.4-miniPriceAvailability and latency

Model names are authoritative on the pricing page.

Setup

  1. After registering and logging in to Models Hub, click "Console" → "Token Management" → "Add Token" to create an API key, then click the copy button.

    Copying an API key from the Token Management page

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

    Selecting NewAPI in provider management

  3. On the configuration page, fill in:

    FieldWhat to enter
    API Base URLhttps://modelsok.com/v1 (use http://localhost:3000/v1 for a local Models Hub deployment)
    API KeyThe Models Hub API key you just copied

    Click Save.

  4. 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.

  5. 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.

    Switching the default chat model to the newly added model

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

SymptomCauseFix
Connection failure when saving the providerWrong API Base URL, or a local deployment used an address unreachable from the containerUse https://modelsok.com/v1 for a hosted site; confirm container networking for local deployments
401 / Invalid API keyIncomplete key, or a disabled tokenRe-copy from the Tokens page
Model management can't import models / model not found in chatMisspelled model name, or the token's group can't access itCheck the spelling on the pricing page when adding manually
Slow replies or 429Rate limiting, usually from high concurrencyRetry later; contact support for a higher limit if this persists
Nothing shows in usage logsThe bot's default chat model wasn't switched to the new oneGo 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.

On this page