碳塑复材科技(郑州)有限公司
Section navigation

NextChat

Connect NextChat to 魔方AI through the OpenAI-compatible endpoint and add custom models.

Prerequisites

Before you begin, make sure that:

  • The latest NextChat is installed.
  • You are signed in to 魔方AI and have created an active token under Token Management.
  • You know the exact model IDs allowed by the token. Each ID must exactly match the value shown by 魔方AI.

1. Open Settings

Open NextChat and select the Settings icon in the lower-left corner.

Open Settings in NextChat

2. Configure 魔方AI

Find the model settings and enter:

FieldValue
Model ProviderOpenAI
OpenAI Endpointhttps://www.mofangai001.cn
OpenAI API KeyYour 魔方AI token, such as sk-your-api-key
Custom ModelsAdd the models you need using the format below

The OpenAI Endpoint must be the 魔方AI site root, without /v1. NextChat appends /v1/chat/completions automatically. Adding /v1 can produce the invalid path /v1/v1/chat/completions.

Custom Models example:

+gpt-5.5@OpenAI=魔方AI-GPT-5.5,+claude-opus-4-8@OpenAI=魔方AI-Claude-Opus-4.8

Format rules:

  • + adds a model, and multiple entries are separated with commas.
  • @OpenAI routes the model through the configured OpenAI provider. Claude models also use OpenAI here because 魔方AI exposes them through an OpenAI-compatible endpoint.
  • The value to the left of = is the real model ID sent to 魔方AI and must exactly match a model allowed by the token.
  • The value to the right of = is only the display name in NextChat and can be customized.

The example models only demonstrate the syntax. Actual availability depends on the current token's model permissions. NextChat stores setting changes in its local configuration.

Configure 魔方AI in NextChat

3. Select a model

Return to the chat screen and select the model selector button above the message box.

Open the NextChat model selector

Choose the 魔方AI model you just added. The list shows the display name to the right of =, while requests still use the model ID to the left.

Select a 魔方AI custom model

4. Send a test message

Send a short message and confirm that the model responds. If the response uses the selected model without an error, the 魔方AI connection is ready.

Test a 魔方AI model in NextChat

Security

Troubleshooting

Why does the OpenAI Endpoint omit /v1?

NextChat automatically appends /v1/chat/completions to the site root. Enter https://www.mofangai001.cn, not https://www.mofangai001.cn/v1.

Why does the model not appear after I add it?

Check that every Custom Models entry starts with +, uses commas as separators, and includes @OpenAI. Reopen the model selector or restart NextChat if needed.

Why does NextChat report that the model is missing or unauthorized?

The value to the left of = must be a complete model ID allowed by the 魔方AI token. The display name to the right cannot replace the real model ID.

Why do I receive a 401 response?

Check that the full token was copied, remains enabled and unexpired, has available quota, and is allowed by any IP restrictions.

Why do I receive a 404 or see /v1/v1?

Change OpenAI Endpoint to the site root https://www.mofangai001.cn. Remove a trailing /v1 or any complete request path.

Official resources