@runapi.ai/imagen-4 0.2.7 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -7,16 +7,18 @@ type Imagen4TextModel = 'imagen-4' | 'imagen-4-fast' | 'imagen-4-ultra';
7
7
  type Imagen4RemixModel = 'imagen-4-pro-remix-image';
8
8
  /** Union of all Imagen 4 model identifiers. */
9
9
  type Imagen4Model = Imagen4TextModel | Imagen4RemixModel;
10
+ /** Aspect ratios for standard and ultra text-to-image generation. */
11
+ type BaseTextAspectRatio = '1:1' | '16:9' | '9:16' | '3:4' | '4:3';
12
+ /** Aspect ratios for fast text-to-image generation. */
13
+ type FastTextAspectRatio = BaseTextAspectRatio | 'auto';
10
14
  /** Aspect ratios for text-to-image generation. */
11
- type TextAspectRatio = '1:1' | '16:9' | '9:16' | '3:4' | '4:3';
15
+ type TextAspectRatio = FastTextAspectRatio;
12
16
  /** Extended aspect ratios for remix, including "auto" which infers from source images. */
13
17
  type ProAspectRatio = '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | 'auto';
14
18
  /** Pixel resolution tier for remix output. */
15
19
  type OutputResolution = '1k' | '2k' | '4k';
16
20
  /** Image encoding format for remix output. */
17
21
  type OutputFormat = 'png' | 'jpg';
18
- /** Batch size for imagen-4-fast (the only model supporting multi-image output). */
19
- type OutputCount = 1 | 2 | 3 | 4;
20
22
  /**
21
23
  * Parameters for imagen-4 (standard) and imagen-4-ultra (highest quality).
22
24
  * These models produce a single image per request.
@@ -27,25 +29,20 @@ interface BaseTextTextToImageParams {
27
29
  callback_url?: string;
28
30
  /** Content to steer the model away from in the output. */
29
31
  negative_prompt?: string;
30
- aspect_ratio?: TextAspectRatio;
32
+ aspect_ratio?: BaseTextAspectRatio;
31
33
  /** Fixed seed for reproducible generation. */
32
34
  seed?: number;
33
35
  }
34
- /**
35
- * Parameters for imagen-4-fast, which supports batch output (1-4 images)
36
- * at lower latency than the standard tier.
37
- */
36
+ /** Parameters for imagen-4-fast, the lower-latency text-to-image tier. */
38
37
  interface FastTextTextToImageParams {
39
38
  model: 'imagen-4-fast';
40
39
  prompt: string;
41
40
  callback_url?: string;
42
41
  /** Content to steer the model away from in the output. */
43
42
  negative_prompt?: string;
44
- aspect_ratio?: TextAspectRatio;
43
+ aspect_ratio?: FastTextAspectRatio;
45
44
  /** Fixed seed for reproducible generation. */
46
45
  seed?: number;
47
- /** Number of images to generate (only supported by imagen-4-fast). */
48
- output_count?: OutputCount;
49
46
  }
50
47
  /**
51
48
  * Parameters for image remix -- guided generation from 1-8 source images
@@ -92,8 +89,8 @@ type CompletedRemixImageResponse = CompletedTextToImageResponse;
92
89
 
93
90
  /**
94
91
  * Generates images from a text prompt.
95
- * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency,
96
- * batch output up to 4 images), and imagen-4-ultra (highest quality).
92
+ * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency),
93
+ * and imagen-4-ultra (highest quality).
97
94
  */
