getaiapi 1.0.0-alpha.4 → 1.0.2
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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
|
|
9
|
-
A unified TypeScript library that wraps 1,
|
|
9
|
+
A unified TypeScript library that wraps 1,890+ AI models across 4 providers into a single `generate()` function. One input shape. One output shape. Any model.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -173,7 +173,7 @@ export REPLICATE_API_TOKEN="your-replicate-token"
|
|
|
173
173
|
# WaveSpeed (66 models)
|
|
174
174
|
export WAVESPEED_API_KEY="your-wavespeed-key"
|
|
175
175
|
|
|
176
|
-
# OpenRouter (
|
|
176
|
+
# OpenRouter (24 LLM models — Claude, GPT, Gemini, Llama, etc.)
|
|
177
177
|
export OPENROUTER_API_KEY="your-openrouter-key"
|
|
178
178
|
```
|
|
179
179
|
|
|
@@ -259,7 +259,7 @@ Models declare their input and output types via `modality`. There are no fixed c
|
|
|
259
259
|
|
|
260
260
|
**Output types:** `image`, `video`, `audio`, `text`, `3d`, `segmentation`
|
|
261
261
|
|
|
262
|
-
Common combinations across 1,
|
|
262
|
+
Common combinations across 1,890+ models:
|
|
263
263
|
|
|
264
264
|
| Inputs | Outputs | Example |
|
|
265
265
|
|---|---|---|
|
|
@@ -280,7 +280,7 @@ Common combinations across 1,940+ models:
|
|
|
280
280
|
| fal-ai | 1,201 | `FAL_KEY` | Native fetch |
|
|
281
281
|
| Replicate | 687 | `REPLICATE_API_TOKEN` | Native fetch |
|
|
282
282
|
| WaveSpeed | 66 | `WAVESPEED_API_KEY` | Native fetch |
|
|
283
|
-
| OpenRouter |
|
|
283
|
+
| OpenRouter | 24 | `OPENROUTER_API_KEY` | Native fetch |
|
|
284
284
|
|
|
285
285
|
Zero external dependencies -- all provider communication uses native `fetch`. Works in Node.js, Vercel Edge, Cloudflare Workers, Deno, Bun, and any ESM runtime -- no `fs` or special bundler config needed.
|
|
286
286
|
|
|
@@ -30542,11 +30542,11 @@ var registry_default = [
|
|
|
30542
30542
|
endpoint: "fal-ai/kling-video/create-voice",
|
|
30543
30543
|
auth_env: "FAL_KEY",
|
|
30544
30544
|
param_map: {
|
|
30545
|
-
|
|
30545
|
+
voice_url: "voice_url"
|
|
30546
30546
|
},
|
|
30547
30547
|
output_map: {
|
|
30548
30548
|
type: "text",
|
|
30549
|
-
extract_path: "
|
|
30549
|
+
extract_path: "voice_id",
|
|
30550
30550
|
content_type: "text/plain"
|
|
30551
30551
|
}
|
|
30552
30552
|
}
|
|
@@ -32468,14 +32468,16 @@ var registry_default = [
|
|
|
32468
32468
|
endpoint: "fal-ai/kling-video/v3/pro/image-to-video",
|
|
32469
32469
|
auth_env: "FAL_KEY",
|
|
32470
32470
|
param_map: {
|
|
32471
|
-
image: "
|
|
32471
|
+
image: "start_image_url",
|
|
32472
32472
|
prompt: "prompt",
|
|
32473
32473
|
negative_prompt: "negative_prompt",
|
|
32474
|
-
|
|
32475
|
-
|
|
32476
|
-
|
|
32477
|
-
|
|
32478
|
-
|
|
32474
|
+
duration: "duration",
|
|
32475
|
+
generate_audio: "generate_audio",
|
|
32476
|
+
end_image_url: "end_image_url",
|
|
32477
|
+
voice_ids: "voice_ids",
|
|
32478
|
+
elements: "elements",
|
|
32479
|
+
aspect_ratio: "aspect_ratio",
|
|
32480
|
+
cfg_scale: "cfg_scale"
|
|
32479
32481
|
},
|
|
32480
32482
|
output_map: {
|
|
32481
32483
|
type: "video",
|
|
@@ -70674,6 +70676,356 @@ var registry_default = [
|
|
|
70674
70676
|
}
|
|
70675
70677
|
}
|
|
70676
70678
|
]
|
|
70679
|
+
},
|
|
70680
|
+
{
|
|
70681
|
+
canonical_name: "gpt-5.4-pro",
|
|
70682
|
+
aliases: [
|
|
70683
|
+
"gpt-5.4-pro",
|
|
70684
|
+
"openai-gpt-5.4-pro"
|
|
70685
|
+
],
|
|
70686
|
+
modality: {
|
|
70687
|
+
inputs: ["text"],
|
|
70688
|
+
outputs: ["text"]
|
|
70689
|
+
},
|
|
70690
|
+
providers: [
|
|
70691
|
+
{
|
|
70692
|
+
provider: "openrouter",
|
|
70693
|
+
skill_id: "openrouter-gpt-5.4-pro",
|
|
70694
|
+
endpoint: "openai/gpt-5.4-pro",
|
|
70695
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70696
|
+
param_map: { prompt: "prompt" },
|
|
70697
|
+
output_map: {
|
|
70698
|
+
type: "text",
|
|
70699
|
+
extract_path: "choices[0].message.content",
|
|
70700
|
+
content_type: "text/plain"
|
|
70701
|
+
}
|
|
70702
|
+
}
|
|
70703
|
+
]
|
|
70704
|
+
},
|
|
70705
|
+
{
|
|
70706
|
+
canonical_name: "gpt-5.4",
|
|
70707
|
+
aliases: [
|
|
70708
|
+
"gpt-5.4",
|
|
70709
|
+
"openai-gpt-5.4"
|
|
70710
|
+
],
|
|
70711
|
+
modality: {
|
|
70712
|
+
inputs: ["text"],
|
|
70713
|
+
outputs: ["text"]
|
|
70714
|
+
},
|
|
70715
|
+
providers: [
|
|
70716
|
+
{
|
|
70717
|
+
provider: "openrouter",
|
|
70718
|
+
skill_id: "openrouter-gpt-5.4",
|
|
70719
|
+
endpoint: "openai/gpt-5.4",
|
|
70720
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70721
|
+
param_map: { prompt: "prompt" },
|
|
70722
|
+
output_map: {
|
|
70723
|
+
type: "text",
|
|
70724
|
+
extract_path: "choices[0].message.content",
|
|
70725
|
+
content_type: "text/plain"
|
|
70726
|
+
}
|
|
70727
|
+
}
|
|
70728
|
+
]
|
|
70729
|
+
},
|
|
70730
|
+
{
|
|
70731
|
+
canonical_name: "gpt-5.4-mini",
|
|
70732
|
+
aliases: [
|
|
70733
|
+
"gpt-5.4-mini",
|
|
70734
|
+
"openai-gpt-5.4-mini"
|
|
70735
|
+
],
|
|
70736
|
+
modality: {
|
|
70737
|
+
inputs: ["text"],
|
|
70738
|
+
outputs: ["text"]
|
|
70739
|
+
},
|
|
70740
|
+
providers: [
|
|
70741
|
+
{
|
|
70742
|
+
provider: "openrouter",
|
|
70743
|
+
skill_id: "openrouter-gpt-5.4-mini",
|
|
70744
|
+
endpoint: "openai/gpt-5.4-mini",
|
|
70745
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70746
|
+
param_map: { prompt: "prompt" },
|
|
70747
|
+
output_map: {
|
|
70748
|
+
type: "text",
|
|
70749
|
+
extract_path: "choices[0].message.content",
|
|
70750
|
+
content_type: "text/plain"
|
|
70751
|
+
}
|
|
70752
|
+
}
|
|
70753
|
+
]
|
|
70754
|
+
},
|
|
70755
|
+
{
|
|
70756
|
+
canonical_name: "gemini-3.1-pro",
|
|
70757
|
+
aliases: [
|
|
70758
|
+
"gemini-3.1-pro",
|
|
70759
|
+
"google-gemini-3.1-pro"
|
|
70760
|
+
],
|
|
70761
|
+
modality: {
|
|
70762
|
+
inputs: ["text"],
|
|
70763
|
+
outputs: ["text"]
|
|
70764
|
+
},
|
|
70765
|
+
providers: [
|
|
70766
|
+
{
|
|
70767
|
+
provider: "openrouter",
|
|
70768
|
+
skill_id: "openrouter-gemini-3.1-pro",
|
|
70769
|
+
endpoint: "google/gemini-3.1-pro-preview",
|
|
70770
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70771
|
+
param_map: { prompt: "prompt" },
|
|
70772
|
+
output_map: {
|
|
70773
|
+
type: "text",
|
|
70774
|
+
extract_path: "choices[0].message.content",
|
|
70775
|
+
content_type: "text/plain"
|
|
70776
|
+
}
|
|
70777
|
+
}
|
|
70778
|
+
]
|
|
70779
|
+
},
|
|
70780
|
+
{
|
|
70781
|
+
canonical_name: "grok-4.20",
|
|
70782
|
+
aliases: [
|
|
70783
|
+
"grok-4.20",
|
|
70784
|
+
"xai-grok-4.20"
|
|
70785
|
+
],
|
|
70786
|
+
modality: {
|
|
70787
|
+
inputs: ["text"],
|
|
70788
|
+
outputs: ["text"]
|
|
70789
|
+
},
|
|
70790
|
+
providers: [
|
|
70791
|
+
{
|
|
70792
|
+
provider: "openrouter",
|
|
70793
|
+
skill_id: "openrouter-grok-4.20",
|
|
70794
|
+
endpoint: "x-ai/grok-4.20-beta",
|
|
70795
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70796
|
+
param_map: { prompt: "prompt" },
|
|
70797
|
+
output_map: {
|
|
70798
|
+
type: "text",
|
|
70799
|
+
extract_path: "choices[0].message.content",
|
|
70800
|
+
content_type: "text/plain"
|
|
70801
|
+
}
|
|
70802
|
+
}
|
|
70803
|
+
]
|
|
70804
|
+
},
|
|
70805
|
+
{
|
|
70806
|
+
canonical_name: "palmyra-x5",
|
|
70807
|
+
aliases: [
|
|
70808
|
+
"palmyra-x5",
|
|
70809
|
+
"writer-palmyra-x5"
|
|
70810
|
+
],
|
|
70811
|
+
modality: {
|
|
70812
|
+
inputs: ["text"],
|
|
70813
|
+
outputs: ["text"]
|
|
70814
|
+
},
|
|
70815
|
+
providers: [
|
|
70816
|
+
{
|
|
70817
|
+
provider: "openrouter",
|
|
70818
|
+
skill_id: "openrouter-palmyra-x5",
|
|
70819
|
+
endpoint: "writer/palmyra-x5",
|
|
70820
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70821
|
+
param_map: { prompt: "prompt" },
|
|
70822
|
+
output_map: {
|
|
70823
|
+
type: "text",
|
|
70824
|
+
extract_path: "choices[0].message.content",
|
|
70825
|
+
content_type: "text/plain"
|
|
70826
|
+
}
|
|
70827
|
+
}
|
|
70828
|
+
]
|
|
70829
|
+
},
|
|
70830
|
+
{
|
|
70831
|
+
canonical_name: "gpt-5.4-nano",
|
|
70832
|
+
aliases: [
|
|
70833
|
+
"gpt-5.4-nano",
|
|
70834
|
+
"openai-gpt-5.4-nano"
|
|
70835
|
+
],
|
|
70836
|
+
modality: {
|
|
70837
|
+
inputs: ["text"],
|
|
70838
|
+
outputs: ["text"]
|
|
70839
|
+
},
|
|
70840
|
+
providers: [
|
|
70841
|
+
{
|
|
70842
|
+
provider: "openrouter",
|
|
70843
|
+
skill_id: "openrouter-gpt-5.4-nano",
|
|
70844
|
+
endpoint: "openai/gpt-5.4-nano",
|
|
70845
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70846
|
+
param_map: { prompt: "prompt" },
|
|
70847
|
+
output_map: {
|
|
70848
|
+
type: "text",
|
|
70849
|
+
extract_path: "choices[0].message.content",
|
|
70850
|
+
content_type: "text/plain"
|
|
70851
|
+
}
|
|
70852
|
+
}
|
|
70853
|
+
]
|
|
70854
|
+
},
|
|
70855
|
+
{
|
|
70856
|
+
canonical_name: "mimo-v2-pro",
|
|
70857
|
+
aliases: [
|
|
70858
|
+
"mimo-v2-pro",
|
|
70859
|
+
"xiaomi-mimo-v2-pro"
|
|
70860
|
+
],
|
|
70861
|
+
modality: {
|
|
70862
|
+
inputs: ["text"],
|
|
70863
|
+
outputs: ["text"]
|
|
70864
|
+
},
|
|
70865
|
+
providers: [
|
|
70866
|
+
{
|
|
70867
|
+
provider: "openrouter",
|
|
70868
|
+
skill_id: "openrouter-mimo-v2-pro",
|
|
70869
|
+
endpoint: "xiaomi/mimo-v2-pro",
|
|
70870
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70871
|
+
param_map: { prompt: "prompt" },
|
|
70872
|
+
output_map: {
|
|
70873
|
+
type: "text",
|
|
70874
|
+
extract_path: "choices[0].message.content",
|
|
70875
|
+
content_type: "text/plain"
|
|
70876
|
+
}
|
|
70877
|
+
}
|
|
70878
|
+
]
|
|
70879
|
+
},
|
|
70880
|
+
{
|
|
70881
|
+
canonical_name: "mimo-v2-omni",
|
|
70882
|
+
aliases: [
|
|
70883
|
+
"mimo-v2-omni",
|
|
70884
|
+
"xiaomi-mimo-v2-omni"
|
|
70885
|
+
],
|
|
70886
|
+
modality: {
|
|
70887
|
+
inputs: ["text"],
|
|
70888
|
+
outputs: ["text"]
|
|
70889
|
+
},
|
|
70890
|
+
providers: [
|
|
70891
|
+
{
|
|
70892
|
+
provider: "openrouter",
|
|
70893
|
+
skill_id: "openrouter-mimo-v2-omni",
|
|
70894
|
+
endpoint: "xiaomi/mimo-v2-omni",
|
|
70895
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70896
|
+
param_map: { prompt: "prompt" },
|
|
70897
|
+
output_map: {
|
|
70898
|
+
type: "text",
|
|
70899
|
+
extract_path: "choices[0].message.content",
|
|
70900
|
+
content_type: "text/plain"
|
|
70901
|
+
}
|
|
70902
|
+
}
|
|
70903
|
+
]
|
|
70904
|
+
},
|
|
70905
|
+
{
|
|
70906
|
+
canonical_name: "mistral-small-4",
|
|
70907
|
+
aliases: [
|
|
70908
|
+
"mistral-small-4",
|
|
70909
|
+
"mistralai-mistral-small-4"
|
|
70910
|
+
],
|
|
70911
|
+
modality: {
|
|
70912
|
+
inputs: ["text"],
|
|
70913
|
+
outputs: ["text"]
|
|
70914
|
+
},
|
|
70915
|
+
providers: [
|
|
70916
|
+
{
|
|
70917
|
+
provider: "openrouter",
|
|
70918
|
+
skill_id: "openrouter-mistral-small-4",
|
|
70919
|
+
endpoint: "mistralai/mistral-small-2603",
|
|
70920
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70921
|
+
param_map: { prompt: "prompt" },
|
|
70922
|
+
output_map: {
|
|
70923
|
+
type: "text",
|
|
70924
|
+
extract_path: "choices[0].message.content",
|
|
70925
|
+
content_type: "text/plain"
|
|
70926
|
+
}
|
|
70927
|
+
}
|
|
70928
|
+
]
|
|
70929
|
+
},
|
|
70930
|
+
{
|
|
70931
|
+
canonical_name: "minimax-m2.7",
|
|
70932
|
+
aliases: [
|
|
70933
|
+
"minimax-m2.7",
|
|
70934
|
+
"minimax-m27"
|
|
70935
|
+
],
|
|
70936
|
+
modality: {
|
|
70937
|
+
inputs: ["text"],
|
|
70938
|
+
outputs: ["text"]
|
|
70939
|
+
},
|
|
70940
|
+
providers: [
|
|
70941
|
+
{
|
|
70942
|
+
provider: "openrouter",
|
|
70943
|
+
skill_id: "openrouter-minimax-m2.7",
|
|
70944
|
+
endpoint: "minimax/minimax-m2.7",
|
|
70945
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70946
|
+
param_map: { prompt: "prompt" },
|
|
70947
|
+
output_map: {
|
|
70948
|
+
type: "text",
|
|
70949
|
+
extract_path: "choices[0].message.content",
|
|
70950
|
+
content_type: "text/plain"
|
|
70951
|
+
}
|
|
70952
|
+
}
|
|
70953
|
+
]
|
|
70954
|
+
},
|
|
70955
|
+
{
|
|
70956
|
+
canonical_name: "nemotron-3-super",
|
|
70957
|
+
aliases: [
|
|
70958
|
+
"nemotron-3-super",
|
|
70959
|
+
"nvidia-nemotron-3-super"
|
|
70960
|
+
],
|
|
70961
|
+
modality: {
|
|
70962
|
+
inputs: ["text"],
|
|
70963
|
+
outputs: ["text"]
|
|
70964
|
+
},
|
|
70965
|
+
providers: [
|
|
70966
|
+
{
|
|
70967
|
+
provider: "openrouter",
|
|
70968
|
+
skill_id: "openrouter-nemotron-3-super",
|
|
70969
|
+
endpoint: "nvidia/nemotron-3-super-120b-a12b",
|
|
70970
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70971
|
+
param_map: { prompt: "prompt" },
|
|
70972
|
+
output_map: {
|
|
70973
|
+
type: "text",
|
|
70974
|
+
extract_path: "choices[0].message.content",
|
|
70975
|
+
content_type: "text/plain"
|
|
70976
|
+
}
|
|
70977
|
+
}
|
|
70978
|
+
]
|
|
70979
|
+
},
|
|
70980
|
+
{
|
|
70981
|
+
canonical_name: "qwen-3.5-72b",
|
|
70982
|
+
aliases: [
|
|
70983
|
+
"qwen-3.5-72b",
|
|
70984
|
+
"qwen-35-72b"
|
|
70985
|
+
],
|
|
70986
|
+
modality: {
|
|
70987
|
+
inputs: ["text"],
|
|
70988
|
+
outputs: ["text"]
|
|
70989
|
+
},
|
|
70990
|
+
providers: [
|
|
70991
|
+
{
|
|
70992
|
+
provider: "openrouter",
|
|
70993
|
+
skill_id: "openrouter-qwen-3.5-72b",
|
|
70994
|
+
endpoint: "qwen/qwen3.5-9b",
|
|
70995
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
70996
|
+
param_map: { prompt: "prompt" },
|
|
70997
|
+
output_map: {
|
|
70998
|
+
type: "text",
|
|
70999
|
+
extract_path: "choices[0].message.content",
|
|
71000
|
+
content_type: "text/plain"
|
|
71001
|
+
}
|
|
71002
|
+
}
|
|
71003
|
+
]
|
|
71004
|
+
},
|
|
71005
|
+
{
|
|
71006
|
+
canonical_name: "glm-5-turbo",
|
|
71007
|
+
aliases: [
|
|
71008
|
+
"glm-5-turbo",
|
|
71009
|
+
"z-ai-glm-5-turbo"
|
|
71010
|
+
],
|
|
71011
|
+
modality: {
|
|
71012
|
+
inputs: ["text"],
|
|
71013
|
+
outputs: ["text"]
|
|
71014
|
+
},
|
|
71015
|
+
providers: [
|
|
71016
|
+
{
|
|
71017
|
+
provider: "openrouter",
|
|
71018
|
+
skill_id: "openrouter-glm-5-turbo",
|
|
71019
|
+
endpoint: "z-ai/glm-5-turbo",
|
|
71020
|
+
auth_env: "OPENROUTER_API_KEY",
|
|
71021
|
+
param_map: { prompt: "prompt" },
|
|
71022
|
+
output_map: {
|
|
71023
|
+
type: "text",
|
|
71024
|
+
extract_path: "choices[0].message.content",
|
|
71025
|
+
content_type: "text/plain"
|
|
71026
|
+
}
|
|
71027
|
+
}
|
|
71028
|
+
]
|
|
70677
71029
|
}
|
|
70678
71030
|
];
|
|
70679
71031
|
|
|
@@ -72141,4 +72493,4 @@ export {
|
|
|
72141
72493
|
listModels,
|
|
72142
72494
|
deriveCategory
|
|
72143
72495
|
};
|
|
72144
|
-
//# sourceMappingURL=chunk-
|
|
72496
|
+
//# sourceMappingURL=chunk-PVXMWUHJ.js.map
|