FastAPI async wrapper for Freepik cloud AI API supporting image generation (Mystic, Flux Dev/Pro, SeedReam), video generation (Kling, MiniMax, Seedance), image editing (upscale, relight, style transfer, expand, inpaint), and utilities (background removal, classifier, audio isolation). Includes async task tracking with polling, Docker containerization, and Gitea CI/CD workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
527 B
Python
26 lines
527 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = {'env_prefix': 'FP_'}
|
|
|
|
# Freepik API
|
|
freepik_api_key: str
|
|
freepik_base_url: str = 'https://api.freepik.com'
|
|
|
|
# Paths
|
|
output_dir: str = '/data/outputs'
|
|
temp_dir: str = '/data/temp'
|
|
|
|
# Limits
|
|
max_upload_size_mb: int = 50
|
|
task_poll_interval_seconds: int = 5
|
|
task_poll_timeout_seconds: int = 600
|
|
auto_cleanup_hours: int = 24
|
|
|
|
# Webhook
|
|
webhook_secret: str = ''
|
|
|
|
|
|
settings = Settings()
|