98
95
  declare class TextToImage {
99
96
  private readonly http;
@@ -175,4 +172,4 @@ declare class Imagen4Client extends BaseClient {
175
172
  constructor(options?: ClientOptions);
176
173
  }
177
174
 
178
- export { type BaseTextTextToImageParams, type CompletedRemixImageResponse, type CompletedTextToImageResponse, type FastTextTextToImageParams, type Image, Imagen4Client, type Imagen4Model, type Imagen4RemixModel, type Imagen4TextModel, type OutputCount, type OutputFormat, type OutputResolution, type ProAspectRatio, RemixImage, type RemixImageParams, type RemixImageResponse, type TaskCreateResponse, type TextAspectRatio, TextToImage, type TextToImageParams, type TextToImageResponse };
175
+ export { type BaseTextAspectRatio, type BaseTextTextToImageParams, type CompletedRemixImageResponse, type CompletedTextToImageResponse, type FastTextAspectRatio, type FastTextTextToImageParams, type Image, Imagen4Client, type Imagen4Model, type Imagen4RemixModel, type Imagen4TextModel, type OutputFormat, type OutputResolution, type ProAspectRatio, RemixImage, type RemixImageParams, type RemixImageResponse, type TaskCreateResponse, type TextAspectRatio, TextToImage, type TextToImageParams, type TextToImageResponse };
package/dist/index.d.ts CHANGED
@@ -7,16 +7,18 @@ type Imagen4TextModel = 'imagen-4' | 'imagen-4-fast' | 'imagen-4-ultra';
7
7
  type Imagen4RemixModel = 'imagen-4-pro-remix-image';
8
8
  /** Union of all Imagen 4 model identifiers. */
9
9
  type Imagen4Model = Imagen4TextModel | Imagen4RemixModel;
10
+ /** Aspect ratios for standard and ultra text-to-image generation. */
11
+ type BaseTextAspectRatio = '1:1' | '16:9' | '9:16' | '3:4' | '4:3';
12
+ /** Aspect ratios for fast text-to-image generation. */
13
+ type FastTextAspectRatio = BaseTextAspectRatio | 'auto';
10
14
  /** Aspect ratios for text-to-image generation. */
11
- type TextAspectRatio = '1:1' | '16:9' | '9:16' | '3:4' | '4:3';
15
+ type TextAspectRatio = FastTextAspectRatio;
12
16
  /** Extended aspect ratios for remix, including "auto" which infers from source images. */
13
17
  type ProAspectRatio = '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | 'auto';
14
18
  /** Pixel resolution tier for remix output. */
15
19
  type OutputResolution = '1k' | '2k' | '4k';
16
20
  /** Image encoding format for remix output. */
17
21
  type OutputFormat = 'png' | 'jpg';
18
- /** Batch size for imagen-4-fast (the only model supporting multi-image output). */
19
- type OutputCount = 1 | 2 | 3 | 4;
20
22
  /**
21
23
  * Parameters for imagen-4 (standard) and imagen-4-ultra (highest quality).
22
24
  * These models produce a single image per request.
@@ -27,25 +29,20 @@ interface BaseTextTextToImageParams {
27
29
  callback_url?: string;
28
30
  /** Content to steer the model away from in the output. */
29
31
  negative_prompt?: string;
30
- aspect_ratio?: TextAspectRatio;
32
+ aspect_ratio?: BaseTextAspectRatio;
31
33
  /** Fixed seed for reproducible generation. */
32
34
  seed?: number;
33
35
  }
34
- /**
35
- * Parameters for imagen-4-fast, which supports batch output (1-4 images)
36
- * at lower latency than the standard tier.
37
- */
36
+ /** Parameters for imagen-4-fast, the lower-latency text-to-image tier. */
38
37
  interface FastTextTextToImageParams {
39
38
  model: 'imagen-4-fast';
40
39
  prompt: string;
41
40
  callback_url?: string;
42
41
  /** Content to steer the model away from in the output. */
43
42
  negative_prompt?: string;
44
- aspect_ratio?: TextAspectRatio;
43
+ aspect_ratio?: FastTextAspectRatio;
45
44
  /** Fixed seed for reproducible generation. */
46
45
  seed?: number;
47
- /** Number of images to generate (only supported by imagen-4-fast). */
48
- output_count?: OutputCount;
49
46
  }
50
47
  /**
51
48
  * Parameters for image remix -- guided generation from 1-8 source images
@@ -92,8 +89,8 @@ type CompletedRemixImageResponse = CompletedTextToImageResponse;
92
89
 
93
90
  /**
94
91
  * Generates images from a text prompt.
95
- * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency,
96
- * batch output up to 4 images), and imagen-4-ultra (highest quality).
92
+ * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency),
93
+ * and imagen-4-ultra (highest quality).
97
94
  */
