# ========================================================================== # ai-rest-api environment configuration # Copy this file to `.env` and fill in real values. Never commit `.env`. # ========================================================================== # --- General --- APP_NAME="AI REST API" APP_VERSION="1.0.0" ENVIRONMENT=development DEBUG=true # --- Server --- HOST=0.0.0.0 PORT=8000 # --- OpenAI --- # Obtain a key from https://platform.openai.com/api-keys OPENAI_API_KEY=sk-your-openai-api-key-here OPENAI_MODEL=gpt-4.1-mini OPENAI_TEMPERATURE=0.7 OPENAI_MAX_OUTPUT_TOKENS=1024 OPENAI_TIMEOUT_SECONDS=60 # --- Authentication --- # Static API key clients must send in the `X-API-Key` header API_KEY=change-this-to-a-strong-random-value # Secret used to sign JWTs for Bearer token authentication JWT_SECRET_KEY=change-this-to-a-long-random-secret JWT_ALGORITHM=HS256 JWT_EXPIRATION_MINUTES=60 # --- Database --- # SQLite (default, zero-config): DATABASE_URL=sqlite:///./ai_rest_api.db # PostgreSQL (production example): # DATABASE_URL=postgresql://user:password@localhost:5432/ai_rest_api # --- CORS --- # Comma-separated list of allowed origins, or "*" for all CORS_ORIGINS=* # --- Rate limiting --- RATE_LIMIT_REQUESTS=60 RATE_LIMIT_WINDOW_SECONDS=60 # --- Logging --- LOG_LEVEL=INFO LOG_FILE=logs/app.log