genmagic 0.1.0 → 0.1.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 +14 -1
- package/package.json +59 -9
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GenMagic for JavaScript and the command line
|
|
2
2
|
|
|
3
|
-
One API key and one pay-as-you-go balance for
|
|
3
|
+
One API key and one pay-as-you-go balance for 450+ AI models: images, video with sound, speech, music and text. Veo 3.1, Seedance 2.5, Wan 3.0, Hailuo 3, Runway, Nano Banana, GPT Image, FLUX, Seedream and more, each with its price shown before you run it.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install genmagic
|
|
@@ -36,6 +36,19 @@ const clip = await gm.video("Waves at sunset, slow drone shot", {
|
|
|
36
36
|
console.log(clip.url);
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
## Moving off OpenAI's Sora 2 API
|
|
40
|
+
|
|
41
|
+
OpenAI shut down the Sora 2 Videos API on September 24, 2026. GenMagic answers the same calls, so code built on the
|
|
42
|
+
OpenAI SDK keeps working with a new base URL and key, and even `model: "sora-2"` runs (on Veo 3.1 Fast):
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import OpenAI from "openai";
|
|
46
|
+
const client = new OpenAI({ baseURL: "https://genmagic.co/api/v1", apiKey: process.env.GENMAGIC_API_KEY });
|
|
47
|
+
const video = await client.videos.createAndPoll({ model: "sora-2", prompt: "A paper boat at dusk", seconds: "8", size: "1280x720" });
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Details and prices: https://genmagic.co/sora-2-api-alternative?utm_source=npm&utm_medium=readme
|
|
51
|
+
|
|
39
52
|
## Speech, music, text
|
|
40
53
|
|
|
41
54
|
```js
|
package/package.json
CHANGED
|
@@ -1,18 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genmagic",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Official GenMagic client and CLI: one API key and one pay-as-you-go balance for
|
|
5
|
-
"keywords": [
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Official GenMagic client and CLI: one API key and one pay-as-you-go balance for 450+ AI models. Generate images, video with sound, speech, music and text with Veo 3.1, Seedance 2.5, Wan 3.0, Nano Banana, GPT Image, FLUX and more.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"genmagic",
|
|
8
|
+
"image-generation",
|
|
9
|
+
"video-generation",
|
|
10
|
+
"text-to-image",
|
|
11
|
+
"text-to-video",
|
|
12
|
+
"image-to-video",
|
|
13
|
+
"text-to-speech",
|
|
14
|
+
"tts",
|
|
15
|
+
"music-generation",
|
|
16
|
+
"ai-video",
|
|
17
|
+
"ai-image",
|
|
18
|
+
"veo",
|
|
19
|
+
"veo-3",
|
|
20
|
+
"seedance",
|
|
21
|
+
"wan",
|
|
22
|
+
"wan-3",
|
|
23
|
+
"hailuo",
|
|
24
|
+
"runway",
|
|
25
|
+
"flux",
|
|
26
|
+
"nano-banana",
|
|
27
|
+
"gpt-image",
|
|
28
|
+
"seedream",
|
|
29
|
+
"openai-compatible",
|
|
30
|
+
"generative-ai",
|
|
31
|
+
"api-client",
|
|
32
|
+
"cli",
|
|
33
|
+
"sora",
|
|
34
|
+
"sora-2",
|
|
35
|
+
"sora-alternative",
|
|
36
|
+
"openai-videos-api"
|
|
37
|
+
],
|
|
6
38
|
"homepage": "https://genmagic.co/developers?utm_source=npm&utm_medium=package",
|
|
7
|
-
"bugs": {
|
|
39
|
+
"bugs": {
|
|
40
|
+
"email": "hello@genmagic.co"
|
|
41
|
+
},
|
|
8
42
|
"author": "GenMagic <hello@genmagic.co> (https://genmagic.co)",
|
|
9
43
|
"license": "MIT",
|
|
10
44
|
"type": "module",
|
|
11
45
|
"main": "./src/index.js",
|
|
12
46
|
"types": "./src/index.d.ts",
|
|
13
|
-
"exports": {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
47
|
+
"exports": {
|
|
48
|
+
".": {
|
|
49
|
+
"types": "./src/index.d.ts",
|
|
50
|
+
"default": "./src/index.js"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"bin": {
|
|
54
|
+
"genmagic": "bin/genmagic.js"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"src",
|
|
58
|
+
"bin",
|
|
59
|
+
"README.md",
|
|
60
|
+
"LICENSE"
|
|
61
|
+
],
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=18"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"test": "node --test test/index.test.js"
|
|
67
|
+
}
|
|
18
68
|
}
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* through it apart from a key owner's other API use.
|
|
5
5
|
* API reference: https://genmagic.co/openapi.json
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = "0.1.
|
|
7
|
+
export const VERSION = "0.1.1";
|
|
8
8
|
const DEFAULT_BASE_URL = "https://genmagic.co";
|
|
9
9
|
const KEY_HELP = "Create a free key at https://genmagic.co/get-api-key?utm_source=npm&utm_medium=package and set GENMAGIC_API_KEY.";
|
|
10
10
|
|