Initial commit: Freepik REST API

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>
This commit is contained in:
2026-02-16 14:07:36 +01:00
commit 99c24adfe8
32 changed files with 1814 additions and 0 deletions

25
app/config.py Normal file
View File

@@ -0,0 +1,25 @@
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()