Droid API Setup: How to Connect Custom AI Models

Droid supports both built-in and external AI models, giving you more flexibility for coding tasks. This guide walks you through connecting an external API, configuring your setup, troubleshooting common issues, and using Kimi to power AI-assisted development. Note: This guide is for Droid CLI only. Custom models are currently supported only in the CLI and are not available in other Droid products.

10 min read2026-08-12
How to Connect Kimi API to Droid

Want to use your own AI model for coding without a complicated setup? Droid makes that easier by supporting external APIs in its CLI, so you can connect a custom model that fits your workflow. This guide shows you how to set up the API, fix common issues, and use Kimi in Droid. Keep reading to get started.

What is Droid?

Droid is an AI coding tool that helps developers write code, solve errors, and handle development tasks more efficiently. It supports built-in AI models and also lets users connect custom models through its CLI for more flexibility. This makes it useful for different coding workflows, whether you need quick help or a more personalized setup.

How to use built-in AI models in Droid?

Built-in AI models make it easy to start coding with Droid because you do not need to connect to any external API first. Once the app is installed, you can pick a model inside the platform and begin using AI help for code analysis, feature work, bug fixes, and reviews. Here's how to get started with Droid:

Step 1: Install and open Droid

Start by downloading the Factory App on your device and completing the installation. After that, open the app and sign in to your account. This gives you access to Droid and its built-in AI features inside the app.

Install and open Droid

Step 2: Connect Droid to your project folder

Set your working directory to the codebase you want to work on. This links Droid with your local project so it can read the files, understand the code structure, and support your development tasks with better context.

Connect Droid to your project folder

Step 3: Choose a built-in model and start prompting

Open the model selector and pick one of the built-in AI models available in Droid. Once the model is selected, you can start giving prompts such as asking it to analyze the codebase, fix a bug, review code, or build a feature.

Choose a built-in model and start prompting

How to connect Droid with an external API?

Connecting Droid to an external API gives you more freedom to work with the model you prefer instead of staying limited to built-in options. The setup happens inside the Droid CLI by adding a custom model to the settings file, and once it is saved, the model becomes available from the /model menu. The steps below use Kimi as a simple example, so you can see how the full setup works from API key to model selection:

Step 1: Get a Kimi API key from Moonshot AI

Start by creating or copying yourKimi API key from Moonshot AI. You will need this key because Droid uses it to connect with the Kimi API and send requests through your own account. It is best to save the key as an environment variable such as MOONSHOT_API_KEY so it can be used safely inside the settings file.

Get a Kimi API key from Moonshot AI

Step 2: Open the Droid settings file

Next, open the settings file where custom models are added in Droid CLI. On macOS, the file path is ~/.factory/settings.json. On Windows PowerShell, use %USERPROFILE%\.factory\settings.json. This is the main file where Droid reads your custom model configuration.

Step 3: Add Kimi as a custom model

Inside settings.json, add Kimi under the customModels array. This tells Droid which model to use, which API endpoint it should call, which provider format it follows, and which API key should be used for authentication. If the file already has other settings, do not replace everything, just add this model object inside the existing customModels array.

```json { "customModels": [ { "model": "kimi-k3", "displayName": "Kimi K3", "baseUrl": "https://api.moonshot.ai/v1", "apiKey": "${MOONSHOT_API_KEY}", "provider": "generic-chat-completion-api", "maxOutputTokens": 16384 } ] } ```

Step 4: Save the file and restart Droid

After adding the configuration, save the file and restart Droid CLI. This makes sure Droid reloads the updated settings and recognises the newly added custom model properly.

Step 5: Select the Kimi model using /model inside Droid

Open Droid CLI and run the /model command. Your Kimi setup should now appear in the Custom models section. Select it from the list to make Kimi the active model for your coding session.

Step 6: Run a task

Once Kimi is selected, you can start using it for real work in Droid. Try a prompt like reviewing code, fixing a bug, or explaining a codebase. Droid will send the request through the Kimi API and use that model for the task.

Benefits of using the Kimi API

