RAGFlow - Open Source RAG and Agent Platform
Access the 58API chat model in RAGFlow through the OpenAI-API-Compatible (or New API) provider; knowledge base vectorization uses RAGFlow built-in TEI or other Embedding services.
Recommended suppliers
Recommended choice for accessing 58API: OpenAI-API-Compatible: This provider is provided by both RAGFlow v0.27.x stable version and v1.0 (Go rewrite). v0.26–v0.27.x can also choose 58API, and the fields and filling methods are the same; 58API is no longer in the supplier list of v1.0.0-rc1.
RAGFlow manages chat models, Embedding, Rerank, visual and speech models separately. This page is based on RAGFlow v0.27.3 (the latest stable version), you can also refer toOfficial model configuration guide。
Preparation before use
- Log in 58API, create an API Key, and confirm that the balance is sufficient.
- Confirm the exact model ID of the chat model.
- 58API currently does not provide Embedding / Rerank models. If you want to create a knowledge base, you need to prepare Embedding separately: in RAGFlow
docker/.envUncomment inCOMPOSE_PROFILES=${COMPOSE_PROFILES},tei-cpu(With GPUtei-gpu;The default model requires about 25GB of memory, which can be setTEI_MODEL=BAAI/bge-small-en-v1.5Use a small model of about 1.2GB) and then restart to enable the built-in TEI vector service; or connect to other service providers that provide Embedding. - It is recommended to use RAGFlow v0.27.3 or higher.
Open model supplier
- Log in to RAGFlow.
- Click on the avatar in the upper right corner to enter user settings.
- Open Model providers.
- Search for Available models and select OpenAI-API-Compatible (v0.27.x also select New API).

The picture shows the Model providers entrance and supplier list; if the list is long, you can directly search for OpenAI-API-Compatible.
Create 58API instance
Create an instance on the selected supplier page and fill in:
| Field | Fill in the content |
|---|---|
| Instance name | 58API or a name for easy identification |
| API Key | Your 58API API Key |
| Base URL / Base-Url | https://api.58api.net/v1 |
Click Verify to verify the connection.

The screenshot shows the old interface: the field name API-Key / Base-Url is now API Key / Base URL; the default mark in the picture is for illustration only, and the address needs to be filled in manually.
The figure takes the New API supplier page as an example (the OpenAI-API-Compatible fields are exactly the same): enter the API Key and Base-Url to fill in https://api.58api.net/v1, then click Verify. Instance names can be used 58API, to facilitate identification between multiple vendor configurations.
Just fill in the address to /v1
Do not append /models、/chat/completions or /embeddings. RAGFlow will call the corresponding path by itself according to the model type.
Add model from list
After the connection verification is passed:
- Click List models to let RAGFlow start from 58API
/v1/modelsGet the model. - Find the target model in the list and click the plus sign on the right to add it.
- Check that RAGFlow recognizes the correct type for the model.

RAGFlow will infer the type based on keywords in the model name, such as embedding, rerank, whisper / stt, etc. Automatic classification is just speculation and does not mean that the model actually supports the corresponding capabilities.
Add custom models manually
If there is no target model in the list, or the automatic classification is wrong, click the plus sign on the right side of the model area and choose to add a custom model:

| Field | How to fill in |
|---|---|
| Model name | Fill in the exact model ID returned by 58API |
| Model type | Choose LLM, Embedding, Rerank, VLM, TTS or ASR based on your real-world usage |
| Max tokens | Fill in the true upper limit of the model; if you are unsure, check the model description first. |
| Tool call | Enabled only if the model supports standard tool calls |
VLM / image2text Represents image understanding input, not image generation. This model type of RAGFlow is not a replacement for the 58API Drawing Workbench.
Set up chat and embedding models separately
After adding the model, enter Set default models:
- LLM: Select the added 58API chat model.
- Embedding: Select the vector model provided by RAGFlow's built-in TEI (such as
BAAI/bge-small-en-v1.5) or the Embedding model of other service providers; 58API currently does not have an Embedding model. - Rerank, VLM, ASR, TTS: Select only when the corresponding workflow really requires it and the model has been configured.

Embedding must be configured independently
The chat model is responsible for generating answers, and the embedding model is responsible for converting knowledge base documents and queries into vectors. 58API currently does not provide an Embedding model. The Embedding of the knowledge base must use RAGFlow's built-in TEI or other service providers; only configuring the 58API chat model cannot complete the knowledge base index.
After replacing the Embedding model, vectors from existing knowledge bases usually cannot be mixed directly. Please follow RAGFlow prompts to reparse or rebuild the index to avoid vector dimension inconsistency.
Verify connection
Verify chat
- Create a new simple Chat or Agent in RAGFlow.
- Select the 58API LLM you just configured.
- Send a plain text test to confirm the normal return.
- Check the call record in the 58API console usage log.
Verify image understanding
- In Chat settings, switch the model to 58API
deepseek-v4.1-flashand save. - Upload an image with the paperclip next to the input and ask it to describe the image.
- The model should return a description of the image content.
Validate knowledge base
- Confirm that the default Embedding has selected the built-in TEI or other service provider's vector model.
- Create a new small test Dataset and upload a small amount of text.
- Wait for parsing and indexing to complete and confirm there are no embedding endpoint or vector dimension errors.
- Ask questions in the retrieval test to make sure it returns relevant snippets.
Verification Checklist
- Vendor Choice OpenAI-API-Compatible (v0.27.x also available with 58API).
- Base URL is
https://api.58api.net/v1, Verify passed. - LLM uses the 58API chat model, and Embedding uses the built-in TEI or other service providers' vector models, which do not replace each other.
- Custom model types, Max tokens, and Tool call switches match real capabilities.
- The chat and knowledge base have completed a minimum verification respectively, and there are corresponding records in the 58API usage log.
FAQ
New API supplier not found
As of RAGFlow v1.0.0-rc1 the vendor list no longer contains New API. Directly select OpenAI-API-Compatible and fill in the same Base URL https://api.58api.net/v1。
Verify failed
Confirm that the Base URL is https://api.58api.net/v1, the API Key is complete, and check /v1/models Whether it can be accessed. Do not fill in the address to the specific operation path.
Chat is normal, but knowledge base parsing fails
The most common reason is that there is no available Embedding model configured, or the 58API chat model is mistakenly marked as Embedding. 58API does not provide an Embedding model, please use RAGFlow's built-in TEI or other Embedding services instead.
The model was identified as the wrong type
Use Add custom model after deleting the incorrect entry and manually select the correct Model type. Automatic classification by model name does not mean that the model actually has this capability.
Agent tool call failed
Verify the normal chat first after closing the Tool call. Confirm that the target model supports tool calling before opening it.
Can image models be used to generate images?
VLM/image2text in RAGFlow is an image understanding capability, not an image generation interface. Please use it when you need to generate pictures Drawing workbenchOr the corresponding image API tutorial.