Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "fb9e22f7-76b4-4b2f-99a4-d3223a35bdc4",
"id": "88c7735c-a5b9-4bd6-aac7-a4e1dbdd3200",
"tracked_paths": [
{
"editable": true,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "magic-hour",
"version": "0.74.0",
"version": "0.74.1",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export enum Environment {
Environment = "https://api.magichour.ai",
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.78.0",
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.78.1",
}
2 changes: 1 addition & 1 deletion src/resources/v1/ai-clothes-changer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ const res = await client.v1.aiClothesChanger.create({
##### Example

```typescript
{"creditsCharged": 25, "frameCost": 25, "id": "cuid-example"}
{"creditsCharged": 25, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-face-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ const res = await client.v1.aiFaceEditor.create({
##### Example

```typescript
{"creditsCharged": 1, "frameCost": 1, "id": "cuid-example"}
{"creditsCharged": 1, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-gif-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ const res = await client.v1.aiGifGenerator.create({
##### Example

```typescript
{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}
{"creditsCharged": 50, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-headshot-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ const res = await client.v1.aiHeadshotGenerator.create({
##### Example

```typescript
{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}
{"creditsCharged": 50, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-image-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ const res = await client.v1.aiImageEditor.create({
##### Example

```typescript
{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}
{"creditsCharged": 50, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-image-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ const res = await client.v1.aiImageGenerator.create({
##### Example

```typescript
{"creditsCharged": 5, "frameCost": 5, "id": "cuid-example"}
{"creditsCharged": 5, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-image-upscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ const res = await client.v1.aiImageUpscaler.create({
##### Example

```typescript
{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}
{"creditsCharged": 50, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-meme-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ const res = await client.v1.aiMemeGenerator.create({
##### Example

```typescript
{"creditsCharged": 10, "frameCost": 10, "id": "cuid-example"}
{"creditsCharged": 10, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-qr-code-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ const res = await client.v1.aiQrCodeGenerator.create({
##### Example

```typescript
{"creditsCharged": 0, "frameCost": 0, "id": "cuid-example"}
{"creditsCharged": 0, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-talking-photo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ const res = await client.v1.aiTalkingPhoto.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/ai-video-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ const res = await client.v1.aiVideoEditor.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/animation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ const res = await client.v1.animation.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/audio-to-video/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ const res = await client.v1.audioToVideo.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/auto-subtitle-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ const res = await client.v1.autoSubtitleGenerator.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/body-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ const res = await client.v1.bodySwap.create({
##### Example

```typescript
{"creditsCharged": 50, "frameCost": 50, "id": "cuid-example"}
{"creditsCharged": 50, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/character-replace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,5 @@ const res = await client.v1.characterReplace.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/face-swap-photo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ const res = await client.v1.faceSwapPhoto.create({
##### Example

```typescript
{"creditsCharged": 10, "frameCost": 10, "id": "cuid-example"}
{"creditsCharged": 10, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/face-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@ const res = await client.v1.faceSwap.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/head-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ const res = await client.v1.headSwap.create({
##### Example

```typescript
{"creditsCharged": 10, "frameCost": 10, "id": "cuid-example"}
{"creditsCharged": 10, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/image-background-remover/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ const res = await client.v1.imageBackgroundRemover.create({
##### Example

```typescript
{"creditsCharged": 5, "frameCost": 5, "id": "cuid-example"}
{"creditsCharged": 5, "frameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/image-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ const res = await client.v1.imageProjects.get({ id: "cuid-example" });
##### Example

```typescript
{"createdAt": "1970-01-01T00:00:00", "creditsCharged": 5, "downloads": [{"expiresAt": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.png"}], "enabled": true, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "id": "cuid-example", "imageCount": 1, "name": "Example Name", "status": "complete", "totalFrameCost": 5, "type": "AI_IMAGE"}
{"createdAt": "1970-01-01T00:00:00", "creditsCharged": 5, "downloads": [{"expiresAt": "2024-10-19T05:16:19.027Z", "url": "https://videos.magichour.ai/id/output.png"}], "enabled": true, "error": {"code": "no_source_face", "message": "Please use an image with a detectable face"}, "id": "cuid-example", "imageCount": 1, "name": "Example Name", "status": "complete", "totalFrameCost": 123, "type": "AI_IMAGE"}
```
4 changes: 2 additions & 2 deletions src/resources/v1/image-to-video/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ For detailed examples, see the [product page](https://magichour.ai/products/imag
| `endSeconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 | `5.0` |
| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.1`**: Not supported * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported | `true` |
| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` |
| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` |
| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` |
| `name` | ✗ | ✗ | Give your video a custom name for easy identification. | `"My Image To Video video"` |
| `resolution` | ✗ | ✗ | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. | `"720p"` |
| `style` | ✗ | ✗ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` |
Expand Down Expand Up @@ -124,5 +124,5 @@ const res = await client.v1.imageToVideo.create({
##### Example

```typescript
{"creditsCharged": 450, "estimatedFrameCost": 450, "id": "cuid-example"}
{"creditsCharged": 450, "estimatedFrameCost": 123, "id": "cuid-example"}
```
2 changes: 1 addition & 1 deletion src/resources/v1/image-to-video/request-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type CreateRequest = {
/**
* The AI model to use for video generation.
*
* * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.3`.
* * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`.
* * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output.
* * `kling-2.6`: Best for action, motion blur, and controlled camera moves.
* * `kling-3.0`: Best for cinematic stories, references, and optional audio.
Expand Down
Loading
Loading