Files
freepik-api/app/schemas/video_generation.py

24 lines
1.0 KiB
Python
Raw Permalink Normal View History

from typing import Optional
from pydantic import BaseModel, Field
class KlingRequest(BaseModel):
first_frame: Optional[str] = Field(None, description='Base64 or URL of first frame image')
last_frame: Optional[str] = Field(None, description='Base64 or URL of last frame image')
prompt: Optional[str] = Field(None, max_length=2500)
duration: Optional[int] = Field(None, description='5 or 10 seconds')
aspect_ratio: Optional[str] = Field(None, description='16:9, 9:16, or 1:1')
class MinimaxRequest(BaseModel):
prompt: str = Field(..., min_length=1, max_length=4000)
first_frame_image: Optional[str] = Field(None, description='Base64 or URL of first frame')
last_frame_image: Optional[str] = Field(None, description='Base64 or URL of last frame')
class SeedanceRequest(BaseModel):
prompt: str = Field(..., min_length=1, max_length=2000)
image: Optional[str] = Field(None, description='Base64 or URL of input image')
duration: Optional[str] = Field(None, description='5 or 10 seconds')