Your privacy choices

Allow optional cookies for referral attribution, visit analytics, and Google Ads purchase measurement.

ima Custom Models: API Key, Base URL and Troubleshooting

Configure a custom model in ima with an API Key, Base URL and exact model ID. Verify a response, troubleshoot authentication and request errors, and distinguish chat-model setup from knowledge-base API access.

This guide connects ima to an external chat-model API. Use a client version with an “Add custom model” option; desktop and mobile menus may differ. Keep the API Key and Base URL from the same provider, copy the exact model ID from its current list, and treat models in old screenshots as examples. Enter a Base URL rather than a full /chat/completions request URL; avoid repeating /v1. Start with default length settings and a short question. Saving a configuration does not confirm a successful API call.

ima Custom Models: API Key, Base URL and Troubleshooting

Step 1: Open the Model Selector

At the bottom of the ima copilot chat screen, find the "DS Quick" button highlighted by the red box in Figure 1. Tap it to open the model selection menu.

Mobile ima screen showing the row of chat controls below the message box, with the DS Quick button highlighted in red to indicate where to open the model selection menu.Mobile ima screen showing the row of chat controls below the message box…

Step 2: Open "Add Custom Model"

Find the "Add custom model" button in the model menu and tap it to open the custom model configuration page.

Mobile custom-model screen in ima, with online search and reasoning-mode controls above the provider models and the Add custom model button highlighted in red.Mobile custom-model screen in ima, with online search and reasoning-mode…

Step 3: Select a Model Provider (Choose "Custom" if Needed)

On the "Add custom model" page, open the "Model provider" menu shown in Figure 4. You can choose a preset provider such as DeepSeek, Kimi, or Zhipu. To connect a third-party or self-hosted model, choose "+ Custom." Custom is selected by default, so you can skip this step if it is already active.

Expanded provider menu for a custom model in ima, listing providers such as DeepSeek, Kimi, Zhipu, MiniMax, Hunyuan, Qwen, and Xiaomi, with Custom selected.Expanded provider menu for a custom model in ima, listing providers such…

Step 4: Enter the Core Model Details

Enter the three required values highlighted in Figure 5:

  • Endpoint: Enter the model's API endpoint (for example, https://api.llm-token.cn/v1; replace it with the actual endpoint you want to connect).
  • API Key: Enter the model's API credential (in a format such as sk-xxxxxx...; obtain it from the model provider).
  • Model name: Enter the model name (for example, gpt-5.5 or claude-sonnet-4-6; it must match a model supported by the endpoint).

Leave the advanced input and output length settings at "Use default value."

Custom-model configuration screen in ima showing the required endpoint https://api.llm-token.cn/v1, API Key, and model name fields with examples such as gpt-5.5 and claude-sonnet-4-6, plus the Save button in the upper-right corner.Custom-model configuration screen in ima showing the required endpoint h…

Step 5: Save the Custom Model

After entering the values, tap "Save" in the upper-right corner as indicated in Figure 5. The custom model is automatically added to the "Custom models" list, as shown in Figure 6 where claude-opus-4-8 has been added and is ready to select.

Later Use: Switch to a Custom Model

Return to the model selection menu by using the "DS Quick" button from Step 1. Your newly added model appears under "Custom models" as shown in Figure 6; tap it to switch models~

Mobile model selection menu showing online search and reasoning controls, several preset models, and the custom models gpt-5.5 and claude-opus-4-8, with claude-opus-4-8 selected.Mobile model selection menu showing online search and reasoning controls…

Troubleshoot custom-model requests

SymptomCheck first
Authentication error or 401Is the Key complete, valid and issued by the provider of this endpoint?
Model not found or access deniedDoes the exact model ID exist in the current list, and can this Key access it?
404 or endpoint not foundCheck the Base URL, full request paths and duplicate /v1/v1.
Saved successfully but sending failsSelect the new configuration; check credits, service status and the client network.
Short questions work but longer content failsCheck input/output limits, context budget and provider limits.

When contacting support, include the request time, model ID, full error and request ID if available. Hide the API Key.

Custom chat models and the ima knowledge-base API

This configuration lets ima call an external chat model. For an external agent to read or write an ima knowledge base, separately verify the official interfaces, authentication and permissions. Saving a custom chat model does not configure that access.

Confirm model IDs and prices

Copy the exact ID from the provider’s current catalogue. Check input, output and cache rates separately; do not infer current availability or prices from old screenshots.

Current models and billing

Input, output and cached input can have different rates. For image, video or per-request models, check the stated billing unit. Use the current price page for model IDs and rates; actual charges follow billing records.

View current model prices