|
| 1 | +# generated by datamodel-codegen: |
| 2 | +# filename: https://api.comfy.org/openapi |
| 3 | +# timestamp: 2025-04-23T15:56:33+00:00 |
| 4 | + |
| 5 | +from __future__ import annotations |
| 6 | + |
| 7 | +from typing import Optional |
| 8 | + |
| 9 | +from pydantic import BaseModel, Field, constr |
| 10 | + |
| 11 | + |
| 12 | +class V2OpenAPII2VResp(BaseModel): |
| 13 | + video_id: Optional[int] = Field(None, description='Video_id') |
| 14 | + |
| 15 | + |
| 16 | +class V2OpenAPIT2VReq(BaseModel): |
| 17 | + aspect_ratio: str = Field( |
| 18 | + ..., description='Aspect ratio (16:9, 4:3, 1:1, 3:4, 9:16)', examples=['16:9'] |
| 19 | + ) |
| 20 | + duration: int = Field( |
| 21 | + ..., |
| 22 | + description='Video duration (5, 8 seconds, --model=v3.5 only allows 5,8; --quality=1080p does not support 8s)', |
| 23 | + examples=[5], |
| 24 | + ) |
| 25 | + model: str = Field( |
| 26 | + ..., description='Model version (only supports v3.5)', examples=['v3.5'] |
| 27 | + ) |
| 28 | + motion_mode: Optional[str] = Field( |
| 29 | + 'normal', |
| 30 | + description='Motion mode (normal, fast, --fast only available when duration=5; --quality=1080p does not support fast)', |
| 31 | + examples=['normal'], |
| 32 | + ) |
| 33 | + negative_prompt: Optional[constr(max_length=2048)] = Field( |
| 34 | + None, description='Negative prompt\n' |
| 35 | + ) |
| 36 | + prompt: constr(max_length=2048) = Field(..., description='Prompt') |
| 37 | + quality: str = Field( |
| 38 | + ..., |
| 39 | + description='Video quality ("360p"(Turbo model), "540p", "720p", "1080p")', |
| 40 | + examples=['540p'], |
| 41 | + ) |
| 42 | + seed: Optional[int] = Field(None, description='Random seed, range: 0 - 2147483647') |
| 43 | + style: Optional[str] = Field( |
| 44 | + None, |
| 45 | + description='Style (effective when model=v3.5, "anime", "3d_animation", "clay", "comic", "cyberpunk") Do not include style parameter unless needed', |
| 46 | + examples=['anime'], |
| 47 | + ) |
| 48 | + template_id: Optional[int] = Field( |
| 49 | + None, |
| 50 | + description='Template ID (template_id must be activated before use)', |
| 51 | + examples=[302325299692608], |
| 52 | + ) |
| 53 | + water_mark: Optional[bool] = Field( |
| 54 | + False, |
| 55 | + description='Watermark (true: add watermark, false: no watermark)', |
| 56 | + examples=[False], |
| 57 | + ) |
0 commit comments