Prerequisites
Before you begin, please ensure:-
AnythingLLM installed
Download and install AnythingLLM from official website or visit GitHub -
APIMart API Key obtained
Log in to APIMart Console to get your API key (starts withsk-)
Tip: If you donโt have an APIMart account yet, please register at APIMart and obtain an API key first.
Step 1: Launch AnythingLLM and Access Settings
1.1 Start the Application
- Launch AnythingLLM desktop application or access the web version
- Welcome screen will appear on first launch
- Click the Open settings button in the bottom left corner

Note: AnythingLLM supports desktop versions (Windows, macOS, Linux) and Docker deployment.
1.2 Navigate to LLM Configuration
In the settings page:- Find LLM Preference in the left menu
- Click to enter LLM configuration page
Step 2: Configure APIMart API
2.1 Select LLM Provider
On the LLM configuration page:- Find the LLM Provider dropdown menu
- Select Generic OpenAI

Why Generic OpenAI? APIMart provides OpenAI-compatible API interface, so selecting Generic OpenAI provider in AnythingLLM allows you to use APIMart services.
2.2 Configure API Information
After selecting Generic OpenAI, fill in the following configuration:| Field | Value |
|---|---|
| API Key | Your APIMart API key (sk-xxxxxxxxxxxx) |
| Base URL or API Base Path | https://api.apimart.ai/v1 |
| Chat Model or Model Name | Enter specific model name (see recommended models below) |

