API keys are crucial for authenticating and accessing various services integrated with R2R. Missing or incorrect API keys can lead to connection failures and service disruptions. This guide will help you identify and resolve API key issues.
Common symptoms of API key problems include:
R2R uses environment variables to store API keys. Check if the required environment variables are set:
Look for variables like:
OPENAI_API_KEY
ANTHROPIC_API_KEY
AZURE_API_KEY
UNSTRUCTURED_API_KEY
HATCHET_CLIENT_TOKEN
If you’re using configuration files (e.g., r2r.toml
), verify that API keys are correctly set:
Issue: OpenAI services not working or returning authentication errors.
Solution:
OPENAI_API_KEY
is set:
Issue: Claude or other Anthropic models not functioning.
Solution:
ANTHROPIC_API_KEY
is set:
Issue: Azure-based services failing to authenticate.
Solution:
AZURE_API_KEY
is set:
AZURE_API_BASE
AZURE_API_VERSION
Issue: File ingestion or parsing failures.
Solution:
UNSTRUCTURED_API_KEY
is set:
Issue: Workflow orchestration failures or Hatchet connectivity issues.
Solution:
HATCHET_CLIENT_TOKEN
is set:
If you need to update an API key:
Stop the R2R service:
Update the key in your environment or configuration file:
Or update the r2r.toml
file if you’re using configuration files.
Restart the R2R service:
If you’re still having trouble:
Check R2R logs for detailed error messages:
Verify network connectivity to the API endpoints.
Ensure your account has the necessary permissions for the API keys you’re using.
Try using the API key in a simple curl command to isolate R2R-specific issues:
If you’ve tried these steps and are still experiencing issues:
Remember, never share your actual API keys when seeking help. Use placeholders or redacted versions in any logs or code snippets you share publicly.
API keys are crucial for authenticating and accessing various services integrated with R2R. Missing or incorrect API keys can lead to connection failures and service disruptions. This guide will help you identify and resolve API key issues.
Common symptoms of API key problems include:
R2R uses environment variables to store API keys. Check if the required environment variables are set:
Look for variables like:
OPENAI_API_KEY
ANTHROPIC_API_KEY
AZURE_API_KEY
UNSTRUCTURED_API_KEY
HATCHET_CLIENT_TOKEN
If you’re using configuration files (e.g., r2r.toml
), verify that API keys are correctly set:
Issue: OpenAI services not working or returning authentication errors.
Solution:
OPENAI_API_KEY
is set:
Issue: Claude or other Anthropic models not functioning.
Solution:
ANTHROPIC_API_KEY
is set:
Issue: Azure-based services failing to authenticate.
Solution:
AZURE_API_KEY
is set:
AZURE_API_BASE
AZURE_API_VERSION
Issue: File ingestion or parsing failures.
Solution:
UNSTRUCTURED_API_KEY
is set:
Issue: Workflow orchestration failures or Hatchet connectivity issues.
Solution:
HATCHET_CLIENT_TOKEN
is set:
If you need to update an API key:
Stop the R2R service:
Update the key in your environment or configuration file:
Or update the r2r.toml
file if you’re using configuration files.
Restart the R2R service:
If you’re still having trouble:
Check R2R logs for detailed error messages:
Verify network connectivity to the API endpoints.
Ensure your account has the necessary permissions for the API keys you’re using.
Try using the API key in a simple curl command to isolate R2R-specific issues:
If you’ve tried these steps and are still experiencing issues:
Remember, never share your actual API keys when seeking help. Use placeholders or redacted versions in any logs or code snippets you share publicly.