@runapi.ai/gemini-omni 0.2.8 → 0.3.1

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/README.md CHANGED
@@ -21,14 +21,14 @@ const voice = await client.createAudio.run({
21
21
 
22
22
  const character = await client.createCharacter.run({
23
23
  descriptions: 'A silver-haired cyberpunk guide',
24
- image_urls: ['https://file.runapi.ai/demo/character.png'],
24
+ reference_image_url: 'https://cdn.runapi.ai/public/samples/reference-1.jpg',
25
25
  });
26
26
 
27
27
  const video = await client.textToVideo.run({
28
- prompt: 'Create a neon city tracking shot with the character walking forward.',
29
- duration: '8',
30
- resolution: '1080p',
31
- character_ids: [character.id],
28
+ model: 'gemini-omni-flash-preview',
29
+ prompt: 'A paper airplane glides through a sunlit studio.',
30
+ aspect_ratio: '16:9',
31
+ output_resolution: '720p',
32
32
  });
33
33
  ```
34
34
 
@@ -39,7 +39,7 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
39
39
  - Model page: https://runapi.ai/models/gemini-omni
40
40
  - SDK docs: https://runapi.ai/docs#sdk-gemini-omni
41
41
  - Product docs: https://runapi.ai/docs#gemini-omni
42
- - Pricing and rate limits: https://runapi.ai/models/gemini-omni
42
+ - Flash Preview pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-preview
43
43
  - Provider comparison: https://runapi.ai/providers/google
44
44
  - Full catalog: https://runapi.ai/models
45
45
 
package/dist/index.d.mts CHANGED
@@ -74,6 +74,8 @@ interface CreateCharacterResponse {
74
74
  }
75
75
  /** Video duration in seconds. Longer durations consume more credits. */
76
76
  type GeminiOmniTextToVideoDuration = 4 | 6 | 8 | 10;
77
+ /** Gemini Omni model exposed by the text-to-video endpoint. */
78
+ type GeminiOmniTextToVideoModel = 'gemini-omni-flash-preview' | 'gemini-omni-text-to-video';
77
79
  /** Output aspect ratio -- landscape (16:9) or portrait (9:16). */
78
80
  type GeminiOmniTextToVideoAspectRatio = '16:9' | '9:16';
79
81
  /** Output resolution -- higher resolutions produce sharper video at higher cost. */
@@ -100,10 +102,12 @@ interface GeminiOmniTextToVideoClip {
100
102
  * must total 7 or fewer.
101
103
  */
102
104
  interface TextToVideoParams {
105
+ /** Model to use. Defaults to gemini-omni-text-to-video for backward compatibility. */
106
+ model?: GeminiOmniTextToVideoModel;
103
107
  /** Video generation prompt, max 20 000 characters. */
104
108
  prompt: string;
105
- /** Output video duration in seconds. */
106
- duration_seconds: GeminiOmniTextToVideoDuration;
109
+ /** Output duration for gemini-omni-text-to-video; not accepted by gemini-omni-flash-preview. */
110
+ duration_seconds?: GeminiOmniTextToVideoDuration;
107
111
  /** HTTPS callback URL for task completion notification. */
108
112
  callback_url?: string;
109
113
  /** Reference image URLs, max 7. Each consumes 1 reference unit. */
@@ -239,4 +243,4 @@ declare class GeminiOmniClient extends BaseClient {
239
243
  constructor(options?: ClientOptions);
240
244
  }
241
245
 
242
- export { type CompletedTextToVideoResponse, type CreateAudioParams, type CreateAudioResponse, type CreateCharacterParams, type CreateCharacterResponse, type GeminiOmniAudio, type GeminiOmniAudioVoice, type GeminiOmniCharacter, GeminiOmniClient, type GeminiOmniTextToVideoAspectRatio, type GeminiOmniTextToVideoClip, type GeminiOmniTextToVideoDuration, type GeminiOmniTextToVideoResolution, type ImageMetadata, type TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
246
+ export { type CompletedTextToVideoResponse, type CreateAudioParams, type CreateAudioResponse, type CreateCharacterParams, type CreateCharacterResponse, type GeminiOmniAudio, type GeminiOmniAudioVoice, type GeminiOmniCharacter, GeminiOmniClient, type GeminiOmniTextToVideoAspectRatio, type GeminiOmniTextToVideoClip, type GeminiOmniTextToVideoDuration, type GeminiOmniTextToVideoModel, type GeminiOmniTextToVideoResolution, type ImageMetadata, type TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
package/dist/index.d.ts CHANGED
@@ -74,6 +74,8 @@ interface CreateCharacterResponse {
74
74
  }
75
75
  /** Video duration in seconds. Longer durations consume more credits. */
76
76
  type GeminiOmniTextToVideoDuration = 4 | 6 | 8 | 10;
77
+ /** Gemini Omni model exposed by the text-to-video endpoint. */
78
+ type GeminiOmniTextToVideoModel = 'gemini-omni-flash-preview' | 'gemini-omni-text-to-video';
77
79
  /** Output aspect ratio -- landscape (16:9) or portrait (9:16). */
78
80
  type GeminiOmniTextToVideoAspectRatio = '16:9' | '9:16';
79
81
  /** Output resolution -- higher resolutions produce sharper video at higher cost. */
@@ -100,10 +102,12 @@ interface GeminiOmniTextToVideoClip {
100
102
  * must total 7 or fewer.
101
103
  */
102
104
  interface TextToVideoParams {
105
+ /** Model to use. Defaults to gemini-omni-text-to-video for backward compatibility. */
106
+ model?: GeminiOmniTextToVideoModel;
103
107
  /** Video generation prompt, max 20 000 characters. */
104
108
  prompt: string;
105
- /** Output video duration in seconds. */
106
- duration_seconds: GeminiOmniTextToVideoDuration;
109
+ /** Output duration for gemini-omni-text-to-video; not accepted by gemini-omni-flash-preview. */
110
+ duration_seconds?: GeminiOmniTextToVideoDuration;
107
111
  /** HTTPS callback URL for task completion notification. */
108
112
  callback_url?: string;
109
113
  /** Reference image URLs, max 7. Each consumes 1 reference unit. */
@@ -239,4 +243,4 @@ declare class GeminiOmniClient extends BaseClient {
239
243
  constructor(options?: ClientOptions);
240
244
  }
241
245
 
242
- export { type CompletedTextToVideoResponse, type CreateAudioParams, type CreateAudioResponse, type CreateCharacterParams, type CreateCharacterResponse, type GeminiOmniAudio, type GeminiOmniAudioVoice, type GeminiOmniCharacter, GeminiOmniClient, type GeminiOmniTextToVideoAspectRatio, type GeminiOmniTextToVideoClip, type GeminiOmniTextToVideoDuration, type GeminiOmniTextToVideoResolution, type ImageMetadata, type TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
246
+ export { type CompletedTextToVideoResponse, type CreateAudioParams, type CreateAudioResponse, type CreateCharacterParams, type CreateCharacterResponse, type GeminiOmniAudio, type GeminiOmniAudioVoice, type GeminiOmniCharacter, GeminiOmniClient, type GeminiOmniTextToVideoAspectRatio, type GeminiOmniTextToVideoClip, type GeminiOmniTextToVideoDuration, type GeminiOmniTextToVideoModel, type GeminiOmniTextToVideoResolution, type ImageMetadata, type TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
package/dist/index.js CHANGED
@@ -73,9 +73,32 @@ var contract = {
73
73
  },
74
74
  "text-to-video": {
75
75
  "models": [
76
+ "gemini-omni-flash-preview",
76
77
  "gemini-omni-text-to-video"
77
78
  ],
78
79
  "fields_by_model": {
80
+ "gemini-omni-flash-preview": {
81
+ "aspect_ratio": {
82
+ "enum": [
83
+ "16:9",
84
+ "9:16"
85
+ ]
86
+ },
87
+ "duration_seconds": {
88
+ "type": "integer"
89
+ },
90
+ "output_resolution": {
91
+ "enum": [
92
+ "720p"
93
+ ]
94
+ },
95
+ "prompt": {
96
+ "required": true
97
+ },
98
+ "seed": {
99
+ "type": "integer"
100
+ }
101
+ },
79
102
  "gemini-omni-text-to-video": {
80
103
  "aspect_ratio": {
81
104
  "enum": [
@@ -83,6 +106,12 @@ var contract = {
83
106
  "9:16"
84
107
  ]
85
108
  },
109
+ "audio_ids": {
110
+ "max_items": 3
111
+ },
112
+ "character_ids": {
113
+ "max_items": 3
114
+ },
86
115
  "duration_seconds": {
87
116
  "enum": [
88
117
  4,
@@ -103,11 +132,32 @@ var contract = {
103
132
  "prompt": {
104
133
  "required": true
105
134
  },
135
+ "reference_image_urls": {
136
+ "max_items": 7
137
+ },
106
138
  "seed": {
107
139
  "type": "integer"
140
+ },
141
+ "video_list": {
142
+ "max_items": 1
108
143
  }
109
144
  }
110
- }
145
+ },
146
+ "rules": [
147
+ {
148
+ "when": {
149
+ "model": "gemini-omni-flash-preview"
150
+ },
151
+ "forbidden": [
152
+ "reference_image_urls",
153
+ "audio_ids",
154
+ "video_list",
155
+ "character_ids",
156
+ "duration_seconds",
157
+ "seed"
158
+ ]
159
+ }
160
+ ]
111
161
  }
112
162
  };
113
163
 
@@ -164,7 +214,7 @@ var CreateCharacter = class {
164
214
  var import_core3 = require("@runapi.ai/core");
165
215
  var import_internal = require("@runapi.ai/core/internal");
166
216
  var ENDPOINT3 = "/api/v1/gemini_omni/text_to_video";
167
- var MODEL3 = "gemini-omni-text-to-video";
217
+ var DEFAULT_MODEL = "gemini-omni-text-to-video";
168
218
  var TextToVideo = class {
169
219
  constructor(http) {
170
220
  this.http = http;
@@ -192,7 +242,10 @@ var TextToVideo = class {
192
242
  */
193
243
  async create(params, options) {
194
244
  const body = (0, import_core3.compactParams)(params);
195
- (0, import_core3.validateParams)(contract["text-to-video"], { ...body, model: MODEL3 });
245
+ (0, import_core3.validateParams)(contract["text-to-video"], {
246
+ ...body,
247
+ model: body.model ?? DEFAULT_MODEL
248
+ });
196
249
  return this.http.request("POST", ENDPOINT3, {
197
250
  body,
198
251
  ...options
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/create-audio.ts","../src/contract_gen.ts","../src/resources/create-character.ts","../src/resources/text-to-video.ts"],"sourcesContent":["export { GeminiOmniClient } from './client';\nexport * from './types';\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { CreateAudio } from './resources/create-audio';\nimport { CreateCharacter } from './resources/create-character';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Gemini Omni multimodal generation client for voice presets, character creation,\n * and text-to-video with optional characters, audio voices, and reference media.\n *\n * @example\n * ```typescript\n * import { GeminiOmniClient } from '@runapi.ai/gemini-omni';\n * const client = new GeminiOmniClient({ apiKey: 'sk-...' });\n *\n * // Create a voice preset, then generate a video using it\n * const audio = await client.createAudio.run({\n * audio_id: 'zephyr',\n * name: 'Narrator',\n * });\n * const video = await client.textToVideo.run({\n * prompt: 'A narrator walks through a futuristic city',\n * duration_seconds: 6,\n * audio_ids: [audio.audio!.id],\n * });\n * console.log(video.videos[0].url);\n * ```\n */\nexport class GeminiOmniClient extends BaseClient {\n /** Registers a reusable voice preset from a built-in voice identity (synchronous). */\n public readonly createAudio: CreateAudio;\n /** Builds a reusable character from a reference image and description (synchronous). */\n public readonly createCharacter: CreateCharacter;\n /** Generates video from a prompt with optional characters, voices, images, and clips (async with polling). */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.createAudio = new CreateAudio(this.http);\n this.createCharacter = new CreateCharacter(this.http);\n this.textToVideo = new TextToVideo(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-audio';\n\n/**\n * Registers a reusable voice preset from a built-in voice identity.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a reusable voice preset (synchronous).\n * @param params Voice preset parameters.\n * @param options Per-request overrides.\n * @returns The created audio voice preset.\n */\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n const body = compactParams(params);\n validateParams(contract['create-audio'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n}\n","export const contract = {\n \"create-audio\": {\n \"models\": [\n \"gemini-omni-audio\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-audio\": {\n \"audio_id\": {\n \"required\": true\n },\n \"name\": {\n \"required\": true\n }\n }\n }\n },\n \"create-character\": {\n \"models\": [\n \"gemini-omni-character\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-character\": {\n \"descriptions\": {\n \"required\": true\n },\n \"reference_image_url\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-video\": {\n \"models\": [\n \"gemini-omni-text-to-video\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-text-to-video\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"duration_seconds\": {\n \"enum\": [\n 4,\n 6,\n 8,\n 10\n ],\n \"required\": true,\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\",\n \"1080p\",\n \"4k\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-character';\n\n/**\n * Builds a reusable character from a reference image and description.\n * Attach audio IDs to give the character a specific voice.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Build a reusable character (synchronous).\n * @param params Character creation parameters.\n * @param options Per-request overrides.\n * @returns The created character.\n */\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n const body = compactParams(params);\n validateParams(contract['create-character'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\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 {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-text-to-video';\n\n/**\n * Generates video from a prompt with optional characters, audio voices, reference images, and video clips.\n * This is an async operation -- use `run()` for automatic polling or `create()`/`get()` for manual control.\n */\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate a video and wait until complete.\n * @param params Text-to-video parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed text-to-video result.\n */\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n /**\n * Create a text-to-video task; returns immediately with a task id.\n * @param params Text-to-video parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-video'] as ActionSchema, { ...body, model: MODEL } 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-video task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-video status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eA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AACjC,qCAAe,SAAS,eAAe,GAAmB,EAAE,GAAG,MAAM,OAAOA,OAAM,CAA4B;AAC9G,WAAO,KAAK,KAAK,QAA4B,QAAQD,WAAU;AAAA,MAC7D;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AJrCO,IAAM,mBAAN,cAA+B,wBAAW;AAAA;AAAA,EAE/B;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,kBAAkB,IAAI,gBAAgB,KAAK,IAAI;AACpD,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAAA,EAC9C;AACF;;;ADvCA,IAAAE,eAUO;","names":["import_core","import_core","ENDPOINT","MODEL","import_core","ENDPOINT","MODEL","import_core"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/create-audio.ts","../src/contract_gen.ts","../src/resources/create-character.ts","../src/resources/text-to-video.ts"],"sourcesContent":["export { GeminiOmniClient } from './client';\nexport * from './types';\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { CreateAudio } from './resources/create-audio';\nimport { CreateCharacter } from './resources/create-character';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Gemini Omni multimodal generation client for voice presets, character creation,\n * and text-to-video with optional characters, audio voices, and reference media.\n *\n * @example\n * ```typescript\n * import { GeminiOmniClient } from '@runapi.ai/gemini-omni';\n * const client = new GeminiOmniClient({ apiKey: 'sk-...' });\n *\n * // Create a voice preset, then generate a video using it\n * const audio = await client.createAudio.run({\n * audio_id: 'zephyr',\n * name: 'Narrator',\n * });\n * const video = await client.textToVideo.run({\n * prompt: 'A narrator walks through a futuristic city',\n * duration_seconds: 6,\n * audio_ids: [audio.audio!.id],\n * });\n * console.log(video.videos[0].url);\n * ```\n */\nexport class GeminiOmniClient extends BaseClient {\n /** Registers a reusable voice preset from a built-in voice identity (synchronous). */\n public readonly createAudio: CreateAudio;\n /** Builds a reusable character from a reference image and description (synchronous). */\n public readonly createCharacter: CreateCharacter;\n /** Generates video from a prompt with optional characters, voices, images, and clips (async with polling). */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.createAudio = new CreateAudio(this.http);\n this.createCharacter = new CreateCharacter(this.http);\n this.textToVideo = new TextToVideo(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-audio';\n\n/**\n * Registers a reusable voice preset from a built-in voice identity.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a reusable voice preset (synchronous).\n * @param params Voice preset parameters.\n * @param options Per-request overrides.\n * @returns The created audio voice preset.\n */\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n const body = compactParams(params);\n validateParams(contract['create-audio'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n}\n","export const contract = {\n \"create-audio\": {\n \"models\": [\n \"gemini-omni-audio\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-audio\": {\n \"audio_id\": {\n \"required\": true\n },\n \"name\": {\n \"required\": true\n }\n }\n }\n },\n \"create-character\": {\n \"models\": [\n \"gemini-omni-character\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-character\": {\n \"descriptions\": {\n \"required\": true\n },\n \"reference_image_url\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-video\": {\n \"models\": [\n \"gemini-omni-flash-preview\",\n \"gemini-omni-text-to-video\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-flash-preview\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"duration_seconds\": {\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"gemini-omni-text-to-video\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"audio_ids\": {\n \"max_items\": 3\n },\n \"character_ids\": {\n \"max_items\": 3\n },\n \"duration_seconds\": {\n \"enum\": [\n 4,\n 6,\n 8,\n 10\n ],\n \"required\": true,\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\",\n \"1080p\",\n \"4k\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"reference_image_urls\": {\n \"max_items\": 7\n },\n \"seed\": {\n \"type\": \"integer\"\n },\n \"video_list\": {\n \"max_items\": 1\n }\n }\n },\n \"rules\": [\n {\n \"when\": {\n \"model\": \"gemini-omni-flash-preview\"\n },\n \"forbidden\": [\n \"reference_image_urls\",\n \"audio_ids\",\n \"video_list\",\n \"character_ids\",\n \"duration_seconds\",\n \"seed\"\n ]\n }\n ]\n }\n} as const;\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-character';\n\n/**\n * Builds a reusable character from a reference image and description.\n * Attach audio IDs to give the character a specific voice.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Build a reusable character (synchronous).\n * @param params Character creation parameters.\n * @param options Per-request overrides.\n * @returns The created character.\n */\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n const body = compactParams(params);\n validateParams(contract['create-character'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\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 {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\nconst DEFAULT_MODEL = 'gemini-omni-text-to-video';\n\n/**\n * Generates video from a prompt with optional characters, audio voices, reference images, and video clips.\n * This is an async operation -- use `run()` for automatic polling or `create()`/`get()` for manual control.\n */\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate a video and wait until complete.\n * @param params Text-to-video parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed text-to-video result.\n */\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n /**\n * Create a text-to-video task; returns immediately with a task id.\n * @param params Text-to-video parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-video'] as ActionSchema, {\n ...body,\n model: body.model ?? DEFAULT_MODEL,\n } 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-video task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-video status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA+C;;;ACC/C,kBAA8C;;;ACDvC,IAAM,WAAW;AAAA,EACtB,gBAAgB;AAAA,IACd,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,qBAAqB;AAAA,QACnB,YAAY;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,oBAAoB;AAAA,IAClB,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,yBAAyB;AAAA,QACvB,gBAAgB;AAAA,UACd,YAAY;AAAA,QACd;AAAA,QACA,uBAAuB;AAAA,UACrB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,MACR;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ACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,UAAM,WAAO,4BAAc,MAAM;AACjC,qCAAe,SAAS,eAAe,GAAmB;AAAA,MACxD,GAAG;AAAA,MACH,OAAO,KAAK,SAAS;AAAA,IACvB,CAA4B;AAC5B,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,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AJvCO,IAAM,mBAAN,cAA+B,wBAAW;AAAA;AAAA,EAE/B;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,kBAAkB,IAAI,gBAAgB,KAAK,IAAI;AACpD,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAAA,EAC9C;AACF;;;ADvCA,IAAAC,eAUO;","names":["import_core","import_core","ENDPOINT","MODEL","import_core","ENDPOINT","import_core"]}
package/dist/index.mjs CHANGED
@@ -38,9 +38,32 @@ var contract = {
38
38
  },
39
39
  "text-to-video": {
40
40
  "models": [
41
+ "gemini-omni-flash-preview",
41
42
  "gemini-omni-text-to-video"
42
43
  ],
43
44
  "fields_by_model": {
45
+ "gemini-omni-flash-preview": {
46
+ "aspect_ratio": {
47
+ "enum": [
48
+ "16:9",
49
+ "9:16"
50
+ ]
51
+ },
52
+ "duration_seconds": {
53
+ "type": "integer"
54
+ },
55
+ "output_resolution": {
56
+ "enum": [
57
+ "720p"
58
+ ]
59
+ },
60
+ "prompt": {
61
+ "required": true
62
+ },
63
+ "seed": {
64
+ "type": "integer"
65
+ }
66
+ },
44
67
  "gemini-omni-text-to-video": {
45
68
  "aspect_ratio": {
46
69
  "enum": [
@@ -48,6 +71,12 @@ var contract = {
48
71
  "9:16"
49
72
  ]
50
73
  },
74
+ "audio_ids": {
75
+ "max_items": 3
76
+ },
77
+ "character_ids": {
78
+ "max_items": 3
79
+ },
51
80
  "duration_seconds": {
52
81
  "enum": [
53
82
  4,
@@ -68,11 +97,32 @@ var contract = {
68
97
  "prompt": {
69
98
  "required": true
70
99
  },
100
+ "reference_image_urls": {
101
+ "max_items": 7
102
+ },
71
103
  "seed": {
72
104
  "type": "integer"
105
+ },
106
+ "video_list": {
107
+ "max_items": 1
73
108
  }
74
109
  }
75
- }
110
+ },
111
+ "rules": [
112
+ {
113
+ "when": {
114
+ "model": "gemini-omni-flash-preview"
115
+ },
116
+ "forbidden": [
117
+ "reference_image_urls",
118
+ "audio_ids",
119
+ "video_list",
120
+ "character_ids",
121
+ "duration_seconds",
122
+ "seed"
123
+ ]
124
+ }
125
+ ]
76
126
  }
77
127
  };
78
128
 
@@ -129,7 +179,7 @@ var CreateCharacter = class {
129
179
  import { compactParams as compactParams3, validateParams as validateParams3 } from "@runapi.ai/core";
130
180
  import { pollUntilComplete } from "@runapi.ai/core/internal";
131
181
  var ENDPOINT3 = "/api/v1/gemini_omni/text_to_video";
132
- var MODEL3 = "gemini-omni-text-to-video";
182
+ var DEFAULT_MODEL = "gemini-omni-text-to-video";
133
183
  var TextToVideo = class {
134
184
  constructor(http) {
135
185
  this.http = http;
@@ -157,7 +207,10 @@ var TextToVideo = class {
157
207
  */
158
208
  async create(params, options) {
159
209
  const body = compactParams3(params);
160
- validateParams3(contract["text-to-video"], { ...body, model: MODEL3 });
210
+ validateParams3(contract["text-to-video"], {
211
+ ...body,
212
+ model: body.model ?? DEFAULT_MODEL
213
+ });
161
214
  return this.http.request("POST", ENDPOINT3, {
162
215
  body,
163
216
  ...options
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts","../src/resources/create-audio.ts","../src/contract_gen.ts","../src/resources/create-character.ts","../src/resources/text-to-video.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { CreateAudio } from './resources/create-audio';\nimport { CreateCharacter } from './resources/create-character';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Gemini Omni multimodal generation client for voice presets, character creation,\n * and text-to-video with optional characters, audio voices, and reference media.\n *\n * @example\n * ```typescript\n * import { GeminiOmniClient } from '@runapi.ai/gemini-omni';\n * const client = new GeminiOmniClient({ apiKey: 'sk-...' });\n *\n * // Create a voice preset, then generate a video using it\n * const audio = await client.createAudio.run({\n * audio_id: 'zephyr',\n * name: 'Narrator',\n * });\n * const video = await client.textToVideo.run({\n * prompt: 'A narrator walks through a futuristic city',\n * duration_seconds: 6,\n * audio_ids: [audio.audio!.id],\n * });\n * console.log(video.videos[0].url);\n * ```\n */\nexport class GeminiOmniClient extends BaseClient {\n /** Registers a reusable voice preset from a built-in voice identity (synchronous). */\n public readonly createAudio: CreateAudio;\n /** Builds a reusable character from a reference image and description (synchronous). */\n public readonly createCharacter: CreateCharacter;\n /** Generates video from a prompt with optional characters, voices, images, and clips (async with polling). */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.createAudio = new CreateAudio(this.http);\n this.createCharacter = new CreateCharacter(this.http);\n this.textToVideo = new TextToVideo(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-audio';\n\n/**\n * Registers a reusable voice preset from a built-in voice identity.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a reusable voice preset (synchronous).\n * @param params Voice preset parameters.\n * @param options Per-request overrides.\n * @returns The created audio voice preset.\n */\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n const body = compactParams(params);\n validateParams(contract['create-audio'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n}\n","export const contract = {\n \"create-audio\": {\n \"models\": [\n \"gemini-omni-audio\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-audio\": {\n \"audio_id\": {\n \"required\": true\n },\n \"name\": {\n \"required\": true\n }\n }\n }\n },\n \"create-character\": {\n \"models\": [\n \"gemini-omni-character\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-character\": {\n \"descriptions\": {\n \"required\": true\n },\n \"reference_image_url\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-video\": {\n \"models\": [\n \"gemini-omni-text-to-video\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-text-to-video\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"duration_seconds\": {\n \"enum\": [\n 4,\n 6,\n 8,\n 10\n ],\n \"required\": true,\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\",\n \"1080p\",\n \"4k\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n }\n }\n }\n} as const;\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-character';\n\n/**\n * Builds a reusable character from a reference image and description.\n * Attach audio IDs to give the character a specific voice.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Build a reusable character (synchronous).\n * @param params Character creation parameters.\n * @param options Per-request overrides.\n * @returns The created character.\n */\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n const body = compactParams(params);\n validateParams(contract['create-character'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\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 {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-text-to-video';\n\n/**\n * Generates video from a prompt with optional characters, audio voices, reference images, and video clips.\n * This is an async operation -- use `run()` for automatic polling or `create()`/`get()` for manual control.\n */\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate a video and wait until complete.\n * @param params Text-to-video parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed text-to-video result.\n */\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n /**\n * Create a text-to-video task; returns immediately with a task id.\n * @param params Text-to-video parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-video'] as ActionSchema, { ...body, model: MODEL } 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-video task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-video status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { GeminiOmniClient } from './client';\nexport * from './types';\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;;;ACDvC,IAAM,WAAW;AAAA,EACtB,gBAAgB;AAAA,IACd,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,qBAAqB;AAAA,QACnB,YAAY;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,oBAAoB;AAAA,IAClB,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,yBAAyB;AAAA,QACvB,gBAAgB;AAAA,UACd,YAAY;AAAA,QACd;AAAA,QACA,uBAAuB;AAAA,UACrB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,6BAA6B;AAAA,QAC3B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AI,YAAY,KAAK,IAAI;AAC5C,SAAK,kBAAkB,IAAI,gBAAgB,KAAK,IAAI;AACpD,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAAA,EAC9C;AACF;;;AKvCA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","validateParams","ENDPOINT","MODEL","compactParams","validateParams","compactParams","validateParams","ENDPOINT","MODEL","compactParams","validateParams"]}
1
+ {"version":3,"sources":["../src/client.ts","../src/resources/create-audio.ts","../src/contract_gen.ts","../src/resources/create-character.ts","../src/resources/text-to-video.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { CreateAudio } from './resources/create-audio';\nimport { CreateCharacter } from './resources/create-character';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Gemini Omni multimodal generation client for voice presets, character creation,\n * and text-to-video with optional characters, audio voices, and reference media.\n *\n * @example\n * ```typescript\n * import { GeminiOmniClient } from '@runapi.ai/gemini-omni';\n * const client = new GeminiOmniClient({ apiKey: 'sk-...' });\n *\n * // Create a voice preset, then generate a video using it\n * const audio = await client.createAudio.run({\n * audio_id: 'zephyr',\n * name: 'Narrator',\n * });\n * const video = await client.textToVideo.run({\n * prompt: 'A narrator walks through a futuristic city',\n * duration_seconds: 6,\n * audio_ids: [audio.audio!.id],\n * });\n * console.log(video.videos[0].url);\n * ```\n */\nexport class GeminiOmniClient extends BaseClient {\n /** Registers a reusable voice preset from a built-in voice identity (synchronous). */\n public readonly createAudio: CreateAudio;\n /** Builds a reusable character from a reference image and description (synchronous). */\n public readonly createCharacter: CreateCharacter;\n /** Generates video from a prompt with optional characters, voices, images, and clips (async with polling). */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.createAudio = new CreateAudio(this.http);\n this.createCharacter = new CreateCharacter(this.http);\n this.textToVideo = new TextToVideo(this.http);\n }\n}\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-audio';\n\n/**\n * Registers a reusable voice preset from a built-in voice identity.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Register a reusable voice preset (synchronous).\n * @param params Voice preset parameters.\n * @param options Per-request overrides.\n * @returns The created audio voice preset.\n */\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n const body = compactParams(params);\n validateParams(contract['create-audio'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\n }\n}\n","export const contract = {\n \"create-audio\": {\n \"models\": [\n \"gemini-omni-audio\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-audio\": {\n \"audio_id\": {\n \"required\": true\n },\n \"name\": {\n \"required\": true\n }\n }\n }\n },\n \"create-character\": {\n \"models\": [\n \"gemini-omni-character\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-character\": {\n \"descriptions\": {\n \"required\": true\n },\n \"reference_image_url\": {\n \"required\": true\n }\n }\n }\n },\n \"text-to-video\": {\n \"models\": [\n \"gemini-omni-flash-preview\",\n \"gemini-omni-text-to-video\"\n ],\n \"fields_by_model\": {\n \"gemini-omni-flash-preview\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"duration_seconds\": {\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"seed\": {\n \"type\": \"integer\"\n }\n },\n \"gemini-omni-text-to-video\": {\n \"aspect_ratio\": {\n \"enum\": [\n \"16:9\",\n \"9:16\"\n ]\n },\n \"audio_ids\": {\n \"max_items\": 3\n },\n \"character_ids\": {\n \"max_items\": 3\n },\n \"duration_seconds\": {\n \"enum\": [\n 4,\n 6,\n 8,\n 10\n ],\n \"required\": true,\n \"type\": \"integer\"\n },\n \"output_resolution\": {\n \"enum\": [\n \"720p\",\n \"1080p\",\n \"4k\"\n ]\n },\n \"prompt\": {\n \"required\": true\n },\n \"reference_image_urls\": {\n \"max_items\": 7\n },\n \"seed\": {\n \"type\": \"integer\"\n },\n \"video_list\": {\n \"max_items\": 1\n }\n }\n },\n \"rules\": [\n {\n \"when\": {\n \"model\": \"gemini-omni-flash-preview\"\n },\n \"forbidden\": [\n \"reference_image_urls\",\n \"audio_ids\",\n \"video_list\",\n \"character_ids\",\n \"duration_seconds\",\n \"seed\"\n ]\n }\n ]\n }\n} as const;\n","import type { HttpClient, RequestOptions, ActionSchema } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\n// Fixed endpoint model, injected only for contract validation (never sent on the wire).\nconst MODEL = 'gemini-omni-character';\n\n/**\n * Builds a reusable character from a reference image and description.\n * Attach audio IDs to give the character a specific voice.\n * This is a synchronous operation -- only `run()` is available (no create/get polling).\n */\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Build a reusable character (synchronous).\n * @param params Character creation parameters.\n * @param options Per-request overrides.\n * @returns The created character.\n */\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n const body = compactParams(params);\n validateParams(contract['create-character'] as ActionSchema, { ...body, model: MODEL } as Record<string, unknown>);\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body,\n ...options,\n });\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 {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\nconst DEFAULT_MODEL = 'gemini-omni-text-to-video';\n\n/**\n * Generates video from a prompt with optional characters, audio voices, reference images, and video clips.\n * This is an async operation -- use `run()` for automatic polling or `create()`/`get()` for manual control.\n */\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Generate a video and wait until complete.\n * @param params Text-to-video parameters.\n * @param options Per-request and polling overrides.\n * @returns The completed text-to-video result.\n */\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n /**\n * Create a text-to-video task; returns immediately with a task id.\n * @param params Text-to-video parameters.\n * @param options Per-request overrides.\n * @returns The task creation result with id.\n */\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-video'] as ActionSchema, {\n ...body,\n model: body.model ?? DEFAULT_MODEL,\n } 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-video task.\n * @param id The task id.\n * @param options Per-request overrides.\n * @returns The current text-to-video status.\n */\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { GeminiOmniClient } from './client';\nexport * from './types';\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;;;ACDvC,IAAM,WAAW;AAAA,EACtB,gBAAgB;AAAA,IACd,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,qBAAqB;AAAA,QACnB,YAAY;AAAA,UACV,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,oBAAoB;AAAA,IAClB,UAAU;AAAA,MACR;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,yBAAyB;AAAA,QACvB,gBAAgB;AAAA,UACd,YAAY;AAAA,QACd;AAAA,QACA,uBAAuB;AAAA,UACrB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,6BAA6B;AAAA,QAC3B,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,oBAAoB;AAAA,UAClB,QAAQ;AAAA,QACV;AAAA,QACA,qBAAqB;AAAA,UACnB,QAAQ;AAAA,YACN;AAAA,UACF;AAAA,QACF;AAAA,QACA,UAAU;AAAA,UACR,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,MACA,6BAA6B;AAAA,QAC3B,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,QACA,aAAa;AAAA,UACX,aAAa;AAAA,QAC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AC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AJvCO,IAAM,mBAAN,cAA+B,WAAW;AAAA;AAAA,EAE/B;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,kBAAkB,IAAI,gBAAgB,KAAK,IAAI;AACpD,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAAA,EAC9C;AACF;;;AKvCA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","validateParams","ENDPOINT","MODEL","compactParams","validateParams","compactParams","validateParams","ENDPOINT","compactParams","validateParams"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "runapi": {
4
4
  "slug": "gemini-omni"
5
5
  },
6
- "version": "0.2.8",
6
+ "version": "0.3.1",
7
7
  "description": "RunAPI Gemini Omni SDK for audio, character, and video workflows in JavaScript, Python, Ruby, Go, Java, and PHP",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "clean": "rm -rf dist"
32
32
  },
33
33
  "dependencies": {
34
- "@runapi.ai/core": "^0.2.11"
34
+ "@runapi.ai/core": "^0.2.14"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^20.0.0",
@@ -29,7 +29,7 @@ The canonical agent file is `skills/gemini-omni/SKILL.md`.
29
29
 
30
30
  - Audio: create reusable voice resources with `runapi gemini-omni create-audio`.
31
31
  - Character: create reusable character resources with `runapi gemini-omni create-character`.
32
- - Video: create text-to-video tasks with `runapi gemini-omni text-to-video`.
32
+ - Video: use `gemini-omni-flash-preview` for prompt-only 720p generation, or `gemini-omni-text-to-video` for the existing multimodal workflow.
33
33
 
34
34
  ## Install
35
35
 
@@ -64,7 +64,7 @@ runapi wait <task-id> --service gemini-omni --action text-to-video
64
64
  - Product docs: https://runapi.ai/docs#gemini-omni
65
65
  - SDK docs: https://runapi.ai/docs#sdk-gemini-omni
66
66
  - SDK repository: https://github.com/runapi-ai/gemini-omni-sdk
67
- - Pricing and rate limits: https://runapi.ai/models/gemini-omni
67
+ - Flash Preview pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-preview
68
68
  - Provider comparison: https://runapi.ai/providers/google
69
69
  - Browse all RunAPI models and skills: https://runapi.ai/models
70
70
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gemini-omni
3
- description: Create Gemini Omni voice resources, character resources, and text-to-video tasks through RunAPI. Use when the user asks an agent to create or manage Gemini Omni audio voices, character resources, or multimodal video. Default to the RunAPI CLI for one-off calls; use SDKs only when integrating RunAPI into an app or backend.
3
+ description: Create Gemini Omni voice resources, character resources, and Flash Preview or multimodal text-to-video tasks through RunAPI. Use when the user asks an agent to create or manage Gemini Omni audio voices, character resources, or video. Default to the RunAPI CLI for one-off calls; use SDKs only when integrating RunAPI into an app or backend.
4
4
  documentation: https://runapi.ai/models/gemini-omni.md
5
5
  provider_page: https://runapi.ai/providers/google.md
6
6
  catalog: https://runapi.ai/models.md
@@ -36,14 +36,17 @@ Create Gemini Omni voice resources, character resources, and text-to-video tasks
36
36
  When integrating Gemini Omni into an app, backend, worker, library, Rails service, Node service, Go service, webhook pipeline, or production workflow, start by checking the current SDK package and official usage. Confirm install commands, client methods (`create`, `get`, `run`), request fields, response shape, and error classes before using CLI help or raw HTTP examples. Use a RunAPI SDK package:
37
37
 
38
38
  - JavaScript / TypeScript: `@runapi.ai/gemini-omni`
39
+ - Python: `runapi-gemini-omni`
39
40
  - Ruby: `runapi-gemini-omni`
40
41
  - Go: `github.com/runapi-ai/gemini-omni-sdk/go`
42
+ - Java: `ai.runapi:runapi-gemini-omni`
43
+ - PHP: `runapi-ai/gemini-omni`
41
44
 
42
45
  ## Variants
43
46
 
44
47
  - Audio: create reusable voice resources with `runapi gemini-omni create-audio`.
45
48
  - Character: create reusable character resources with `runapi gemini-omni create-character`.
46
- - Video: create text-to-video tasks with `runapi gemini-omni text-to-video`.
49
+ - Video: use `gemini-omni-flash-preview` for prompt-only 720p generation, or `gemini-omni-text-to-video` for the existing multimodal workflow.
47
50
 
48
51
  ## CLI path
49
52
 
@@ -66,6 +69,15 @@ runapi gemini-omni create-audio --input-file request.json
66
69
 
67
70
  For video tasks, submit asynchronously and wait for completion:
68
71
 
72
+ ```json
73
+ {
74
+ "model": "gemini-omni-flash-preview",
75
+ "prompt": "A paper airplane glides through a sunlit studio.",
76
+ "aspect_ratio": "16:9",
77
+ "output_resolution": "720p"
78
+ }
79
+ ```
80
+
69
81
  ```shell
70
82
  runapi gemini-omni text-to-video --async --input-file request.json
71
83
  runapi wait <task-id> --service gemini-omni --action text-to-video
@@ -79,6 +91,6 @@ RunAPI-generated file URLs are temporary. Download and store generated images, v
79
91
 
80
92
  ## References
81
93
 
82
- - Model overview, pricing, and rate limits: https://runapi.ai/models/gemini-omni.md
94
+ - Flash Preview model, pricing, and rate limits: https://runapi.ai/models/gemini-omni/flash-preview.md
83
95
  - Provider comparison: https://runapi.ai/providers/google.md
84
96
  - Full model catalog: https://runapi.ai/models.md