@runapi.ai/gemini-omni 0.2.5
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/LICENSE +201 -0
- package/README.md +46 -0
- package/dist/index.d.mts +106 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +129 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +103 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -0
- package/skills/gemini-omni/README.md +73 -0
- package/skills/gemini-omni/SKILL.md +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Gemini Omni API JavaScript SDK for RunAPI
|
|
2
|
+
|
|
3
|
+
The gemini omni api JavaScript SDK is the language-specific package for Gemini Omni on RunAPI. Use this package for voice resources, character resources, and multimodal video generation workflows that need JSON request bodies and consistent RunAPI errors in JavaScript.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @runapi.ai/gemini-omni
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { GeminiOmniClient } from '@runapi.ai/gemini-omni';
|
|
15
|
+
|
|
16
|
+
const client = new GeminiOmniClient();
|
|
17
|
+
const voice = await client.createAudio.run({
|
|
18
|
+
audio_id: 'achernar',
|
|
19
|
+
name: 'Acher Narrator',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const character = await client.createCharacter.run({
|
|
23
|
+
descriptions: 'A silver-haired cyberpunk guide',
|
|
24
|
+
image_urls: ['https://file.runapi.ai/demo/character.png'],
|
|
25
|
+
});
|
|
26
|
+
|
|
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],
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Links
|
|
36
|
+
|
|
37
|
+
- Model page: https://runapi.ai/models/gemini-omni
|
|
38
|
+
- SDK docs: https://runapi.ai/docs#sdk-gemini-omni
|
|
39
|
+
- Product docs: https://runapi.ai/docs#gemini-omni
|
|
40
|
+
- Pricing and rate limits: https://runapi.ai/models/gemini-omni
|
|
41
|
+
- Provider comparison: https://runapi.ai/providers/google
|
|
42
|
+
- Full catalog: https://runapi.ai/models
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
Licensed under the Apache License, Version 2.0.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
|
|
2
|
+
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
|
+
|
|
4
|
+
type GeminiOmniAudioVoice = 'achernar' | 'achird' | 'algenib' | 'algieba' | 'alnilam' | 'aoede' | 'autonoe' | 'callirrhoe' | 'charon' | 'despina' | 'enceladus' | 'erinome' | 'fenrir' | 'gacrux' | 'iapetus' | 'kore' | 'laomedeia' | 'leda' | 'orus' | 'puck' | 'pulcherrima' | 'rasalgethi' | 'sadachbia' | 'sadaltager' | 'schedar' | 'sulafat' | 'umbriel' | 'vindemiatrix' | 'zephyr' | 'zubenelgenubi';
|
|
5
|
+
interface CreateAudioParams {
|
|
6
|
+
audio_id: GeminiOmniAudioVoice | string;
|
|
7
|
+
name: string;
|
|
8
|
+
voice_description?: string;
|
|
9
|
+
example_dialogue?: string;
|
|
10
|
+
}
|
|
11
|
+
interface GeminiOmniAudio {
|
|
12
|
+
id: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
interface CreateAudioResponse {
|
|
17
|
+
id: string;
|
|
18
|
+
audio?: GeminiOmniAudio;
|
|
19
|
+
error?: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface CreateCharacterParams {
|
|
23
|
+
descriptions: string;
|
|
24
|
+
image_urls: string[];
|
|
25
|
+
audio_ids?: string[];
|
|
26
|
+
character_name?: string;
|
|
27
|
+
}
|
|
28
|
+
interface GeminiOmniCharacter {
|
|
29
|
+
id: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
image_url?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
interface CreateCharacterResponse {
|
|
35
|
+
id: string;
|
|
36
|
+
character?: GeminiOmniCharacter;
|
|
37
|
+
error?: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
type GeminiOmniTextToVideoDuration = '4' | '6' | '8' | '10';
|
|
41
|
+
type GeminiOmniTextToVideoAspectRatio = '16:9' | '9:16';
|
|
42
|
+
type GeminiOmniTextToVideoResolution = '720p' | '1080p' | '4k';
|
|
43
|
+
interface GeminiOmniTextToVideoClip {
|
|
44
|
+
url: string;
|
|
45
|
+
start: number;
|
|
46
|
+
ends: number;
|
|
47
|
+
}
|
|
48
|
+
interface TextToVideoParams {
|
|
49
|
+
prompt: string;
|
|
50
|
+
duration: GeminiOmniTextToVideoDuration;
|
|
51
|
+
callback_url?: string;
|
|
52
|
+
image_urls?: string[];
|
|
53
|
+
audio_ids?: string[];
|
|
54
|
+
video_list?: GeminiOmniTextToVideoClip[];
|
|
55
|
+
character_ids?: string[];
|
|
56
|
+
aspect_ratio?: GeminiOmniTextToVideoAspectRatio;
|
|
57
|
+
resolution?: GeminiOmniTextToVideoResolution;
|
|
58
|
+
seed?: number;
|
|
59
|
+
}
|
|
60
|
+
interface TaskCreateResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
status?: AsyncTaskStatus;
|
|
63
|
+
}
|
|
64
|
+
interface VideoMetadata {
|
|
65
|
+
url: string;
|
|
66
|
+
}
|
|
67
|
+
interface TextToVideoResponse {
|
|
68
|
+
id: string;
|
|
69
|
+
status: AsyncTaskStatus;
|
|
70
|
+
videos?: VideoMetadata[];
|
|
71
|
+
error?: string;
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
}
|
|
74
|
+
type CompletedTextToVideoResponse = TextToVideoResponse & {
|
|
75
|
+
status: 'completed';
|
|
76
|
+
videos: VideoMetadata[];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare class CreateAudio {
|
|
80
|
+
private readonly http;
|
|
81
|
+
constructor(http: HttpClient);
|
|
82
|
+
run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare class CreateCharacter {
|
|
86
|
+
private readonly http;
|
|
87
|
+
constructor(http: HttpClient);
|
|
88
|
+
run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare class TextToVideo {
|
|
92
|
+
private readonly http;
|
|
93
|
+
constructor(http: HttpClient);
|
|
94
|
+
run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse>;
|
|
95
|
+
create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
96
|
+
get(id: string, options?: RequestOptions): Promise<TextToVideoResponse>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class GeminiOmniClient {
|
|
100
|
+
readonly createAudio: CreateAudio;
|
|
101
|
+
readonly createCharacter: CreateCharacter;
|
|
102
|
+
readonly textToVideo: TextToVideo;
|
|
103
|
+
constructor(options?: ClientOptions);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
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 TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
|
|
2
|
+
export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TimeoutError, ValidationError } from '@runapi.ai/core';
|
|
3
|
+
|
|
4
|
+
type GeminiOmniAudioVoice = 'achernar' | 'achird' | 'algenib' | 'algieba' | 'alnilam' | 'aoede' | 'autonoe' | 'callirrhoe' | 'charon' | 'despina' | 'enceladus' | 'erinome' | 'fenrir' | 'gacrux' | 'iapetus' | 'kore' | 'laomedeia' | 'leda' | 'orus' | 'puck' | 'pulcherrima' | 'rasalgethi' | 'sadachbia' | 'sadaltager' | 'schedar' | 'sulafat' | 'umbriel' | 'vindemiatrix' | 'zephyr' | 'zubenelgenubi';
|
|
5
|
+
interface CreateAudioParams {
|
|
6
|
+
audio_id: GeminiOmniAudioVoice | string;
|
|
7
|
+
name: string;
|
|
8
|
+
voice_description?: string;
|
|
9
|
+
example_dialogue?: string;
|
|
10
|
+
}
|
|
11
|
+
interface GeminiOmniAudio {
|
|
12
|
+
id: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
interface CreateAudioResponse {
|
|
17
|
+
id: string;
|
|
18
|
+
audio?: GeminiOmniAudio;
|
|
19
|
+
error?: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface CreateCharacterParams {
|
|
23
|
+
descriptions: string;
|
|
24
|
+
image_urls: string[];
|
|
25
|
+
audio_ids?: string[];
|
|
26
|
+
character_name?: string;
|
|
27
|
+
}
|
|
28
|
+
interface GeminiOmniCharacter {
|
|
29
|
+
id: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
image_url?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
interface CreateCharacterResponse {
|
|
35
|
+
id: string;
|
|
36
|
+
character?: GeminiOmniCharacter;
|
|
37
|
+
error?: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
type GeminiOmniTextToVideoDuration = '4' | '6' | '8' | '10';
|
|
41
|
+
type GeminiOmniTextToVideoAspectRatio = '16:9' | '9:16';
|
|
42
|
+
type GeminiOmniTextToVideoResolution = '720p' | '1080p' | '4k';
|
|
43
|
+
interface GeminiOmniTextToVideoClip {
|
|
44
|
+
url: string;
|
|
45
|
+
start: number;
|
|
46
|
+
ends: number;
|
|
47
|
+
}
|
|
48
|
+
interface TextToVideoParams {
|
|
49
|
+
prompt: string;
|
|
50
|
+
duration: GeminiOmniTextToVideoDuration;
|
|
51
|
+
callback_url?: string;
|
|
52
|
+
image_urls?: string[];
|
|
53
|
+
audio_ids?: string[];
|
|
54
|
+
video_list?: GeminiOmniTextToVideoClip[];
|
|
55
|
+
character_ids?: string[];
|
|
56
|
+
aspect_ratio?: GeminiOmniTextToVideoAspectRatio;
|
|
57
|
+
resolution?: GeminiOmniTextToVideoResolution;
|
|
58
|
+
seed?: number;
|
|
59
|
+
}
|
|
60
|
+
interface TaskCreateResponse {
|
|
61
|
+
id: string;
|
|
62
|
+
status?: AsyncTaskStatus;
|
|
63
|
+
}
|
|
64
|
+
interface VideoMetadata {
|
|
65
|
+
url: string;
|
|
66
|
+
}
|
|
67
|
+
interface TextToVideoResponse {
|
|
68
|
+
id: string;
|
|
69
|
+
status: AsyncTaskStatus;
|
|
70
|
+
videos?: VideoMetadata[];
|
|
71
|
+
error?: string;
|
|
72
|
+
[key: string]: unknown;
|
|
73
|
+
}
|
|
74
|
+
type CompletedTextToVideoResponse = TextToVideoResponse & {
|
|
75
|
+
status: 'completed';
|
|
76
|
+
videos: VideoMetadata[];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare class CreateAudio {
|
|
80
|
+
private readonly http;
|
|
81
|
+
constructor(http: HttpClient);
|
|
82
|
+
run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare class CreateCharacter {
|
|
86
|
+
private readonly http;
|
|
87
|
+
constructor(http: HttpClient);
|
|
88
|
+
run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare class TextToVideo {
|
|
92
|
+
private readonly http;
|
|
93
|
+
constructor(http: HttpClient);
|
|
94
|
+
run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse>;
|
|
95
|
+
create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse>;
|
|
96
|
+
get(id: string, options?: RequestOptions): Promise<TextToVideoResponse>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class GeminiOmniClient {
|
|
100
|
+
readonly createAudio: CreateAudio;
|
|
101
|
+
readonly createCharacter: CreateCharacter;
|
|
102
|
+
readonly textToVideo: TextToVideo;
|
|
103
|
+
constructor(options?: ClientOptions);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
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 TaskCreateResponse, type TextToVideoParams, type TextToVideoResponse, type VideoMetadata };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AuthenticationError: () => import_core5.AuthenticationError,
|
|
24
|
+
GeminiOmniClient: () => GeminiOmniClient,
|
|
25
|
+
InsufficientCreditsError: () => import_core5.InsufficientCreditsError,
|
|
26
|
+
NetworkError: () => import_core5.NetworkError,
|
|
27
|
+
NotFoundError: () => import_core5.NotFoundError,
|
|
28
|
+
RateLimitError: () => import_core5.RateLimitError,
|
|
29
|
+
RunApiError: () => import_core5.RunApiError,
|
|
30
|
+
ServiceUnavailableError: () => import_core5.ServiceUnavailableError,
|
|
31
|
+
TimeoutError: () => import_core5.TimeoutError,
|
|
32
|
+
ValidationError: () => import_core5.ValidationError
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(index_exports);
|
|
35
|
+
|
|
36
|
+
// src/client.ts
|
|
37
|
+
var import_core4 = require("@runapi.ai/core");
|
|
38
|
+
|
|
39
|
+
// src/resources/create-audio.ts
|
|
40
|
+
var import_core = require("@runapi.ai/core");
|
|
41
|
+
var ENDPOINT = "/api/v1/gemini_omni/create_audio";
|
|
42
|
+
var CreateAudio = class {
|
|
43
|
+
constructor(http) {
|
|
44
|
+
this.http = http;
|
|
45
|
+
}
|
|
46
|
+
http;
|
|
47
|
+
async run(params, options) {
|
|
48
|
+
return this.http.request("POST", ENDPOINT, {
|
|
49
|
+
body: (0, import_core.compactParams)(params),
|
|
50
|
+
...options
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// src/resources/create-character.ts
|
|
56
|
+
var import_core2 = require("@runapi.ai/core");
|
|
57
|
+
var ENDPOINT2 = "/api/v1/gemini_omni/create_character";
|
|
58
|
+
var CreateCharacter = class {
|
|
59
|
+
constructor(http) {
|
|
60
|
+
this.http = http;
|
|
61
|
+
}
|
|
62
|
+
http;
|
|
63
|
+
async run(params, options) {
|
|
64
|
+
return this.http.request("POST", ENDPOINT2, {
|
|
65
|
+
body: (0, import_core2.compactParams)(params),
|
|
66
|
+
...options
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/resources/text-to-video.ts
|
|
72
|
+
var import_core3 = require("@runapi.ai/core");
|
|
73
|
+
var import_internal = require("@runapi.ai/core/internal");
|
|
74
|
+
var ENDPOINT3 = "/api/v1/gemini_omni/text_to_video";
|
|
75
|
+
var TextToVideo = class {
|
|
76
|
+
constructor(http) {
|
|
77
|
+
this.http = http;
|
|
78
|
+
}
|
|
79
|
+
http;
|
|
80
|
+
async run(params, options) {
|
|
81
|
+
const { id } = await this.create(params, options);
|
|
82
|
+
const response = await (0, import_internal.pollUntilComplete)(() => this.get(id, options), {
|
|
83
|
+
maxWaitMs: options?.maxWaitMs,
|
|
84
|
+
pollIntervalMs: options?.pollIntervalMs
|
|
85
|
+
});
|
|
86
|
+
return response;
|
|
87
|
+
}
|
|
88
|
+
async create(params, options) {
|
|
89
|
+
return this.http.request("POST", ENDPOINT3, {
|
|
90
|
+
body: (0, import_core3.compactParams)(params),
|
|
91
|
+
...options
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async get(id, options) {
|
|
95
|
+
return this.http.request("GET", `${ENDPOINT3}/${id}`, {
|
|
96
|
+
...options
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// src/client.ts
|
|
102
|
+
var GeminiOmniClient = class {
|
|
103
|
+
createAudio;
|
|
104
|
+
createCharacter;
|
|
105
|
+
textToVideo;
|
|
106
|
+
constructor(options = {}) {
|
|
107
|
+
const http = (0, import_core4.createHttpClient)(options);
|
|
108
|
+
this.createAudio = new CreateAudio(http);
|
|
109
|
+
this.createCharacter = new CreateCharacter(http);
|
|
110
|
+
this.textToVideo = new TextToVideo(http);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// src/index.ts
|
|
115
|
+
var import_core5 = require("@runapi.ai/core");
|
|
116
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
117
|
+
0 && (module.exports = {
|
|
118
|
+
AuthenticationError,
|
|
119
|
+
GeminiOmniClient,
|
|
120
|
+
InsufficientCreditsError,
|
|
121
|
+
NetworkError,
|
|
122
|
+
NotFoundError,
|
|
123
|
+
RateLimitError,
|
|
124
|
+
RunApiError,
|
|
125
|
+
ServiceUnavailableError,
|
|
126
|
+
TimeoutError,
|
|
127
|
+
ValidationError
|
|
128
|
+
});
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/create-audio.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 { createHttpClient, 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\nexport class GeminiOmniClient {\n public readonly createAudio: CreateAudio;\n public readonly createCharacter: CreateCharacter;\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.createAudio = new CreateAudio(http);\n this.createCharacter = new CreateCharacter(http);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n}\n","import type { HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\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 async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\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,eAAqD;;;ACCrD,kBAA8B;AAG9B,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAwD;AAC3F,WAAO,KAAK,KAAK,QAA6B,QAAQ,UAAU;AAAA,MAC9D,UAAM,2BAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ACdA,IAAAC,eAA8B;AAG9B,IAAMC,YAAW;AAEV,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA+B,SAA4D;AACnG,WAAO,KAAK,KAAK,QAAiC,QAAQA,WAAU;AAAA,MAClE,UAAM,4BAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ACdA,IAAAC,eAA8B;AAC9B,sBAAkC;AAQlC,IAAMC,YAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,UAAM,mCAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQA,WAAU;AAAA,MAC7D,UAAM,4BAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAGA,SAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AH/BO,IAAM,mBAAN,MAAuB;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,WAAO,+BAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AACvC,SAAK,kBAAkB,IAAI,gBAAgB,IAAI;AAC/C,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;ADdA,IAAAC,eAUO;","names":["import_core","import_core","ENDPOINT","import_core","ENDPOINT","import_core"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// src/client.ts
|
|
2
|
+
import { createHttpClient } from "@runapi.ai/core";
|
|
3
|
+
|
|
4
|
+
// src/resources/create-audio.ts
|
|
5
|
+
import { compactParams } from "@runapi.ai/core";
|
|
6
|
+
var ENDPOINT = "/api/v1/gemini_omni/create_audio";
|
|
7
|
+
var CreateAudio = class {
|
|
8
|
+
constructor(http) {
|
|
9
|
+
this.http = http;
|
|
10
|
+
}
|
|
11
|
+
http;
|
|
12
|
+
async run(params, options) {
|
|
13
|
+
return this.http.request("POST", ENDPOINT, {
|
|
14
|
+
body: compactParams(params),
|
|
15
|
+
...options
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/resources/create-character.ts
|
|
21
|
+
import { compactParams as compactParams2 } from "@runapi.ai/core";
|
|
22
|
+
var ENDPOINT2 = "/api/v1/gemini_omni/create_character";
|
|
23
|
+
var CreateCharacter = class {
|
|
24
|
+
constructor(http) {
|
|
25
|
+
this.http = http;
|
|
26
|
+
}
|
|
27
|
+
http;
|
|
28
|
+
async run(params, options) {
|
|
29
|
+
return this.http.request("POST", ENDPOINT2, {
|
|
30
|
+
body: compactParams2(params),
|
|
31
|
+
...options
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/resources/text-to-video.ts
|
|
37
|
+
import { compactParams as compactParams3 } from "@runapi.ai/core";
|
|
38
|
+
import { pollUntilComplete } from "@runapi.ai/core/internal";
|
|
39
|
+
var ENDPOINT3 = "/api/v1/gemini_omni/text_to_video";
|
|
40
|
+
var TextToVideo = class {
|
|
41
|
+
constructor(http) {
|
|
42
|
+
this.http = http;
|
|
43
|
+
}
|
|
44
|
+
http;
|
|
45
|
+
async run(params, options) {
|
|
46
|
+
const { id } = await this.create(params, options);
|
|
47
|
+
const response = await pollUntilComplete(() => this.get(id, options), {
|
|
48
|
+
maxWaitMs: options?.maxWaitMs,
|
|
49
|
+
pollIntervalMs: options?.pollIntervalMs
|
|
50
|
+
});
|
|
51
|
+
return response;
|
|
52
|
+
}
|
|
53
|
+
async create(params, options) {
|
|
54
|
+
return this.http.request("POST", ENDPOINT3, {
|
|
55
|
+
body: compactParams3(params),
|
|
56
|
+
...options
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async get(id, options) {
|
|
60
|
+
return this.http.request("GET", `${ENDPOINT3}/${id}`, {
|
|
61
|
+
...options
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// src/client.ts
|
|
67
|
+
var GeminiOmniClient = class {
|
|
68
|
+
createAudio;
|
|
69
|
+
createCharacter;
|
|
70
|
+
textToVideo;
|
|
71
|
+
constructor(options = {}) {
|
|
72
|
+
const http = createHttpClient(options);
|
|
73
|
+
this.createAudio = new CreateAudio(http);
|
|
74
|
+
this.createCharacter = new CreateCharacter(http);
|
|
75
|
+
this.textToVideo = new TextToVideo(http);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/index.ts
|
|
80
|
+
import {
|
|
81
|
+
RunApiError,
|
|
82
|
+
AuthenticationError,
|
|
83
|
+
InsufficientCreditsError,
|
|
84
|
+
NotFoundError,
|
|
85
|
+
ValidationError,
|
|
86
|
+
RateLimitError,
|
|
87
|
+
ServiceUnavailableError,
|
|
88
|
+
NetworkError,
|
|
89
|
+
TimeoutError
|
|
90
|
+
} from "@runapi.ai/core";
|
|
91
|
+
export {
|
|
92
|
+
AuthenticationError,
|
|
93
|
+
GeminiOmniClient,
|
|
94
|
+
InsufficientCreditsError,
|
|
95
|
+
NetworkError,
|
|
96
|
+
NotFoundError,
|
|
97
|
+
RateLimitError,
|
|
98
|
+
RunApiError,
|
|
99
|
+
ServiceUnavailableError,
|
|
100
|
+
TimeoutError,
|
|
101
|
+
ValidationError
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/client.ts","../src/resources/create-audio.ts","../src/resources/create-character.ts","../src/resources/text-to-video.ts","../src/index.ts"],"sourcesContent":["import { createHttpClient, 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\nexport class GeminiOmniClient {\n public readonly createAudio: CreateAudio;\n public readonly createCharacter: CreateCharacter;\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.createAudio = new CreateAudio(http);\n this.createCharacter = new CreateCharacter(http);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport type { CreateAudioParams, CreateAudioResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_audio';\n\nexport class CreateAudio {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: CreateAudioParams, options?: RequestOptions): Promise<CreateAudioResponse> {\n return this.http.request<CreateAudioResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n}\n","import type { HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport type { CreateCharacterParams, CreateCharacterResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/create_character';\n\nexport class CreateCharacter {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: CreateCharacterParams, options?: RequestOptions): Promise<CreateCharacterResponse> {\n return this.http.request<CreateCharacterResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TaskCreateResponse,\n TextToVideoParams,\n TextToVideoResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/gemini_omni/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\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 async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\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,wBAA4C;;;ACCrD,SAAS,qBAAqB;AAG9B,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAwD;AAC3F,WAAO,KAAK,KAAK,QAA6B,QAAQ,UAAU;AAAA,MAC9D,MAAM,cAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ACdA,SAAS,iBAAAA,sBAAqB;AAG9B,IAAMC,YAAW;AAEV,IAAM,kBAAN,MAAsB;AAAA,EAC3B,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA+B,SAA4D;AACnG,WAAO,KAAK,KAAK,QAAiC,QAAQA,WAAU;AAAA,MAClE,MAAMD,eAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ACdA,SAAS,iBAAAE,sBAAqB;AAC9B,SAAS,yBAAyB;AAQlC,IAAMC,YAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,MAAM,kBAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQA,WAAU;AAAA,MAC7D,MAAMD,eAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAGC,SAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;AH/BO,IAAM,mBAAN,MAAuB;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO,iBAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AACvC,SAAK,kBAAkB,IAAI,gBAAgB,IAAI;AAC/C,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;AIdA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","ENDPOINT","compactParams","ENDPOINT"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@runapi.ai/gemini-omni",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "RunAPI Gemini Omni SDK for audio, character, and video workflows in JavaScript, Ruby, and Go",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"skills",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18.0.0"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"clean": "rm -rf dist"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@runapi.ai/core": "^0.2.4"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
|
+
"@vitest/coverage-v8": "^1.6.0",
|
|
36
|
+
"tsup": "^8.0.0",
|
|
37
|
+
"typescript": "^5.4.0",
|
|
38
|
+
"vitest": "^1.6.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"runapi",
|
|
45
|
+
"runapi-ai",
|
|
46
|
+
"gemini-omni",
|
|
47
|
+
"gemini",
|
|
48
|
+
"google",
|
|
49
|
+
"audio",
|
|
50
|
+
"character",
|
|
51
|
+
"video",
|
|
52
|
+
"image",
|
|
53
|
+
"api",
|
|
54
|
+
"sdk",
|
|
55
|
+
"typescript",
|
|
56
|
+
"ruby",
|
|
57
|
+
"golang"
|
|
58
|
+
],
|
|
59
|
+
"author": "RunAPI",
|
|
60
|
+
"license": "Apache-2.0",
|
|
61
|
+
"homepage": "https://runapi.ai/models/gemini-omni",
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/runapi-ai/gemini-omni-sdk.git"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/runapi-ai/gemini-omni">
|
|
3
|
+
<h3 align="center">Gemini Omni API Skill for RunAPI</h3>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Install this agent skill, inspect Gemini Omni fields, then create voice, character, and video resources through the RunAPI CLI.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://runapi.ai/models/gemini-omni"><strong>Model Reference</strong></a> · <a href="https://github.com/runapi-ai/cli"><strong>CLI</strong></a> · <a href="https://github.com/runapi-ai/gemini-omni-sdk"><strong>SDK</strong></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+
[](https://www.skills.sh/runapi-ai/gemini-omni/gemini-omni)
|
|
18
|
+
[](https://clawhub.ai/runapi-ai/runapi-gemini-omni)
|
|
19
|
+
[](https://github.com/runapi-ai/gemini-omni/blob/main/LICENSE)
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
<br/>
|
|
23
|
+
|
|
24
|
+
Create Gemini Omni voice resources, character resources, and text-to-video tasks through RunAPI. This skill helps Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents use Gemini Omni through RunAPI.
|
|
25
|
+
|
|
26
|
+
The canonical agent file is `skills/gemini-omni/SKILL.md`.
|
|
27
|
+
|
|
28
|
+
## Variants
|
|
29
|
+
|
|
30
|
+
- Audio: create reusable voice resources with `runapi gemini-omni create-audio`.
|
|
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`.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx skills add runapi-ai/gemini-omni -g
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or paste this prompt to your AI agent:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
Install the gemini-omni skill for me:
|
|
44
|
+
|
|
45
|
+
1. Clone https://github.com/runapi-ai/gemini-omni
|
|
46
|
+
2. Copy the skills/gemini-omni/ directory into your
|
|
47
|
+
user-level skills directory.
|
|
48
|
+
3. Verify that SKILL.md is present.
|
|
49
|
+
4. Confirm the install path when done.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Quick example
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
runapi gemini-omni create-audio --input-file request.json
|
|
56
|
+
runapi gemini-omni create-character --input-file request.json
|
|
57
|
+
runapi gemini-omni text-to-video --async --input-file request.json
|
|
58
|
+
runapi wait <task-id> --service gemini-omni --action text-to-video
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Routing
|
|
62
|
+
|
|
63
|
+
- Model page: https://runapi.ai/models/gemini-omni
|
|
64
|
+
- Product docs: https://runapi.ai/docs#gemini-omni
|
|
65
|
+
- SDK docs: https://runapi.ai/docs#sdk-gemini-omni
|
|
66
|
+
- SDK repository: https://github.com/runapi-ai/gemini-omni-sdk
|
|
67
|
+
- Pricing and rate limits: https://runapi.ai/models/gemini-omni
|
|
68
|
+
- Provider comparison: https://runapi.ai/providers/google
|
|
69
|
+
- Browse all RunAPI models and skills: https://runapi.ai/models
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
Licensed under the Apache License, Version 2.0.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
documentation: https://runapi.ai/models/gemini-omni.md
|
|
5
|
+
provider_page: https://runapi.ai/providers/google.md
|
|
6
|
+
catalog: https://runapi.ai/models.md
|
|
7
|
+
metadata:
|
|
8
|
+
openclaw:
|
|
9
|
+
homepage: https://runapi.ai/models/gemini-omni
|
|
10
|
+
requires:
|
|
11
|
+
bins:
|
|
12
|
+
- runapi
|
|
13
|
+
install:
|
|
14
|
+
- kind: brew
|
|
15
|
+
formula: runapi-ai/tap/runapi
|
|
16
|
+
bins:
|
|
17
|
+
- runapi
|
|
18
|
+
envVars:
|
|
19
|
+
- name: RUNAPI_API_KEY
|
|
20
|
+
required: false
|
|
21
|
+
description: Optional RunAPI API key; agents should prefer environment auth or saved CLI config.
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Gemini Omni On RunAPI
|
|
25
|
+
|
|
26
|
+
Create Gemini Omni voice resources, character resources, and text-to-video tasks through RunAPI. The default path for one-off agent tasks is the `runapi` CLI; SDKs are for application integration.
|
|
27
|
+
|
|
28
|
+
## Routing decision
|
|
29
|
+
|
|
30
|
+
- One-off voice, character, or video generation for the user → use the **CLI path** with the `runapi` binary.
|
|
31
|
+
- Building an app, backend, worker, library, or production codebase → use the **SDK integration path**.
|
|
32
|
+
|
|
33
|
+
## Variants
|
|
34
|
+
|
|
35
|
+
- Audio: create reusable voice resources with `runapi gemini-omni create-audio`.
|
|
36
|
+
- Character: create reusable character resources with `runapi gemini-omni create-character`.
|
|
37
|
+
- Video: create text-to-video tasks with `runapi gemini-omni text-to-video`.
|
|
38
|
+
|
|
39
|
+
## CLI path
|
|
40
|
+
|
|
41
|
+
The `runapi` binary is the runtime dependency. Run `runapi auth status` first. For agents and headless runs, prefer `RUNAPI_API_KEY` or import it into saved config.
|
|
42
|
+
|
|
43
|
+
Inspect the available commands and request fields with CLI help:
|
|
44
|
+
|
|
45
|
+
```shell
|
|
46
|
+
runapi gemini-omni --help
|
|
47
|
+
runapi gemini-omni create-audio --help
|
|
48
|
+
runapi gemini-omni create-character --help
|
|
49
|
+
runapi gemini-omni text-to-video --help
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Run a one-off request:
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
runapi gemini-omni create-audio --input-file request.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For video tasks, submit asynchronously and wait for completion:
|
|
59
|
+
|
|
60
|
+
```shell
|
|
61
|
+
runapi gemini-omni text-to-video --async --input-file request.json
|
|
62
|
+
runapi wait <task-id> --service gemini-omni --action text-to-video
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Available commands: `create-audio`, `create-character`, `text-to-video`.
|
|
66
|
+
|
|
67
|
+
## SDK integration path
|
|
68
|
+
|
|
69
|
+
When integrating Gemini Omni into an app, backend, worker, or library — not for one-off tasks — use a RunAPI SDK package:
|
|
70
|
+
|
|
71
|
+
- JavaScript / TypeScript: `@runapi.ai/gemini-omni`
|
|
72
|
+
- Ruby: `runapi-gemini-omni`
|
|
73
|
+
- Go: `github.com/runapi-ai/gemini-omni-sdk/go`
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
|
|
77
|
+
- Model overview, pricing, and rate limits: https://runapi.ai/models/gemini-omni.md
|
|
78
|
+
- Provider comparison: https://runapi.ai/providers/google.md
|
|
79
|
+
- Full model catalog: https://runapi.ai/models.md
|