Skip to content

Commit 620f342

Browse files
feat(api): api update
1 parent 029b37e commit 620f342

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-599f240cba06bc6d2e7e825a56bd230fa1b632fca62e6aecf3a08a822aa80666.yml
3-
openapi_spec_hash: 197ebb9692cc426508148cbc5d3f6712
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2Ftogetherai-9675066b6d9d75638a402b738f23c767ca11bb8cd1f79346785c767fa3d5cd50.yml
3+
openapi_spec_hash: fda464254d1bce3ac2ff298e55f66e64
44
config_hash: cf71a25b7e10f3a39a183524fa0ba05c

src/resources/videos.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,7 @@ export interface VideoCreateParams {
138138
fps?: number;
139139

140140
/**
141-
* Array of images to guide video generation, like keyframes. If size 1, starting
142-
* frame, if size 2, starting and ending frame, if more than 2 then frame must be
143-
* specified
141+
* Array of images to guide video generation, similar to keyframes.
144142
*/
145143
frame_images?: Array<VideoCreateParams.FrameImage>;
146144

@@ -176,9 +174,11 @@ export interface VideoCreateParams {
176174
prompt?: string;
177175

178176
/**
179-
* TODO need to figure this out
177+
* Unlike frame_images which constrain specific timeline positions, reference
178+
* images guide the general appearance that should appear consistently across the
179+
* video.
180180
*/
181-
reference_images?: Array<unknown>;
181+
reference_images?: Array<string>;
182182

183183
/**
184184
* Clip duration in seconds.
@@ -204,12 +204,20 @@ export interface VideoCreateParams {
204204

205205
export namespace VideoCreateParams {
206206
export interface FrameImage {
207-
frame: number | 'first' | 'last';
208-
209207
/**
210-
* idk
208+
* URL path to hosted image that is used for a frame
211209
*/
212210
input_image: string;
211+
212+
/**
213+
* Optional param to specify where to insert the frame. If this is omitted, the
214+
* following heuristics are applied:
215+
*
216+
* - frame_images size is one, frame is first.
217+
* - If size is two, frames are first and last.
218+
* - If size is larger, frames are first, last and evenly spaced between.
219+
*/
220+
frame?: number | 'first' | 'last';
213221
}
214222
}
215223

tests/api-resources/videos.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ describe('resource videos', () => {
2323
const response = await client.videos.create({
2424
model: 'model',
2525
fps: 0,
26-
frame_images: [{ frame: 0, input_image: 'input_image' }],
26+
frame_images: [{ input_image: 'input_image', frame: 0 }],
2727
guidance_scale: 0,
2828
height: 0,
2929
negative_prompt: 'negative_prompt',
3030
output_format: 'MP4',
3131
output_quality: 0,
3232
prompt: 'x',
33-
reference_images: [{}],
33+
reference_images: ['string'],
3434
seconds: 'seconds',
3535
seed: 0,
3636
steps: 10,

0 commit comments

Comments
 (0)