58API Help Center58API Help Center
User GuideAI ApplicationsAPI DocumentationHelp & Support

NextChat - lightweight cross-platform AI client

Connect NextChat to 58API and configure custom interfaces and models.

Address filling rules

NextChat automatically appends v1/chat/completions to the interface address, so enter https://api.58api.net here and do not add /v1.

NextChat is an open source lightweight AI conversation client that provides web, desktop and self-hosted deployment methods, and supports custom OpenAI compatible interfaces.

Preparation before use

  1. Open the 58API console and create an API Key.
  2. Copy the exact model ID to use from the 58API model list.
  3. Install the NextChat client, or open your own NextChat web deployment.

Configuration parameters

NextChat fieldFill in the content
Model service providerOpenAI
Interface addresshttps://api.58api.net
API KeyAPI Key created in 58API console
Custom model name-all,+<model ID>@OpenAI; multiple models use -all,+<model ID A>@OpenAI,+<model ID B>@OpenAI
modelSelect the 58API model just added as the default model for new conversations

In-client configuration

  1. Open NextChat and go to Settings/Settings.
  2. The web version turns on custom interface; the desktop version usually directly displays the custom interface field and does not necessarily display this switch.
  3. Set Model Service Provider to OpenAI.
  4. Fill in the interface address https://api.58api.net.
  5. Paste your own 58API API Key in API Key.
  6. Fill in custom model name -all,+<model ID>@OpenAI (separate multiple models with commas and add @OpenAI to each model), then save.
  7. In the Model on the settings page, change the default model to the newly added 58API model (NextChat default is gpt-4o-mini, not provided by 58API; switching models only takes effect on the current conversation on the conversation page), and then returns to the conversation page to send a test message.

-all hides NextChat's built-in models, most of which 58API does not provide, such as the default gpt-4o-mini. @OpenAI sends the model through the OpenAI-compatible interface configured above. Without @OpenAI, IDs such as gemini-2.5-pro and gemini-2.5-flash may be sent to NextChat's built-in Google/302.AI provider instead of 58API.

The picture below is an example of filling in; the setting layout of different versions will change slightly.

Open the custom interface in NextChat and fill in the 58API address, key and model name

Self-hosted environment variables

Docker, Vercel or other self-hosted deployments can be set up to:

OPENAI_API_KEY=<your 58API API Key>
BASE_URL=https://api.58api.net
CODE=<custom access password; separate multiple values with commas>
CUSTOM_MODELS=-all,+<model ID>@OpenAI
DEFAULT_MODEL=<model ID>

Be sure to set this when deploying publicly CODE, otherwise anyone who gets the URL can directly consume your 58API balance; the user needs to enter the password in the Access Password on the settings page.

Use commas to separate multiple models. For example:

CUSTOM_MODELS=-all,+<model ID A>@OpenAI,+<model ID B>@OpenAI

In CUSTOM_MODELS, -all hides all built-in models, + adds a model, and @OpenAI sends it through the OpenAI-compatible interface configured by BASE_URL. -<model ID> hides an individual model, and model ID=display name sets its display name. After saving the deployment platform's environment variables, redeploy or restart the application.

Vercel's one-click deployment page only requires OPENAI_API_KEY and CODE. Add BASE_URL, CUSTOM_MODELS, and DEFAULT_MODEL under the Vercel project's Settings → Environment Variables after deployment, then click Redeploy.

NextChat official Vercel deployment environment variable interface

Verification successful

  1. Create a new conversation and select the added 58API model.
  2. Send a simple test content to confirm that the answer can be returned continuously.
  3. Check the request model and time in the usage log in the 58API console.

FAQ

Request address appears /v1/v1/chat/completions

The interface address contains an extra /v1. Change https://api.58api.net/v1 to https://api.58api.net, save, and test again.

No 58API model in model selector

The current version of NextChat may not generate the complete list from the remote model endpoint automatically. Fill in the custom model name -all,+<model ID>@OpenAI; self-hosted deployments use CUSTOM_MODELS=-all,+<model ID>@OpenAI.

The web version cannot find the custom interface

Check whether the deployer restricts user-defined configuration. Your own deployment can be configured uniformly through environment variables; whether third-party public deployment opens this function is decided by the site administrator.

Return 401 or 404

  • 401: Copy the API Key again and make sure there are no extra spaces or line breaks.
  • 404: Confirm that the interface address is not included /v1, and check that the model ID is exactly the same as the 58API list.

official basis