Spaces:
Paused
sidebar_position: 4
slug: /llm_api_key_setup
Configure your API key
An API key is required for RAGFlow to interact with an online AI model. This guide provides information about setting your API key in RAGFlow.
Get your API key
For now, RAGFlow supports the following online LLMs. Click the corresponding link to apply for your API key. Most LLM providers grant newly-created accounts trial credit, which will expire in a couple of months, or a promotional amount of free quota.
- OpenAI
- Azure-OpenAI
- Gemini
- Groq
- Mistral
- Bedrock
- Tongyi-Qianwen
- ZHIPU-AI
- MiniMax
- Moonshot
- DeepSeek
- Baichuan
- VolcEngine
- Jina
- OpenRouter
- StepFun
:::note If you find your online LLM is not on the list, don't feel disheartened. The list is expanding, and you can file a feature request with us! Alternatively, if you have customized or locally-deployed models, you can bind them to RAGFlow using Ollama, Xinferenc, or LocalAI. :::
Configure your API key
You have two options for configuring your API key:
- Configure it in service_conf.yaml before starting RAGFlow.
- Configure it on the Model Providers page after logging into RAGFlow.
Configure API key before starting up RAGFlow
Navigate to ./docker/ragflow.
Find entry user_default_llm:
- Update
factory
with your chosen LLM. - Update
api_key
with yours. - Update
base_url
if you use a proxy to connect to the remote service.
- Update
Reboot your system for your changes to take effect.
Log into RAGFlow.
After logging into RAGFlow, you will find your chosen model appears under Added models on the Model Providers page.
Configure API key after logging into RAGFlow
:::caution WARNING After logging into RAGFlow, configuring API key through the service_conf.yaml file will no longer take effect. :::
After logging into RAGFlow, you can only configure API Key on the Model Providers page:
- Click on your logo on the top right of the page > Model Providers.
- Find your model card under Models to be added and click Add the model:
- Paste your API key.
- Fill in your base URL if you use a proxy to connect to the remote service.
- Click OK to confirm your changes.
:::note If you wish to update an existing API key at a later point: :::