After connecting Kimi to Droid, it becomes much more than just an external model in the CLI. It turns into a practical coding assistant that fits into your daily development workflow and helps with both small coding jobs and larger engineering tasks. Here are some benefits of using Kimi API:

  • Boost development efficiency

Kimi can help you move through everyday coding tasks more quickly by generating code, explaining logic, and suggesting fixes while you work. This means you do not need to switch between multiple tools for simple development support. With Kimi inside Droid, routine programming work becomes faster to manage.

  • Write more reliable code

Kimi can review your code, point out possible issues, and help improve the structure before small mistakes turn into bigger problems. This kind of early feedback is useful when you want cleaner logic and better maintainability. Over time, it can help you build code that is easier to test, update, and understand.

  • Handle diverse development tasks

Kimi is not limited to writing code from scratch. It can also help with refactoring, documenting code, understanding unfamiliar projects, and supporting feature development across different tasks. This makes it a flexible option for developers who want one AI model to assist with many parts of the workflow.

Troubleshooting common errors for connecting APIs

Connecting an external API key in Droid is usually straightforward, but small setup mistakes can still cause problems. Most issues come from the settings file, provider name, API key, or model server configuration rather than Droid itself. The good part is that these errors are often easy to fix once you know where to look.

Model not appearing in selector

  • Check JSON syntax in ~/.factory/settings.json or config.json if you are using the legacy format

  • Settings changes are detected automatically through file watching

  • Verify that all required fields are present in the custom model configuration

"Invalid provider" error

  • Make sure the provider value is exactly anthropic, openai, or generic-chat-completion-api

  • Check for spelling mistakes and correct capitalisation in the provider field

Authentication errors

  • Verify that your API key is valid and has available credits

  • Check that the API key has the correct permissions for the provider

  • Confirm that the base URL matches the API endpoint in the provider’s documentation

Local model won’t connect

  • Make sure your local model server is running, such as ollama serve

  • Verify that the base URL is correct and includes /v1/ if the provider requires it

  • Check that the model has already been pulled or is available locally

Rate limiting or quota errors

  • Check your provider’s API rate limits and usage quotas

  • Monitor your usage from the provider dashboard to see whether limits have been reached

Conclusion

Using custom APIs in Droid gives you more control over how you build, test, and improve code with AI. Once the setup is in place, it becomes easier to shape your coding workflow around the model that fits your needs. Whether you stay with built-in options or connect an external model, Droid gives you a flexible way to bring AI into development. If you want a simple place to start with a custom setup, Kimi is worth trying in Droid. It can be a practical choice for making everyday coding work smoother and faster.

FAQ

What AI models does Droid support?
Droid supports both built-in AI models and custom models added through its CLI. External setup works with provider types like Anthropic, OpenAI, and generic chat-completion APIs. This gives users the flexibility to work with official APIs, some open-source providers, or local models depending on their setup.
What information is required to configure an external API?
To configure an external API in Droid, you usually need the model ID, display name, base URL, API key, and provider type. Some setups may also include optional fields like max output tokens, extra arguments, or extra headers. These details help Droid connect to the model correctly.
Can I switch between built-in and external AI models?
Yes, Droid lets you switch between built-in and external models. Built-in models can be selected in the app, while custom models can be chosen from the /model menu in the CLI after setup. This makes it easy to use different models for different coding tasks.
Why am I seeing a rate limit or quota error?
This usually means your API provider has reached a usage limit, request cap, or billing quota. Check your provider dashboard to review credits, usage, and rate limits. Once the limit issue is resolved, the model should work again in Droid without any further configuration changes needed.
You Might Also Like
Install Claude Code: Full Guide for Windows & Mac
Install Claude Code: Full Guide for Windows & Mac
2026-08-12
How to Connect External APIs to Roo Code
How to Connect External APIs to Roo Code
2026-08-12
10 No-Code AI Agents to Automate Workflows in 2026
10 No-Code AI Agents to Automate Workflows in 2026
2026-08-12
AI Agent Frameworks Explained: Architecture, Tools, and APIs
AI Agent Frameworks Explained: Architecture, Tools, and APIs
2026-08-12
Kimi K3 Pricing | Plans, Membership & API Costs
Kimi K3 Pricing | Plans, Membership & API Costs
2026-08-12