magic-hour 0.8.1 → 0.8.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.
- package/README.md +35 -40
- package/package.json +16 -2
package/README.md
CHANGED
|
@@ -1,109 +1,104 @@
|
|
|
1
|
+
# Magic Hour Typescript SDK
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/magic-hour)
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# Introduction
|
|
7
|
-
|
|
8
|
-
Magic Hour provides an API (beta) that can be integrated into your own application to generate videos using AI.
|
|
5
|
+
Magic Hour provides an API (beta) that can be integrated into your own application to generate videos and images using AI.
|
|
9
6
|
|
|
10
7
|
Webhook documentation can be found [here](https://magichour.ai/docs/webhook).
|
|
11
8
|
|
|
12
9
|
If you have any questions, please reach out to us via [discord](https://discord.gg/JX5rgsZaJp).
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Every request requires an API key.
|
|
17
|
-
|
|
18
|
-
To get started, first generate your API key [here](https://magichour.ai/settings/developer).
|
|
19
|
-
|
|
20
|
-
Then, add the `Authorization` header to the request.
|
|
21
|
-
|
|
22
|
-
| Key | Value |
|
|
23
|
-
|-|-|
|
|
24
|
-
| Authorization | Bearer mhk_live_apikey |
|
|
11
|
+
## Install
|
|
25
12
|
|
|
26
|
-
|
|
13
|
+
```
|
|
14
|
+
npm install magic-hour
|
|
15
|
+
```
|
|
27
16
|
|
|
17
|
+
## Usage
|
|
28
18
|
|
|
29
|
-
|
|
19
|
+
Initialize the client
|
|
30
20
|
|
|
31
|
-
```
|
|
21
|
+
```ts
|
|
32
22
|
import Client from "magic-hour";
|
|
33
23
|
|
|
34
|
-
|
|
24
|
+
// generate your API Key at https://magichour.ai/developer
|
|
25
|
+
const client = new Client({
|
|
26
|
+
token: "my api key",
|
|
27
|
+
});
|
|
35
28
|
```
|
|
36
29
|
|
|
30
|
+
> **Warning**: any API call that renders a video will utilize frames in your account.
|
|
31
|
+
|
|
37
32
|
## Module Documentation and Snippets
|
|
38
33
|
|
|
39
34
|
### [v1.ai_clothes_changer](src/resources/v1/ai-clothes-changer/README.md)
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
- [create](src/resources/v1/ai-clothes-changer/README.md#create) - AI Clothes Changer
|
|
42
37
|
|
|
43
38
|
### [v1.ai_headshot_generator](src/resources/v1/ai-headshot-generator/README.md)
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
- [create](src/resources/v1/ai-headshot-generator/README.md#create) - AI Headshots
|
|
46
41
|
|
|
47
42
|
### [v1.ai_image_generator](src/resources/v1/ai-image-generator/README.md)
|
|
48
43
|
|
|
49
|
-
|
|
44
|
+
- [create](src/resources/v1/ai-image-generator/README.md#create) - AI Images
|
|
50
45
|
|
|
51
46
|
### [v1.ai_image_upscaler](src/resources/v1/ai-image-upscaler/README.md)
|
|
52
47
|
|
|
53
|
-
|
|
48
|
+
- [create](src/resources/v1/ai-image-upscaler/README.md#create) - AI Image Upscaler
|
|
54
49
|
|
|
55
50
|
### [v1.ai_photo_editor](src/resources/v1/ai-photo-editor/README.md)
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
- [create](src/resources/v1/ai-photo-editor/README.md#create) - AI Photo Editor
|
|
58
53
|
|
|
59
54
|
### [v1.ai_qr_code_generator](src/resources/v1/ai-qr-code-generator/README.md)
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
- [create](src/resources/v1/ai-qr-code-generator/README.md#create) - AI QR Code
|
|
62
57
|
|
|
63
58
|
### [v1.animation](src/resources/v1/animation/README.md)
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
- [create](src/resources/v1/animation/README.md#create) - Animation
|
|
66
61
|
|
|
67
62
|
### [v1.face_swap](src/resources/v1/face-swap/README.md)
|
|
68
63
|
|
|
69
|
-
|
|
64
|
+
- [create](src/resources/v1/face-swap/README.md#create) - Face Swap video
|
|
70
65
|
|
|
71
66
|
### [v1.face_swap_photo](src/resources/v1/face-swap-photo/README.md)
|
|
72
67
|
|
|
73
|
-
|
|
68
|
+
- [create](src/resources/v1/face-swap-photo/README.md#create) - Face Swap Photo
|
|
74
69
|
|
|
75
70
|
### [v1.files.upload_urls](src/resources/v1/files/upload-urls/README.md)
|
|
76
71
|
|
|
77
|
-
|
|
72
|
+
- [create](src/resources/v1/files/upload-urls/README.md#create) - Generate asset upload urls
|
|
78
73
|
|
|
79
74
|
### [v1.image_background_remover](src/resources/v1/image-background-remover/README.md)
|
|
80
75
|
|
|
81
|
-
|
|
76
|
+
- [create](src/resources/v1/image-background-remover/README.md#create) - Image Background Remover
|
|
82
77
|
|
|
83
78
|
### [v1.image_projects](src/resources/v1/image-projects/README.md)
|
|
84
79
|
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
- [delete](src/resources/v1/image-projects/README.md#delete) - Delete image
|
|
81
|
+
- [get](src/resources/v1/image-projects/README.md#get) - Get image details
|
|
87
82
|
|
|
88
83
|
### [v1.image_to_video](src/resources/v1/image-to-video/README.md)
|
|
89
84
|
|
|
90
|
-
|
|
85
|
+
- [create](src/resources/v1/image-to-video/README.md#create) - Image-to-Video
|
|
91
86
|
|
|
92
87
|
### [v1.lip_sync](src/resources/v1/lip-sync/README.md)
|
|
93
88
|
|
|
94
|
-
|
|
89
|
+
- [create](src/resources/v1/lip-sync/README.md#create) - Lip Sync
|
|
95
90
|
|
|
96
91
|
### [v1.text_to_video](src/resources/v1/text-to-video/README.md)
|
|
97
92
|
|
|
98
|
-
|
|
93
|
+
- [create](src/resources/v1/text-to-video/README.md#create) - Text-to-Video
|
|
99
94
|
|
|
100
95
|
### [v1.video_projects](src/resources/v1/video-projects/README.md)
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
- [delete](src/resources/v1/video-projects/README.md#delete) - Delete video
|
|
98
|
+
- [get](src/resources/v1/video-projects/README.md#get) - Get video details
|
|
104
99
|
|
|
105
100
|
### [v1.video_to_video](src/resources/v1/video-to-video/README.md)
|
|
106
101
|
|
|
107
|
-
|
|
102
|
+
- [create](src/resources/v1/video-to-video/README.md#create) - Video-to-Video
|
|
108
103
|
|
|
109
104
|
<!-- MODULE DOCS END -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magic-hour",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "Node SDK for Magic Hour API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"magic hour",
|
|
7
|
+
"AI video",
|
|
8
|
+
"AI image",
|
|
9
|
+
"api"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/magichourhq/magic-hour-node",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git://github.com/magichourhq/magic-hour-node.git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": "https://github.com/magichourhq/magic-hour-node/issues",
|
|
17
|
+
"license": "MIT",
|
|
4
18
|
"main": "./dist/index.js",
|
|
5
19
|
"types": "./dist/index.d.ts",
|
|
6
20
|
"exports": {
|
|
@@ -46,4 +60,4 @@
|
|
|
46
60
|
"tsc-alias": "^1.8.10",
|
|
47
61
|
"typescript": "^5.2.0"
|
|
48
62
|
}
|
|
49
|
-
}
|
|
63
|
+
}
|