98
95
  declare class TextToImage {
99
96
  private readonly http;
@@ -175,4 +172,4 @@ declare class Imagen4Client extends BaseClient {
175
172
  constructor(options?: ClientOptions);
176
173
  }
177
174
 
178
- export { type BaseTextTextToImageParams, type CompletedRemixImageResponse, type CompletedTextToImageResponse, type FastTextTextToImageParams, type Image, Imagen4Client, type Imagen4Model, type Imagen4RemixModel, type Imagen4TextModel, type OutputCount, type OutputFormat, type OutputResolution, type ProAspectRatio, RemixImage, type RemixImageParams, type RemixImageResponse, type TaskCreateResponse, type TextAspectRatio, TextToImage, type TextToImageParams, type TextToImageResponse };
175
+ export { type BaseTextAspectRatio, type BaseTextTextToImageParams, type CompletedRemixImageResponse, type CompletedTextToImageResponse, type FastTextAspectRatio, type FastTextTextToImageParams, type Image, Imagen4Client, type Imagen4Model, type Imagen4RemixModel, type Imagen4TextModel, type OutputFormat, type OutputResolution, type ProAspectRatio, RemixImage, type RemixImageParams, type RemixImageResponse, type TaskCreateResponse, type TextAspectRatio, TextToImage, type TextToImageParams, type TextToImageResponse };
package/dist/index.js CHANGED
@@ -81,7 +81,9 @@ var contract = {
81
81
  ]
82
82
  },
83
83
  "source_image_urls": {
84
- "required": true
84
+ "required": true,
85
+ "min_items": 1,
86
+ "max_items": 8
85
87
  }
86
88
  }
87
89
  }
@@ -103,9 +105,6 @@ var contract = {
103
105
  "4:3"
104
106
  ]
105
107
  },
106
- "output_count": {
107
- "type": "integer"
108
- },
109
108
  "seed": {
110
109
  "type": "integer"
111
110
  }
@@ -117,18 +116,10 @@ var contract = {
117
116
  "16:9",
118
117
  "9:16",
119
118
  "3:4",
120
- "4:3"
119
+ "4:3",
120
+ "auto"
121
121
  ]
122
122
  },
123
- "output_count": {
124
- "enum": [
125
- 1,
126
- 2,
127
- 3,
128
- 4
129
- ],
130
- "type": "integer"
131
- },
132
123
  "seed": {
133
124
  "type": "integer"
134
125
  }
@@ -143,9 +134,6 @@ var contract = {
143
134
  "4:3"
144
135
  ]
145
136
  },
