getaiapi 0.3.1 → 0.3.3

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.
Files changed (2) hide show
  1. package/README.md +31 -12
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
8
8
 
9
- A unified TypeScript library that wraps 1,929 AI models across 3 providers into a single `generate()` function. One input shape. One output shape. Any model.
9
+ A unified TypeScript library that wraps 1,930 AI models across 3 providers into a single `generate()` function. One input shape. One output shape. Any model.
10
10
 
11
11
  ## Install
12
12
 
@@ -48,6 +48,20 @@ const edited = await generate({
48
48
  })
49
49
  ```
50
50
 
51
+ **Multi-image references** (e.g., character + location consistency)
52
+
53
+ ```typescript
54
+ const scene = await generate({
55
+ model: 'google-nano-banana-pro-edit',
56
+ prompt: 'cinematic shot of the character in the location',
57
+ image: 'https://example.com/character.jpg',
58
+ images: [
59
+ 'https://example.com/character.jpg',
60
+ 'https://example.com/location.jpg',
61
+ ],
62
+ })
63
+ ```
64
+
51
65
  **Text-to-speech**
52
66
 
53
67
  ```typescript
@@ -83,13 +97,13 @@ const cutout = await generate({
83
97
  Set API keys as environment variables. You only need keys for the providers you plan to call.
84
98
 
85
99
  ```bash
86
- # fal-ai (1,199 models)
100
+ # fal-ai (1,201 models)
87
101
  export FAL_KEY="your-fal-key"
88
102
 
89
103
  # Replicate (687 models)
90
104
  export REPLICATE_API_TOKEN="your-replicate-token"
91
105
 
92
- # WaveSpeed (43 models)
106
+ # WaveSpeed (66 models)
93
107
  export WAVESPEED_API_KEY="your-wavespeed-key"
94
108
  ```
95
109
 
@@ -167,12 +181,12 @@ const model = getModel('flux-schnell')
167
181
 
168
182
  | Category | Input | Output | Models |
169
183
  |---|---|---|---|
170
- | `text-to-image` | text | image | 828 |
171
- | `text-to-video` | text | video | 308 |
172
- | `image-edit` | image + text | image | 213 |
173
- | `image-to-video` | image + text | video | 178 |
174
- | `text-to-audio` | text | audio | 76 |
175
- | `upscale-image` | image | image | 59 |
184
+ | `text-to-image` | text | image | 820 |
185
+ | `text-to-video` | text | video | 318 |
186
+ | `image-edit` | image + text | image | 210 |
187
+ | `image-to-video` | image + text | video | 155 |
188
+ | `text-to-audio` | text | audio | 82 |
189
+ | `upscale-image` | image | image | 57 |
176
190
  | `training` | images | model | 50 |
177
191
  | `image-to-image` | image + text | image | 43 |
178
192
  | `segmentation` | image/video | segmentation | 34 |
@@ -180,17 +194,21 @@ const model = getModel('flux-schnell')
180
194
  | `audio-to-text` | audio | text | 25 |
181
195
  | `remove-background` | image/video | image/video | 24 |
182
196
  | `text-to-3d` | text | 3d | 19 |
183
- | `video-to-audio` | video | audio | 18 |
197
+ | `video-to-audio` | video | audio | 17 |
184
198
  | `upscale-video` | video | video | 15 |
199
+ | `video-to-video` | video | video | 15 |
185
200
  | `moderation` | text/image/video | text | 8 |
201
+ | `audio-to-video` | audio | video | 4 |
202
+ | `audio-edit` | audio | audio | 2 |
203
+ | `voice-clone` | audio | text | 1 |
186
204
 
187
205
  ## Providers
188
206
 
189
207
  | Provider | Models | Auth Env Var | Protocol |
190
208
  |---|---|---|---|
191
- | fal-ai | 1,199 | `FAL_KEY` | Native fetch |
209
+ | fal-ai | 1,201 | `FAL_KEY` | Native fetch |
192
210
  | Replicate | 687 | `REPLICATE_API_TOKEN` | Native fetch |
193
- | WaveSpeed | 43 | `WAVESPEED_API_KEY` | Native fetch |
211
+ | WaveSpeed | 66 | `WAVESPEED_API_KEY` | Native fetch |
194
212
 
195
213
  Zero external dependencies -- all provider communication uses native `fetch`.
196
214
 
@@ -207,6 +225,7 @@ interface GenerateRequest {
207
225
  model: string // required - model name
208
226
  prompt?: string // text prompt
209
227
  image?: string | File // input image (URL or File)
228
+ images?: (string | File)[] // multiple reference images
210
229
  audio?: string | File // input audio
211
230
  video?: string | File // input video
212
231
  negative_prompt?: string // what to avoid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getaiapi",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "description": "Unified AI API Gateway - one function to call any AI model",
6
6
  "main": "./dist/index.js",
@@ -51,6 +51,7 @@
51
51
  "generate-registry": "tsx scripts/generate-registry.ts"
52
52
  },
53
53
  "devDependencies": {
54
+ "@fal-ai/client": "^1.9.4",
54
55
  "@vitest/coverage-v8": "^3.2.4",
55
56
  "tsup": "^8.4.0",
56
57
  "tsx": "^4.19.0",