| Model Name | Model ID | Features |
|---|---|---|
| GPT-5 | gpt-5 | Latest and most powerful |
| GPT-4o | gpt-4o or chatgpt-4o-latest | High-quality conversation |
| GPT-4o Mini | gpt-4o-mini | Fast and economical |
| Claude Sonnet 4.5 | claude-sonnet-4-5-20250929 | Excellent for code and reasoning |
| Claude Haiku 4.5 | claude-haiku-4-5-20251001 | Fast response |
| Gemini 2.0 Flash | gemini-2.0-flash-exp | Multimodal support |
2.3 Adjust Model Parameters (Optional)
You can adjust the following parameters as needed:| Parameter | Description | Recommended Value |
|---|---|---|
| Temperature | Controls output randomness | 0.7 (creative) / 0.3 (precise) |
| Max Tokens | Maximum output length | 2000-4000 |
| Top P | Nucleus sampling parameter | 0.9 |
2.4 Save Configuration
- Click the Save button at the bottom of the page
- System will automatically test the connection
- Success message will appear if configuration is correct
Step 3: Configure Embedding Model (Optional)
AnythingLLM supports vector embeddings for document retrieval and knowledge base functionality.3.1 Navigate to Embedding Settings
In the settings page:- Find Embedding Preference in the left menu
- Click to enter embedding model configuration page
3.2 Configure Embedding Model
| Field | Value |
|---|---|
| Embedding Provider | Select Generic OpenAI |
| API Key | Your APIMart API key (sk-xxxxxxxxxxxx) |
| Base URL | https://api.apimart.ai/v1 |
| Model | text-embedding-3-small or text-embedding-3-large |
Step 4: Create Workspace and Upload Documents
4.1 Create Workspace
- Return to main interface
- Click + New Workspace
- Enter workspace name (e.g., โTechnical Documentation Assistantโ, โCustomer Service Knowledge Baseโ)
- Click Create
4.2 Upload Documents
AnythingLLM supports various document formats: Supported Document Types:- ๐ Text Documents - .txt, .md, .pdf, .docx
- ๐ป Code Files - .py, .js, .java, .cpp, etc.
- ๐ Web Pages - Via URL scraping
- ๐ Data Files - .csv, .json, .xml
- On the workspace page, click Upload Documents
- Select files or drag and drop files into the upload area
- Wait for document processing to complete
- Documents will be automatically vectorized
Document Processing: Uploaded documents are automatically split into chunks and vectorized using the embedding model, stored in local database.
4.3 Manage Documents
On the document management page:- View all uploaded documents
- Delete unnecessary documents
- View document chunking details
- Edit document metadata
Step 5: Start Conversations
After configuration, you can start using AnythingLLM:5.1 Basic Conversations
- In the workspace, find the conversation input box
- Enter your question or request
- AI will generate responses based on your uploaded documents and APIMart models
5.2 Using Knowledge Base Features
AnythingLLM will automatically:- Analyze your question
- Retrieve relevant content from uploaded documents
- Generate accurate answers combining retrieved content and AI model
5.3 Switch Workspaces
You can create multiple workspaces for different projects or topics:- Click workspace name in top left corner
- Select other workspaces or create new ones
- Each workspace has independent documents and conversation history
Advanced Features
1. Agent Mode
AnythingLLM supports Agent functionality, allowing AI to:- ๐ Search Web - Get real-time information
- ๐งฎ Perform Calculations - Handle math and data analysis
- ๐ Generate Charts - Visualize data
- ๐ Call APIs - Interact with external services
- Find Agent Configuration in workspace settings
- Select tools and features to enable
- Save configuration
2. Conversation History Management
- Export Conversations - Export conversations as text or JSON format
- Search History - Quickly find historical conversations
- Delete Records - Clean up unnecessary conversation history
3. Custom System Prompts
In workspace settings:- Find System Prompt
- Customize AIโs role and behavior
- Example:
4. Multi-user Management (Docker Deployment Only)
If using Docker deployment:- Create multiple user accounts
- Set different permission levels
- Manage workspace access permissions
5. API Access
AnythingLLM provides REST API for:- Programmatic workspace access
- Upload and manage documents
- Send conversation requests
- Integrate into your applications
FAQ
Q1: Cannot connect to APIMart service?
Solution:-
Check Base URL:
- Ensure itโs
https://api.apimart.ai/v1(includes/v1) - Donโt add extra paths or omit
/v1
- Ensure itโs
-
Verify API Key:
- Confirm API Key starts with
sk- - Check if key is valid in APIMart Console
- Confirm API Key starts with
-
Check Network Connection:
- Ensure access to
https://api.apimart.ai - Check firewall or proxy settings
- Ensure access to
Q2: Documents not retrieving properly after upload?
Solution:-
Check Embedding Model Configuration:
- Confirm embedding model is correctly configured
- Test embedding model connection
-
Re-process Documents:
- Delete and re-upload documents
- Check if document format is supported
-
Adjust Retrieval Parameters:
- Adjust similarity threshold in workspace settings
- Increase number of returned document chunks
Q3: Slow conversation response?
Solution:-
Switch to Faster Models:
- Use
gpt-4o-miniinstead ofgpt-4o - Use
gemini-2.0-flash-expfor faster response
- Use
-
Optimize Document Quantity:
- Reduce number of documents in workspace
- Remove unnecessary large files
-
Adjust Max Tokens:
- Reduce maximum output length
- Use more concise prompts
Q4: How to view API usage and costs?
Log in to APIMart Console to view:- ๐ API call statistics
- ๐ฐ Cost details
- ๐ Usage trend charts
- ๐ Detailed request logs
Q5: What deployment options does AnythingLLM support?
AnythingLLM supports multiple deployment options:- ๐ฅ๏ธ Desktop Application - Windows, macOS, Linux
- ๐ณ Docker - Self-hosted deployment
- โ๏ธ Cloud Version - AnythingLLM Cloud (coming soon)
Use Case Examples
1. Enterprise Knowledge Base
Configuration:- Model:
gpt-4o-mini(cost-effective) - Documents: Internal company documents, manuals, FAQs
- Function: Quick information lookup for employees
- New employee onboarding
- Quick company policy lookup
- Technical documentation retrieval
2. Technical Documentation Assistant
Configuration:- Model:
claude-sonnet-4-5-20250929(excellent for code) - Documents: API docs, technical specifications, codebase
- Function: Assist developers in finding technical information
- API usage documentation queries
- Code example retrieval
- Technical question answering
3. Customer Service Knowledge Base
Configuration:- Model:
gpt-4o(high-quality conversation) - Documents: Product manuals, FAQs, solutions
- Function: Quick customer question response
- Automatic FAQ answering
- Product usage guidance
- Troubleshooting suggestions
4. Research and Learning Assistant
Configuration:- Model:
gpt-5(powerful understanding) - Documents: Research papers, textbooks, notes
- Function: Assist in learning and research
- Paper summarization and analysis
- Knowledge point explanation
- Learning path planning
Features
Using AnythingLLM + APIMart, you can:- ๐ Private Knowledge Base - Build secure private knowledge base locally
- ๐ Data Privacy - All data stored locally, protecting privacy
- ๐ค Multi-model Support - Flexibly switch between different AI models
- ๐ Multi-format Support - Support various document formats
- ๐ฏ Precise Retrieval - Vector-based intelligent document retrieval
- ๐ฌ Contextual Conversation - Maintain context in long conversations
- ๐ง Highly Customizable - Custom prompts, parameters, etc.
- ๐ Cross-platform - Support Windows, macOS, Linux
Data Security and Privacy
Local Data Storage
AnythingLLM data storage approach:- ๐ Local File System - Documents stored locally
- ๐๏ธ Local Vector Database - Vector indexes stored locally
- ๐พ Conversation History - Conversation records stored locally
API Call Security
- ๐ Encrypted Transmission - All API calls use HTTPS encryption
- ๐ Key Protection - API Key securely stored
- ๐ซ No Data Retention - APIMart does not store your conversation content
Best Practices
1. Document Management
- Regular Updates - Keep document content current
- Structured Organization - Use clear folder structure
- Naming Conventions - Use meaningful file names
- Delete Outdated - Regularly clean up outdated documents
2. Prompt Optimization
โ Bad Prompt:3. Performance Optimization
- Control Document Size - Avoid uploading overly large individual files
- Reasonable Chunking - Use default document chunking settings
- Choose Appropriate Model - Select model based on task complexity
- Monitor Usage - Regularly check API usage
4. Workspace Planning
- Divide by Project - Create independent workspaces for different projects
- Permission Management - Set workspace permissions appropriately (Docker version)
- Backup Data - Regularly backup important workspaces
Support & Help
If you encounter any issues:- ๐ APIMart Documentation
- ๐ AnythingLLM Official Documentation
- ๐ AnythingLLM GitHub
- ๐ฌ Discord Community
- ๐ฆ Twitter @APIMart_
- ๐ง Technical Support: zhihong@apimart.ai
Start Using APIMart
Register for APIMart now, get your API key, and build your private knowledge base in AnythingLLM!