Environment:Marker Inc Korea AutoRAG API Keys And Credentials
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, RAG |
| Last Updated | 2026-02-08 06:00 GMT |
Overview
API keys and credentials required by AutoRAG modules for external service integration (LLMs, rerankers, parsers, vector databases).
Description
AutoRAG integrates with multiple external services that require API authentication. Each service has its own environment variable for the API key. Keys can also be passed directly in the YAML configuration file, but environment variables are the recommended approach for security. This page documents all credential requirements across the AutoRAG ecosystem.
Usage
Set the relevant environment variables before running any AutoRAG workflow that uses the corresponding service. Only the keys for services you actually use need to be set. For example, if you only use OpenAI for generation and Cohere for reranking, you only need `OPENAI_API_KEY` and `COHERE_API_KEY`.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| Network | Internet access | Required for all API-based services |
| Security | Environment variable management | Use `.env` files or secrets manager; never commit keys to git |
Dependencies
No additional package dependencies beyond Environment:Marker_Inc_Korea_AutoRAG_Python_3_10_Runtime.
Credentials
LLM Generation
- `OPENAI_API_KEY`: OpenAI API key for GPT models. Used by the `openai_llm` generator module, OpenAI-based query generation, and answer generation.
Document Parsing
- `LLAMA_CLOUD_API_KEY`: LlamaIndex Cloud API key for LlamaParse document parsing. Obtain from https://cloud.llamaindex.ai/api-key.
- `OPENAI_API_KEY`: Also used by LlamaParse when `multimodal_model_name` is `openai-gpt4o` or `openai-gpt-4o-mini`.
- `ANTHROPIC_API_KEY`: Used by LlamaParse when `multimodal_model_name` is `anthropic-sonnet-3.5`.
- `GEMINI_API_KEY`: Used by LlamaParse when `multimodal_model_name` is `gemini-1.5-flash` or `gemini-1.5-pro`.
- `CLOVA_URL`: Naver Clova OCR endpoint URL.
- `CLOVA_API_KEY`: Naver Clova OCR API key.
Passage Reranking
- `COHERE_API_KEY` (or `CO_API_KEY`): Cohere reranker API key. The system checks `COHERE_API_KEY` first, then falls back to `CO_API_KEY`.
- `VOYAGE_API_KEY`: VoyageAI reranker API key.
- `JINAAI_API_KEY`: Jina AI reranker API key.
- `MXBAI_API_KEY`: MixedBread AI reranker API key.
Vector Databases (Remote)
- Pinecone: `api_key` parameter (no standard env var; passed via YAML config or constructor).
- Qdrant Cloud: `api_key` parameter for cloud client type.
- Couchbase: `username` and `password` parameters.
- Chroma Cloud: `api_key` parameter for cloud client type.
- Milvus: `token`, `user`, `password` parameters for authenticated connections.
- Weaviate: Connection parameters passed via YAML config.
Quick Install
# Set environment variables (add to .bashrc or .env)
export OPENAI_API_KEY="sk-..."
export COHERE_API_KEY="..."
export VOYAGE_API_KEY="..."
export LLAMA_CLOUD_API_KEY="..."
# Or create a .env file (do NOT commit to git)
cat > .env << 'EOF'
OPENAI_API_KEY=sk-...
COHERE_API_KEY=...
VOYAGE_API_KEY=...
LLAMA_CLOUD_API_KEY=...
EOF
Code Evidence
OpenAI key check for LlamaParse in `autorag/data/parse/llamaparse.py:85-92`:
if multimodal_model_name in ["openai-gpt4o", "openai-gpt-4o-mini"]:
_api_key = (
os.getenv("OPENAI_API_KEY", None) if _api_key is None else _api_key
)
if _api_key is None:
raise KeyError(
"Please set the OPENAI_API_KEY in the environment variable "
"OPENAI_API_KEY or directly set it on the config YAML file."
)
Cohere key with fallback in `autorag/nodes/passagereranker/cohere.py:25-33`:
api_key = kwargs.pop("api_key", None)
api_key = os.getenv("COHERE_API_KEY", None) if api_key is None else api_key
if api_key is None:
api_key = os.getenv("CO_API_KEY", None)
if api_key is None:
raise KeyError(
"Please set the API key for Cohere rerank in the environment "
"variable COHERE_API_KEY or directly set it on the config YAML file."
)
Clova OCR credentials in `autorag/data/parse/clova.py:36-48`:
url = os.getenv("CLOVA_URL", None) if url is None else url
if url is None:
raise KeyError(
"Please set the URL for Clova OCR in the environment variable "
"CLOVA_URL or directly set it on the config YAML file."
)
api_key = os.getenv("CLOVA_API_KEY", None) if api_key is None else api_key
if api_key is None:
raise KeyError(
"Please set the API key for Clova OCR in the environment variable "
"CLOVA_API_KEY or directly set it on the config YAML file."
)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `KeyError: Please set the OPENAI_API_KEY` | OpenAI key not set | `export OPENAI_API_KEY="sk-..."` |
| `KeyError: Please set the API key for Cohere rerank` | Cohere key not set | `export COHERE_API_KEY="..."` or `export CO_API_KEY="..."` |
| `KeyError: Please set the URL for Clova OCR` | Clova URL not configured | `export CLOVA_URL="https://..."` |
| `ValueError: API key is not provided` (Jina) | Jina key not set | `export JINAAI_API_KEY="..."` |
| `KeyError: Please set the API key for Mixedbread AI` | MixedBread key not set | `export MXBAI_API_KEY="..."` |
| `KeyError: Please set the ANTHROPIC_API_KEY` | Anthropic key not set | `export ANTHROPIC_API_KEY="..."` |
| `KeyError: Please set the GEMINI_API_KEY` | Gemini key not set | `export GEMINI_API_KEY="..."` |
Compatibility Notes
- YAML vs env var: All API keys can be set either as environment variables or directly in YAML config. Environment variables are checked first; YAML values override them.
- Security: Never commit API keys to version control. Use `.env` files (with `.gitignore`) or a secrets manager.
- Cohere fallback: The Cohere reranker checks `COHERE_API_KEY` first, then `CO_API_KEY` as fallback. Both are accepted.
Related Pages
- Implementation:Marker_Inc_Korea_AutoRAG_QA_Batch_Apply_Factoid_Query_Gen
- Implementation:Marker_Inc_Korea_AutoRAG_QA_Batch_Apply_Make_Basic_Gen_Gt
- Implementation:Marker_Inc_Korea_AutoRAG_Parser_Start_Parsing
- Implementation:Marker_Inc_Korea_AutoRAG_Evaluator_Start_Trial
- Implementation:Marker_Inc_Korea_AutoRAG_Runner_Run
- Implementation:Marker_Inc_Korea_AutoRAG_Api_Runner_Run_Api_Server