AI Models
How to configure AI models.
Mkdirs uses AI models to analyze the content of the website and automatically fill in the submission form, which improves the efficiency of the submission process.
Mkdirs uses Vercel AI SDK to wrap AI models and supports OpenAI ChatGPT, Google Gemini, DeepSeek, XAI and OpenRouter models by default, which can be selected according to the needs of the directory.
Configuration
Determine the AI model to use
You can choose to use google, deepseek, openai, xai or openrouter as the AI model, and set the DEFAULT_AI_PROVIDER variable in the .env file.
# .env
# [only required if you are using AI models to auto fill the submission form]
# default ai provider: ``, `google`, `deepseek`, `openai`, `xai`, `openrouter`
# -----------------------------------------------------------------------------
DEFAULT_AI_PROVIDER=1、DEFAULT_AI_PROVIDER is not configured with any AI model, so the AI autofill feature is not enabled by default.
2、Different models have different effects, we recommend using the Google Gemini model, which has a larger context window, better effect, and is free.
3、If you want to use other AI models, please refer to the documentation of Vercel AI SDK, add the dependency library of other AI models, and then configure it in Mkdirs.
Get the API Key of the corresponding AI model
2.1 Get Google Gemini API Key
Link to get the API Key: Google Gemini API Key
# .env
# [only required if you are using Google Gemini]
# NOTE: if you set `DEFAULT_AI_PROVIDER=google`, you should set this API_KEY
# -----------------------------------------------------------------------------
GOOGLE_GENERATIVE_AI_API_KEY=2.2 Get DeepSeek API Key
Link to get the API Key: DeepSeek API Key
# .env
# [only required if you are using DeepSeek]
# NOTE: if you set `DEFAULT_AI_PROVIDER=deepseek`, you should set this API_KEY
# -----------------------------------------------------------------------------
DEEPSEEK_API_KEY=2.3 Get OpenAI ChatGPT API Key
Link to get the API Key: OpenAI ChatGPT API Key
# .env
# [only required if you are using OpenAI]
# NOTE: if you set `DEFAULT_AI_PROVIDER=openai`, you should set this API_KEY
# -----------------------------------------------------------------------------
OPENAI_API_KEY=2.4 Get XAI API Key
Link to get the API Key: XAI API Key
# .env
# [only required if you are using XAI]
# NOTE: if you set `DEFAULT_AI_PROVIDER=xai`, you should set this API_KEY
# -----------------------------------------------------------------------------
XAI_API_KEY=2.5 Get OpenRouter API Key
Link to get the API Key: OpenRouter API Key
# .env
# [only required if you are using OpenRouter]
# NOTE: if you set `DEFAULT_AI_PROVIDER=openrouter`, you should set this API_KEY
# -----------------------------------------------------------------------------
OPENROUTER_API_KEY=
OPENROUTER_MODEL=Enable the AI autofill feature
If you need to enable the AI model to implement the autofill feature, please set SUPPORT_AI_SUBMIT to true.
# src/lib/constants.ts
# support AI submit, default is false
# NOTE: if you set true, you should make sure the AI provider
# and the API_KEY is set in the env variables.
# if something is wrong in AI submit, you can set false to disable it.
export const SUPPORT_AI_SUBMIT = true;1、If you encounter any issues after enabling the AI autofill feature, you can set SUPPORT_AI_SUBMIT to false to disable the AI autofill feature, and then enable it after the problem is fixed.
2、The AI autofill feature is disabled by default, so the AI autofill feature is not enabled. The reason why a separate SUPPORT_AI_SUBMIT variable is used to control it is that the AI model may be used for other functions in the future, so each function needs a separate variable to control it.
3、Please note that the success rate of the AI autofill feature is not 100%, if the webpage content is not captured or the SEO information is not accurate, it may lead to the AI model unable to correctly parse the webpage content, and finally lead to the AI autofill feature failure.
After configuration of AI models, the "AI Autofill" button will appear in the submission form if the AI autofill feature is enabled, and click the button will trigger the AI model to automatically parse the webpage content and fill in the form.

Video tutorial
This video demonstrates how to use the AI model to automatically fill in the submission form.
Further reading
Last updated on