146
- "output_count": {
147
- "type": "integer"
148
- },
149
137
  "seed": {
150
138
  "type": "integer"
151
139
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-image.ts","../src/contract_gen.ts","../src/resources/remix-image.ts"],"sourcesContent":["export { Imagen4Client } from './client';\nexport { TextToImage } from './resources/text-to-image';\nexport { RemixImage } from './resources/remix-image';\nexport type * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToImage } from './resources/text-to-image';\nimport { RemixImage } from './resources/remix-image';\n\n/**\n * Imagen 4 image generation API client.\n *\n * Three text-to-image quality tiers (imagen-4, imagen-4-fast, imagen-4-ultra)\n * and a dedicated remix model for guided image transformation from source images.\n *\n * @example\n * ```typescript\n * const client = new Imagen4Client({ apiKey: 'your-api-key' });\n *\n * const result = await client.textToImage.run({\n * model: 'imagen-4',\n * prompt: 'A cat in a spacesuit on the moon',\n * });\n * ```\n */\nexport class Imagen4Client extends BaseClient {\n /** Text-to-image generation across three quality tiers. */\n public readonly textToImage: TextToImage;\n /** Generate new images guided by one or more source images combined with a text prompt. */\n public readonly remixImage: RemixImage;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToImage = new TextToImage(this.http);\n this.remixImage = new RemixImage(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { TextToImageParams, TextToImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/text_to_image';\n\n/**\n * Generates images from a text prompt.\n * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency,\n * batch output up to 4 images), and imagen-4-ultra (highest quality).\n */\nexport class TextToImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate images from a text prompt and wait until complete.\n * @param params Text-to-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: TextToImageParams, options?: RequestOptions & PollingOptions): Promise<TextToImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<TextToImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Generate images from a text prompt; returns immediately with a task id.\n * @param params Text-to-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a text-to-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToImageResponse> {\n return this.http.request<TextToImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export const contract = {\n \"remix-image\": {\n \"models\": [\n \"imagen-4-pro-remix-image\"\n ],\n \"fields_by_model\": {\n \"imagen-4-pro-remix-image\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"2:3\",\n \"3:2\",\n \"3:4\",\n \"4:3\",\n \"4:5\",\n \"5:4\",\n \"9:16\",\n \"16:9\",\n \"21:9\",\n \"auto\"\n ]\n },\n \"output_format\": {\n \"enum\": [\n \"png\",\n \"jpg\"\n ]\n },\n \"output_resolution\": {\n \"enum\": [\n \"1k\",\n \"2k\",\n \"4k\"\n ]\n },\n \"source_image_urls\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-image\": {\n \"models\": [\n \"imagen-4\",\n \"imagen-4-fast\",\n \"imagen-4-ultra\"\n ],\n \"fields_by_model\": {\n \"imagen-4\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-fast\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"enum\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-ultra\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { RemixImageParams, RemixImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/remix_image';\n\n/**\n * Generates new images guided by 1-8 source images combined with a text prompt.\n * Supports output resolution control (1k/2k/4k) and format selection (png/jpg).\n */\nexport class RemixImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Transform source images guided by a text prompt and wait until complete.\n * @param params Remix-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: RemixImageParams, options?: RequestOptions & PollingOptions): Promise<RemixImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<RemixImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Transform source images guided by a text prompt; returns immediately with a task id.\n * @param params Remix-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: RemixImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['remix-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a remix-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current remix-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<RemixImageResponse> {\n return this.http.request<RemixImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AM,aAAN,MAAiB;AAAA,EACtB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7B,MAAM,IAAI,QAA0B,SAAwE;AAC1G,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,eAAO,oCAAsC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACxE,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAO,QAA0B,SAAuD;AAC5F,UAAM,WAAO,4BAAc,MAAM;AACjC,qCAAe,SAAS,aAAa,GAAmB,IAA+B;AACvF,WAAO,KAAK,KAAK,QAA4B,QAAQA,WAAU;AAAA,MAC7D;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,IAAI,IAAY,SAAuD;AAC3E,WAAO,KAAK,KAAK,QAA4B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACvE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AHnCO,IAAM,gBAAN,cAA4B,wBAAW;AAAA;AAAA,EAE5B;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,aAAa,IAAI,WAAW,KAAK,IAAI;AAAA,EAC5C;AACF;;;AD1BA,IAAAC,eAYO;","names":["import_core","import_core","import_internal","ENDPOINT","import_core"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-image.ts","../src/contract_gen.ts","../src/resources/remix-image.ts"],"sourcesContent":["export { Imagen4Client } from './client';\nexport { TextToImage } from './resources/text-to-image';\nexport { RemixImage } from './resources/remix-image';\nexport type * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToImage } from './resources/text-to-image';\nimport { RemixImage } from './resources/remix-image';\n\n/**\n * Imagen 4 image generation API client.\n *\n * Three text-to-image quality tiers (imagen-4, imagen-4-fast, imagen-4-ultra)\n * and a dedicated remix model for guided image transformation from source images.\n *\n * @example\n * ```typescript\n * const client = new Imagen4Client({ apiKey: 'your-api-key' });\n *\n * const result = await client.textToImage.run({\n * model: 'imagen-4',\n * prompt: 'A cat in a spacesuit on the moon',\n * });\n * ```\n */\nexport class Imagen4Client extends BaseClient {\n /** Text-to-image generation across three quality tiers. */\n public readonly textToImage: TextToImage;\n /** Generate new images guided by one or more source images combined with a text prompt. */\n public readonly remixImage: RemixImage;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToImage = new TextToImage(this.http);\n this.remixImage = new RemixImage(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { TextToImageParams, TextToImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/text_to_image';\n\n/**\n * Generates images from a text prompt.\n * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency),\n * and imagen-4-ultra (highest quality).\n */\nexport class TextToImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate images from a text prompt and wait until complete.\n * @param params Text-to-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: TextToImageParams, options?: RequestOptions & PollingOptions): Promise<TextToImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<TextToImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Generate images from a text prompt; returns immediately with a task id.\n * @param params Text-to-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a text-to-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToImageResponse> {\n return this.http.request<TextToImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export const contract = {\n \"remix-image\": {\n \"models\": [\n \"imagen-4-pro-remix-image\"\n ],\n \"fields_by_model\": {\n \"imagen-4-pro-remix-image\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"2:3\",\n \"3:2\",\n \"3:4\",\n \"4:3\",\n \"4:5\",\n \"5:4\",\n \"9:16\",\n \"16:9\",\n \"21:9\",\n \"auto\"\n ]\n },\n \"output_format\": {\n \"enum\": [\n \"png\",\n \"jpg\"\n ]\n },\n \"output_resolution\": {\n \"enum\": [\n \"1k\",\n \"2k\",\n \"4k\"\n ]\n },\n \"source_image_urls\": {\n \"required\": true,\n \"min_items\": 1,\n \"max_items\": 8\n }\n }\n }\n },\n \"text-to-image\": {\n \"models\": [\n \"imagen-4\",\n \"imagen-4-fast\",\n \"imagen-4-ultra\"\n ],\n \"fields_by_model\": {\n \"imagen-4\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-fast\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\",\n \"auto\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-ultra\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { RemixImageParams, RemixImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/remix_image';\n\n/**\n * Generates new images guided by 1-8 source images combined with a text prompt.\n * Supports output resolution control (1k/2k/4k) and format selection (png/jpg).\n */\nexport class RemixImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Transform source images guided by a text prompt and wait until complete.\n * @param params Remix-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: RemixImageParams, options?: RequestOptions & PollingOptions): Promise<RemixImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<RemixImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Transform source images guided by a text prompt; returns immediately with a task id.\n * @param params Remix-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: RemixImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['remix-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a remix-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current remix-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<RemixImageResponse> {\n return this.http.request<RemixImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA+C;;;ACC/C,kBAA8C;AAC9C,sBAAkC;;;ACF3B,IAAM,WAAW;AAAA,EACtB,eAAe;AAAA,IACb,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,4BAA4B;AAAA,QAC1B,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,iBAAiB;AAAA,UACf,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,qBAAqB;AAAA,UACnB,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,qBAAqB;AAAA,UACnB,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,YAAY;AAAA,QACV,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,QAAQ;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,MACA,iB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44
44
  "source_image_urls": {
45
- "required": true
45
+ "required": true,
46
+ "min_items": 1,
47
+ "max_items": 8
46
48
  }
47
49
  }
48
50
  }
@@ -64,9 +66,6 @@ var contract = {
64
66
  "4:3"
65
67
  ]
66
68
  },
67
- "output_count": {
68
- "type": "integer"
69
- },
70
69
  "seed": {
71
70
  "type": "integer"
72
71
  }
@@ -78,18 +77,10 @@ var contract = {
78
77
  "16:9",
79
78
  "9:16",
80
79
  "3:4",
81
- "4:3"
80
+ "4:3",
81
+ "auto"
82
82
  ]
83
83
  },
