RAGFlow
Add AI/ML API as a model provider in RAGFlow and use it for chat, embeddings, and vision across your knowledge bases and agents.
About
RAGFlow is an open-source Retrieval-Augmented Generation (RAG) engine that pairs deep document understanding with agent capabilities. You upload documents into knowledge bases, and RAGFlow chunks, embeds, retrieves, and answers over them.
AI/ML API is a built-in model provider in RAGFlow. It shipped upstream in PR #17311 (merged July 24, 2026) and is available to users from release v0.27.0 onward — add it in Model providers with one key and use AI/ML API models across chat, embedding, and image-to-text tasks.
Quick start
When to use AI/ML API with RAGFlow
AI/ML API works well with RAGFlow when you want:
one key covering the chat, embedding, and vision models a RAG pipeline needs
to change the answering model without re-embedding your knowledge bases
to compare models from different vendors inside the same RAGFlow instance
Prerequisites
Before you start, make sure you have:
RAGFlow v0.27.0 or newer (see github.com/infiniflow/ragflow)
an AI/ML API key from aimlapi.com/app/keys
a model ID from aimlapi.com/models
The base URL is:
Need a key first? Use API Key Management.
Supported model types
The provider registers three model types in RAGFlow:
Chat
answering, agents, and assistants
Embedding
indexing documents into knowledge bases
Img2txt
reading images and scanned pages
Video, audio, and image-generation models are not exposed through this provider.
Model selection
The provider ships a short preset list, and you can add any other AI/ML API model by its exact ID.
Good starting models
openai/gpt-4o— chat and image-to-textanthropic/claude-opus-4-8— long-context answeringgoogle/gemini-2.5-flash— lower latency and lower costopenai/text-embedding-3-small— embeddings
For the full catalog, use All Model IDs.
Config checklist
Make sure these values are set:
provider: aimlapi.com in Model providers
API key: your AI/ML API key
base URL:
https://api.aimlapi.com/v1(built in; override withAIMLAPI_API_URLif you run through a proxy)default models: set under Set default models
Troubleshooting
Links
All Model IDs
Last updated
Was this helpful?