NextChat
Connect NextChat to RunAPI with a custom endpoint and model.
Connect NextChat to RunAPI through its custom OpenAI endpoint. NextChat composes its operation path differently from the other clients in this group, so use the exact endpoint value below. Create a standard RunAPI API key in the Authentication Guide before continuing.
Install or deploy NextChat
Choose a desktop release or deployment method from the official NextChat repository, then open Settings.
Configure the custom endpoint
- In the Web application, enable Custom Endpoint and select OpenAI. The desktop application always uses custom configuration.
- Set the endpoint address to
https://runapi.aiwithout/v1. - Enter your RunAPI API key.
- Under Custom Model Name, add an exact identifier from the Model Catalog, then select it for the current chat.
This setting is NextChat’s endpoint root, not the OpenAI-compatible Base URL used by an OpenAI SDK. NextChat appends v1/chat/completions itself, producing https://runapi.ai/v1/chat/completions. Its OpenAI client does not fetch the RunAPI model list, so add the identifier manually instead of waiting for discovery.
Configure a self-hosted deployment
For a self-hosted installation, set these environment variables and redeploy or restart the application:
BASE_URL=https://runapi.ai
OPENAI_API_KEY=YOUR_RUNAPI_API_TOKEN
CUSTOM_MODELS=+YOUR_RUNAPI_MODEL_ID
The + prefix adds the model without replacing the application’s existing model entries.
Verify the connection
Start a new chat, select the custom RunAPI model, and send Reply with the word connected. A normal complete or streamed response confirms the custom endpoint is active.
Troubleshoot
- The request URL contains
/v1/v1/chat/completions: remove/v1from the endpoint address and usehttps://runapi.ai. - NextChat still uses a built-in model: add the exact identifier under Custom Model Name, then reselect it in the current chat.
- Web settings have no effect: confirm Custom Endpoint is enabled; the desktop and Web applications handle this switch differently.
- Self-hosted changes have no effect: restart or redeploy after changing
BASE_URL,OPENAI_API_KEY, orCUSTOM_MODELS.
For shared protocol behavior, use the LLM API Quickstart. For request and response fields, use the Chat Completions API Reference.