Environment Variables
Create a .env file in both frontend and backend folders, or one at the root.
Frontend .env
Streamlit (Recommended):
BACKEND_URL=http://localhost:8000
IONOS_API_KEY=your_ionos_api_key_hereNext.js (Alternative):
NEXT_PUBLIC_APP_BASE_URL=http://localhost:8000Backend .env
Go to your Studio settings here: https://studio.ionos.de/platform/org/YOUR_ORG_ID/settings
IONOS_API_KEY=your_ionos_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here
# Optional: IONOS Studio fine-tuned models
STUDIO_API_KEY=your_studio_api_key_here
STUDIO_ORG_ID=your_studio_org_id_here
STUDIO_BASE=https://studio.ionos.de/api/v1
# Fine-tuned model UUIDs
STUDIO_MODEL_QWEN_GDPR=model_uuid_here
STUDIO_MODEL_GRANITE_GDPR=model_uuid_here
STUDIO_QWEN3_SHAREGPT=model_uuid_hereVariable Description
Frontend:
- BACKEND_URL (Streamlit): URL of the backend API (default:
http://backend-service:8000for Kubernetes, usehttp://localhost:8000for local dev). - IONOS_API_KEY (Streamlit): Required for fetching inference models directly from IONOS Hub API.
- NEXT_PUBLIC_APP_BASE_URL (Next.js): URL of the backend for API calls.
Backend:
- IONOS_API_KEY: Secret key for IONOS AI Models Hub access (required for inference models with web search).
- TAVILY_API_KEY: API key for Tavily real-time web search tool (required for inference model agent functionality).
- STUDIO_API_KEY: API key for IONOS AI Model Studio (optional, required only if using fine-tuned models).
- STUDIO_ORG_ID: Your IONOS Studio organization ID (optional, required only if using fine-tuned models).
- STUDIO_BASE: Base URL for Studio API (optional, defaults to
https://studio.ionos.de/api/v1). - STUDIO_MODEL_*: UUIDs of your fine-tuned models in IONOS Studio (optional, add as many as you need).