Next Chat × AI Code With
Use AI Code With in Next Chat: Third-Party API / Relay Setup
This page shows how to connect a third-party API in open-source Next Chat so you can manage chats locally with a custom endpoint.
Download and install official Next Chat for your OS first, then enable Custom Endpoint in Settings; the API key is only entered in Next Chat, never on this page.
- Provider
- OpenAI
- API Host
- https://api.aicodewith.ai/v1
- API Key
- sk-xxxxxxxx
- Model ID
- deepseek-v4-flash
Quick setup
Download official Next Chat for your OS, enable Custom Endpoint, and enter the API host with /v1 plus your API key. Use DeepSeek, Gemini, GLM, Kimi, and more in about 3 minutes.
Download and install official Next Chat for your OS first. Open Settings (gear), enable Custom Endpoint, and enter https://api.aicodewith.ai/v1 plus your API key.
Download and install official Next Chat for your OS
From GitHub Releases v2.15.8: Windows uses NextChat_2.15.8_x64-setup.exe (msi optional); macOS uses NextChat_2.15.8_universal.dmg; Linux prefers next-chat_2.15.8_amd64.AppImage, Debian/Ubuntu can use the deb. This site does not host installers.
Windows
macOS
- Download
NextChat_2.15.8_universal.dmgRecommended
macOS Universal disk image for Intel and Apple Silicon. Open the DMG and drag NextChat to Applications.
See all files on GitHub ReleasesLinux
Download from GitHub Releases by OS: macOS uses NextChat_2.15.8_universal.dmg; Windows uses NextChat_2.15.8_x64-setup.exe. Linux uses the AppImage or deb. latest.json is an updater manifest, not an installer — do not download it. Enable Custom Endpoint and fill host plus key
Open Settings (gear icon) and enable Custom Endpoint. Keep the OpenAI provider. Enter https://api.aicodewith.ai/v1. Paste your AI Code With API key; it stays on this device.
Quick copy
API host (with /v1)
https://api.aicodewith.ai/v1
Model ID
deepseek-v4-flash
After copying, return to Next Chat: paste the API host into Custom Endpoint. Paste the API key only inside the client. The API host must include /v1.
After launching Next Chat, click the gear at the bottom left to open Settings. Keep the OpenAI provider. Keep the provider on OpenAI. Copy the API host from this page: https://api.aicodewith.ai/v1. Paste your API key, and enter custom model names as a comma-separated list such as gpt-5.6-terra,gpt-5.6-sol. Pick the model and verify
On the chat page, pick the AI Code With model you entered and send a test message. A normal reply means the setup works — then match the call by time and model name in AI Code With usage records. Saving settings is not enough.
Copy a Model ID
After enabling Custom Endpoint, enter one of these Model IDs. NextChat does not auto-fetch the AI Code With catalog:
Pick a family, then copy a Model ID into the chat page. The API host stays the same for every model.
Selected
- Provider
- DeepSeek
- Model ID
- deepseek-v4-flash
The full model list follows the AI Code With docs and pricing page; this site does not maintain a separate model list. Do not prefix IDs with openai/.
View the full model listOpen Current Conversation Settings and pick the custom model you entered (gpt-5.6-terra is checked here). Do not send the test message with a built-in OpenAI model. After selecting the custom model, send a test message. A normal reply (here gpt-5.6-terra answers Hi! How can I help?) confirms the connection; match the call by time in AI Code With usage records. Copying or saving settings is not enough.
How does Next Chat connect to AI Code With?
Next Chat calls compatible APIs through the OpenAI provider. Connecting to AI Code With only needs Settings:
- Custom Endpoint
- Open Settings (gear icon) and enable Custom Endpoint. Keep the OpenAI provider — do not switch to another built-in provider.
- API Host
- Enter https://api.aicodewith.ai/v1. Do not omit /v1, and do not paste Chatbox’s host without /v1.
- API Key
- Paste your AI Code With API key. It stays on this device — do not put it in a public repo or a screenshot.
- Model ID
- Pick or type an AI Code With Model ID in the chat page (for example, deepseek-v4-flash). NextChat does not sync this site's catalog automatically.
Flow: Next Chat → OpenAI provider + Custom Endpoint → AI Code With API. Install the official desktop client for your OS first, then enable Custom Endpoint in Settings.
Frequently asked questions
Don't have Next Chat installed?
Download v2.15.8 from GitHub Releases: Windows uses the exe (msi optional), macOS uses the universal DMG, Linux uses AppImage or deb.
Next Chat official Releases (v2.15.8)
This site does not host installers. Pick the file for your OS in the download section on this page, or open GitHub Releases.
Open GitHub ReleasesFull install guidance follows the official NextChat repository. Use the official client for this integration — do not paste other API hosts from third-party tutorials.
Common error troubleshooting
The most frequent problems fall into 4 categories.
401 / Invalid API Key
Symptom: Sending a message returns 401, Unauthorized, or Invalid API Key.
Cause: Usually the API key is invalid, mistyped, or copied with extra characters.
- Open Settings and re-paste the AI Code With API key (no extra spaces)
- Confirm the key is a valid AI Code With API key and the account has balance
- Do not put the key on this page or in a public repository
Model Not Found / Wrong Model ID
Symptom: The request reports Model Not Found, unknown model, or the typed model is missing from the dropdown.
Cause: The Model ID was mistyped, or the model is currently unavailable.
- Copy the exact Model ID from this page (e.g. deepseek-v4-flash) instead of typing it
- Confirm the current key can access that model
- Pick that model on the chat page before sending
API host error (usually a missing /v1)
Symptom: Sending a message fails, times out, or reports a wrong endpoint path / 404.
Cause: The API host is missing /v1, appends /chat/completions, or uses another relay domain.
- Confirm the value is https://api.aicodewith.ai/v1
- Remove trailing /chat/completions or guessed paths
- Confirm Custom Endpoint is enabled and the provider is still OpenAI
Requests are not going to AI Code With
Symptom: No usage record appears after sending, or traffic still hits official OpenAI.
Cause: Custom Endpoint is off, or the chat page is still on a built-in OpenAI model.
- Confirm Custom Endpoint is enabled and saved
- Confirm the API host is https://api.aicodewith.ai/v1
- After sending, match the call by time in AI Code With usage records
Need the full guide?
Every config parameter, the complete model list, and more troubleshooting live in the AI Code With docs.
Open the AI Code With docs