feat: 普号增加25s普通视频、增加pro系列高清模型、统一模型名字、过载不再计入错误禁用计数

This commit is contained in:
TheSmallHanCat
2025-12-24 19:39:28 +08:00
parent 2c2fd44b6a
commit fad83533bf
8 changed files with 226 additions and 69 deletions

View File

@@ -254,8 +254,20 @@ class SoraClient:
return result["id"]
async def generate_video(self, prompt: str, token: str, orientation: str = "landscape",
media_id: Optional[str] = None, n_frames: int = 450, style_id: Optional[str] = None) -> str:
"""Generate video (text-to-video or image-to-video)"""
media_id: Optional[str] = None, n_frames: int = 450, style_id: Optional[str] = None,
model: str = "sy_8", size: str = "small") -> str:
"""Generate video (text-to-video or image-to-video)
Args:
prompt: Video generation prompt
token: Access token
orientation: Video orientation (landscape/portrait)
media_id: Optional image media_id for image-to-video
n_frames: Number of frames (300/450/750)
style_id: Optional style ID
model: Model to use (sy_8 for standard, sy_ore for pro)
size: Video size (small for standard, large for HD)
"""
inpaint_items = []
if media_id:
inpaint_items = [{
@@ -267,9 +279,9 @@ class SoraClient:
"kind": "video",
"prompt": prompt,
"orientation": orientation,
"size": "small",
"size": size,
"n_frames": n_frames,
"model": "sy_8",
"model": model,
"inpaint_items": inpaint_items,
"style_id": style_id
}