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>
17 lines
379 B
Python
17 lines
379 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ClassificationResponse(BaseModel):
|
|
is_ai_generated: bool
|
|
ai_probability: float
|
|
human_probability: float
|
|
|
|
|
|
class IconRequest(BaseModel):
|
|
prompt: str = Field(..., min_length=1, max_length=4000)
|
|
color: Optional[str] = None
|
|
shape: Optional[str] = None
|
|
style: Optional[str] = None
|