84
- "output_count": {
85
- "enum": [
86
- 1,
87
- 2,
88
- 3,
89
- 4
90
- ],
91
- "type": "integer"
92
- },
93
84
  "seed": {
94
85
  "type": "integer"
95
86
  }
@@ -104,9 +95,6 @@ var contract = {
104
95
  "4:3"
105
96
  ]
106
97
  },
107
- "output_count": {
108
- "type": "integer"
109
- },
110
98
  "seed": {
111
99
  "type": "integer"
112
100
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts","../src/resources/text-to-image.ts","../src/contract_gen.ts","../src/resources/remix-image.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToImage } from './resources/text-to-image';\nimport { RemixImage } from './resources/remix-image';\n\n/**\n * Imagen 4 image generation API client.\n *\n * Three text-to-image quality tiers (imagen-4, imagen-4-fast, imagen-4-ultra)\n * and a dedicated remix model for guided image transformation from source images.\n *\n * @example\n * ```typescript\n * const client = new Imagen4Client({ apiKey: 'your-api-key' });\n *\n * const result = await client.textToImage.run({\n * model: 'imagen-4',\n * prompt: 'A cat in a spacesuit on the moon',\n * });\n * ```\n */\nexport class Imagen4Client extends BaseClient {\n /** Text-to-image generation across three quality tiers. */\n public readonly textToImage: TextToImage;\n /** Generate new images guided by one or more source images combined with a text prompt. */\n public readonly remixImage: RemixImage;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToImage = new TextToImage(this.http);\n this.remixImage = new RemixImage(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { TextToImageParams, TextToImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/text_to_image';\n\n/**\n * Generates images from a text prompt.\n * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency,\n * batch output up to 4 images), and imagen-4-ultra (highest quality).\n */\nexport class TextToImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate images from a text prompt and wait until complete.\n * @param params Text-to-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: TextToImageParams, options?: RequestOptions & PollingOptions): Promise<TextToImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<TextToImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Generate images from a text prompt; returns immediately with a task id.\n * @param params Text-to-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a text-to-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToImageResponse> {\n return this.http.request<TextToImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export const contract = {\n \"remix-image\": {\n \"models\": [\n \"imagen-4-pro-remix-image\"\n ],\n \"fields_by_model\": {\n \"imagen-4-pro-remix-image\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"2:3\",\n \"3:2\",\n \"3:4\",\n \"4:3\",\n \"4:5\",\n \"5:4\",\n \"9:16\",\n \"16:9\",\n \"21:9\",\n \"auto\"\n ]\n },\n \"output_format\": {\n \"enum\": [\n \"png\",\n \"jpg\"\n ]\n },\n \"output_resolution\": {\n \"enum\": [\n \"1k\",\n \"2k\",\n \"4k\"\n ]\n },\n \"source_image_urls\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-image\": {\n \"models\": [\n \"imagen-4\",\n \"imagen-4-fast\",\n \"imagen-4-ultra\"\n ],\n \"fields_by_model\": {\n \"imagen-4\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-fast\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"enum\": [\n 1,\n 2,\n 3,\n 4\n ],\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-ultra\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"output_count\": {\n \"type\": \"integer\"\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { RemixImageParams, RemixImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/remix_image';\n\n/**\n * Generates new images guided by 1-8 source images combined with a text prompt.\n * Supports output resolution control (1k/2k/4k) and format selection (png/jpg).\n */\nexport class RemixImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Transform source images guided by a text prompt and wait until complete.\n * @param params Remix-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: RemixImageParams, options?: RequestOptions & PollingOptions): Promise<RemixImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<RemixImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Transform source images guided by a text prompt; returns immediately with a task id.\n * @param params Remix-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: RemixImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['remix-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a remix-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current remix-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<RemixImageResponse> {\n return this.http.request<RemixImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { Imagen4Client } from './client';\nexport { TextToImage } from './resources/text-to-image';\nexport { RemixImage } from './resources/remix-image';\nexport type * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,yBAAyB;;;ACF3B,IAAM,WAAW;AAAA,EACtB,eAAe;AAAA,IACb,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,4BAA4B;AAAA,QAC1B,gBAAgB;AAAA,UACd,QAAQ;AA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C,mBAAsC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACxE,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAO,QAA0B,SAAuD;AAC5F,UAAM,OAAOC,eAAc,MAAM;AACjC,IAAAC,gBAAe,SAAS,aAAa,GAAmB,IAA+B;AACvF,WAAO,KAAK,KAAK,QAA4B,QAAQH,WAAU;AAAA,MAC7D;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,IAAI,IAAY,SAAuD;AAC3E,WAAO,KAAK,KAAK,QAA4B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACvE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AHnCO,IAAM,gBAAN,cAA4B,WAAW;AAAA;AAAA,EAE5B;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,aAAa,IAAI,WAAW,KAAK,IAAI;AAAA,EAC5C;AACF;;;AI1BA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams"]}
1
+ {"version":3,"sources":["../src/client.ts","../src/resources/text-to-image.ts","../src/contract_gen.ts","../src/resources/remix-image.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToImage } from './resources/text-to-image';\nimport { RemixImage } from './resources/remix-image';\n\n/**\n * Imagen 4 image generation API client.\n *\n * Three text-to-image quality tiers (imagen-4, imagen-4-fast, imagen-4-ultra)\n * and a dedicated remix model for guided image transformation from source images.\n *\n * @example\n * ```typescript\n * const client = new Imagen4Client({ apiKey: 'your-api-key' });\n *\n * const result = await client.textToImage.run({\n * model: 'imagen-4',\n * prompt: 'A cat in a spacesuit on the moon',\n * });\n * ```\n */\nexport class Imagen4Client extends BaseClient {\n /** Text-to-image generation across three quality tiers. */\n public readonly textToImage: TextToImage;\n /** Generate new images guided by one or more source images combined with a text prompt. */\n public readonly remixImage: RemixImage;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToImage = new TextToImage(this.http);\n this.remixImage = new RemixImage(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { TextToImageParams, TextToImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/text_to_image';\n\n/**\n * Generates images from a text prompt.\n * Three model tiers are available: imagen-4 (standard), imagen-4-fast (lower latency),\n * and imagen-4-ultra (highest quality).\n */\nexport class TextToImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate images from a text prompt and wait until complete.\n * @param params Text-to-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: TextToImageParams, options?: RequestOptions & PollingOptions): Promise<TextToImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<TextToImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Generate images from a text prompt; returns immediately with a task id.\n * @param params Text-to-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a text-to-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToImageResponse> {\n return this.http.request<TextToImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export const contract = {\n \"remix-image\": {\n \"models\": [\n \"imagen-4-pro-remix-image\"\n ],\n \"fields_by_model\": {\n \"imagen-4-pro-remix-image\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"2:3\",\n \"3:2\",\n \"3:4\",\n \"4:3\",\n \"4:5\",\n \"5:4\",\n \"9:16\",\n \"16:9\",\n \"21:9\",\n \"auto\"\n ]\n },\n \"output_format\": {\n \"enum\": [\n \"png\",\n \"jpg\"\n ]\n },\n \"output_resolution\": {\n \"enum\": [\n \"1k\",\n \"2k\",\n \"4k\"\n ]\n },\n \"source_image_urls\": {\n \"required\": true,\n \"min_items\": 1,\n \"max_items\": 8\n }\n }\n }\n },\n \"text-to-image\": {\n \"models\": [\n \"imagen-4\",\n \"imagen-4-fast\",\n \"imagen-4-ultra\"\n ],\n \"fields_by_model\": {\n \"imagen-4\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-fast\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\",\n \"auto\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"imagen-4-ultra\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"1:1\",\n \"16:9\",\n \"9:16\",\n \"3:4\",\n \"4:3\"\n ]\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, PollingOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type { RemixImageParams, RemixImageResponse, TaskCreateResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/imagen_4/remix_image';\n\n/**\n * Generates new images guided by 1-8 source images combined with a text prompt.\n * Supports output resolution control (1k/2k/4k) and format selection (png/jpg).\n */\nexport class RemixImage {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Transform source images guided by a text prompt and wait until complete.\n * @param params Remix-image parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed task with images.\n */\n async run(params: RemixImageParams, options?: RequestOptions & PollingOptions): Promise<RemixImageResponse> {\n const { id } = await this.create(params, options);\n return pollUntilComplete<RemixImageResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n }\n\n /**\n * Transform source images guided by a text prompt; returns immediately with a task id.\n * @param params Remix-image parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: RemixImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['remix-image'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n\n /**\n * Fetch the current status of a remix-image task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current remix-image task status.\n */\n async get(id: string, options?: RequestOptions): Promise<RemixImageResponse> {\n return this.http.request<RemixImageResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { Imagen4Client } from './client';\nexport { TextToImage } from './resources/text-to-image';\nexport { RemixImage } from './resources/remix-image';\nexport type * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,yBAAyB;;;ACF3B,IAAM,WAAW;AAAA,EACtB,eAAe;AAAA,IACb,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,4BAA4B;AAAA,QAC1B,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,iBAAiB;AAAA,UACf,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,qBAAqB;AAAA,UACnB,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,qBAAqB;AAAA,UACnB,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,YAAY;AAAA,QACV,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,QAAQ;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,MACA,iBAAiB;AAAA,QACf,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,QAAQ;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,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;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ7B,MAAM,IAAI,QAA0B,SAAwE;AAC1G,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,WAAOC,mBAAsC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACxE,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAO,QAA0B,SAAuD;AAC5F,UAAM,OAAOC,eAAc,MAAM;AACjC,IAAAC,gBAAe,SAAS,aAAa,GAAmB,IAA+B;AACvF,WAAO,KAAK,KAAK,QAA4B,QAAQH,WAAU;AAAA,MAC7D;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,IAAI,IAAY,SAAuD;AAC3E,WAAO,KAAK,KAAK,QAA4B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACvE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AHnCO,IAAM,gBAAN,cAA4B,WAAW;AAAA;AAAA,EAE5B;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,aAAa,IAAI,WAAW,KAAK,IAAI;AAAA,EAC5C;AACF;;;AI1BA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams"]}
package/package.json CHANGED
@@ -3,8 +3,8 @@
3
3
  "runapi": {
4
4
  "slug": "imagen-4"
5
5
  },
6
- "version": "0.2.7",
7
- "description": "RunAPI Imagen 4 SDK for text-to-image and remix-image workflows in JavaScript, Python, Ruby, Go, and Java",
6
+ "version": "0.2.9",
7
+ "description": "RunAPI Imagen 4 SDK for text-to-image and remix-image workflows in JavaScript, Python, Ruby, Go, Java, and PHP",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
10
10
  "types": "./dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "clean": "rm -rf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@runapi.ai/core": "^0.2.7"
33
+ "@runapi.ai/core": "^0.2.14"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.0.0",