Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2811,8 +2811,9 @@ export declare interface GenerateImagesConfig {
/** Number of images to generate. */
numberOfImages?: number;
/** Aspect ratio of the generated images. Supported values are
"1:1", "3:4", "4:3", "9:16", and "16:9". */
aspectRatio?: string;
"1:1", "3:4", "4:3", "9:16", and "16:9".
*/
aspectRatio?: ImageAspectRatio;
/** Controls how much the model adheres to the text prompt. Large
values increase output and prompt alignment, but may compromise image
quality. */
Expand Down Expand Up @@ -2963,8 +2964,9 @@ export declare interface EditImageConfig {
/** Number of images to generate. */
numberOfImages?: number;
/** Aspect ratio of the generated images. Supported values are
"1:1", "3:4", "4:3", "9:16", and "16:9". */
aspectRatio?: string;
"1:1", "3:4", "4:3", "9:16", and "16:9".
*/
aspectRatio?: ImageAspectRatio;
/** Controls how much the model adheres to the text prompt. Large
values increase output and prompt alignment, but may compromise image
quality. */
Expand Down Expand Up @@ -3536,11 +3538,9 @@ export declare interface GenerateVideosConfig {
a random RNG seed will be used each time to produce a different
result. */
seed?: number;
/** The aspect ratio for the generated video. 16:9 (landscape) and
9:16 (portrait) are supported. */
aspectRatio?: string;
/** The resolution for the generated video. 720p and 1080p are
supported. */
/** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */
aspectRatio?: VideoAspectRatio;
/** The resolution for the generated video. 720p and 1080p are supported. */
resolution?: string;
/** Whether allow to generate person videos, and restrict to specific
ages. Supported values are: dont_allow, allow_adult. */
Expand Down Expand Up @@ -6090,3 +6090,13 @@ export type DownloadableFileUnion = string | File | GeneratedVideo | Video;
export type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;

export type BatchJobDestinationUnion = BatchJobDestination | string;


// Common aspect ratios supported across all media generation APIs
export type CommonAspectRatio = "9:16" | "16:9";

// Aspect ratios for image generation and editing
export type ImageAspectRatio = CommonAspectRatio | "1:1" | "3:4" | "4:3";

// Aspect ratios for video generation
export type VideoAspectRatio = CommonAspectRatio;