mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-08 19:27:07 +08:00
58 lines
2.0 KiB
Python
58 lines
2.0 KiB
Python
# generated by datamodel-codegen:
|
|
# filename: https://stagingapi.comfy.org/openapi
|
|
# timestamp: 2025-04-22T08:06:44+00:00
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field, constr
|
|
|
|
|
|
class V2OpenAPII2VResp(BaseModel):
|
|
video_id: Optional[int] = Field(None, description='Video_id')
|
|
|
|
|
|
class V2OpenAPIT2VReq(BaseModel):
|
|
aspect_ratio: str = Field(
|
|
..., description='Aspect ratio (16:9, 4:3, 1:1, 3:4, 9:16)', example='16:9'
|
|
)
|
|
duration: int = Field(
|
|
...,
|
|
description='Video duration (5, 8 seconds, --model=v3.5 only allows 5,8; --quality=1080p does not support 8s)',
|
|
example=5,
|
|
)
|
|
model: str = Field(
|
|
..., description='Model version (only supports v3.5)', example='v3.5'
|
|
)
|
|
motion_mode: Optional[str] = Field(
|
|
'normal',
|
|
description='Motion mode (normal, fast, --fast only available when duration=5; --quality=1080p does not support fast)',
|
|
example='normal',
|
|
)
|
|
negative_prompt: Optional[constr(max_length=2048)] = Field(
|
|
None, description='Negative prompt\n'
|
|
)
|
|
prompt: constr(max_length=2048) = Field(..., description='Prompt')
|
|
quality: str = Field(
|
|
...,
|
|
description='Video quality ("360p"(Turbo model), "540p", "720p", "1080p")',
|
|
example='540p',
|
|
)
|
|
seed: Optional[int] = Field(None, description='Random seed, range: 0 - 2147483647')
|
|
style: Optional[str] = Field(
|
|
None,
|
|
description='Style (effective when model=v3.5, "anime", "3d_animation", "clay", "comic", "cyberpunk") Do not include style parameter unless needed',
|
|
example='anime',
|
|
)
|
|
template_id: Optional[int] = Field(
|
|
None,
|
|
description='Template ID (template_id must be activated before use)',
|
|
example=302325299692608,
|
|
)
|
|
water_mark: Optional[bool] = Field(
|
|
False,
|
|
description='Watermark (true: add watermark, false: no watermark)',
|
|
example=False,
|
|
)
|