Skip to content

Commit 40bfbcf

Browse files
committed
Update create api to have optional prompt and use string for seconds
1 parent b037ca2 commit 40bfbcf

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/together/resources/videos.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def __init__(self, client: TogetherClient) -> None:
2828
def create(
2929
self,
3030
*,
31-
prompt: str,
3231
model: str,
32+
prompt: str | None = None,
3333
height: int | None = None,
3434
width: int | None = None,
35-
seconds: float | None = None,
35+
seconds: str | None = None,
3636
fps: int | None = None,
3737
steps: int | None = None,
3838
seed: int | None = None,
@@ -48,15 +48,15 @@ def create(
4848
Method to generate videos based on a given prompt using a specified model.
4949
5050
Args:
51-
prompt (str): A description of the desired video. Positive prompt for the generation.
52-
5351
model (str): The model to use for video generation.
5452
53+
prompt (str): A description of the desired video. Positive prompt for the generation.
54+
5555
height (int, optional): Height of the video to generate in pixels.
5656
5757
width (int, optional): Width of the video to generate in pixels.
5858
59-
seconds (float, optional): Length of generated video in seconds. Min 1 max 10.
59+
seconds (str, optional): Length of generated video in seconds. Min 1 max 10.
6060
6161
fps (int, optional): Frames per second, min 15 max 60. Defaults to 24.
6262

src/together/types/videos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ class CreateVideoBody(BaseModel):
1010

1111
# Required parameters
1212
model: str
13-
prompt: str
1413

1514
# Optional dimension parameters
15+
prompt: str | None = None
1616
height: int | None = None
1717
width: int | None = None
1818

1919
# Optional generation parameters
20-
seconds: float | None = None # Min 1 max 10
20+
seconds: str | None = None # Min 1 max 10
2121
fps: int | None = None # Frames per second, min 15 max 60, default 24
2222
steps: int | None = None # Denoising steps, min 10 max 50, default 20
2323
seed: int | None = None

0 commit comments

Comments
 (0)