@j-o-r/hello-dave 0.0.10 → 0.1.1
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 +2 -0
- package/README.md.bak.1779452127 +240 -0
- package/TODO.md +30 -8
- package/agents/code_agent.js +6 -6
- package/agents/daisy_agent.js +10 -7
- package/agents/minimax.js +173 -0
- package/agents/stability.js +173 -0
- package/bin/codeDave +1 -1
- package/bin/dave.js +1 -1
- package/docs/music-toolsets.md +137 -0
- package/docs/plans/minimax-music-generation.md +80 -0
- package/docs/plans/unified-agent-architecture.md +146 -0
- package/docs/plans/websocket-streaming-plan.md.bak +317 -0
- package/docs/prompt/task_clarification_and_documentation.md +35 -0
- package/lib/API/minimax/ImageToolset.js +169 -0
- package/lib/API/minimax/MusicToolset.js +290 -0
- package/lib/API/minimax/VideoToolset.js +296 -0
- package/lib/API/minimax/image.generation.md +239 -0
- package/lib/API/minimax/image.js +219 -0
- package/lib/API/minimax/image.to.image.md +257 -0
- package/lib/API/minimax/index.js +16 -0
- package/lib/API/minimax/music.cover.preprocess.md +206 -0
- package/lib/API/minimax/music.generation.md +346 -0
- package/lib/API/minimax/music.js +257 -0
- package/lib/API/minimax/music.lyrics.generation.md +205 -0
- package/lib/API/minimax/video.download.md +133 -0
- package/lib/API/minimax/video.first.last.image.md +186 -0
- package/lib/API/minimax/video.from.image.md +206 -0
- package/lib/API/minimax/video.from.subject.md +164 -0
- package/lib/API/minimax/video.generation.md +192 -0
- package/lib/API/minimax/video.js +339 -0
- package/lib/API/minimax/video.query.md +128 -0
- package/lib/API/stability.ai/ImageToolset.js +357 -0
- package/lib/API/stability.ai/MusicToolset.js +302 -0
- package/lib/API/stability.ai/audio-3.md +205 -0
- package/lib/API/stability.ai/audio.js +679 -0
- package/lib/API/stability.ai/image.js +911 -0
- package/lib/API/stability.ai/image.md +271 -0
- package/lib/API/stability.ai/index.js +11 -0
- package/lib/API/stability.ai/openapi.json +17118 -0
- package/lib/API/x.ai/ImageToolset.js +165 -0
- package/lib/API/x.ai/image.editing.md +86 -0
- package/lib/API/x.ai/image.js +393 -0
- package/lib/API/x.ai/image.md +213 -0
- package/lib/API/x.ai/image.to.generation.md +494 -0
- package/lib/API/x.ai/image.to.video.md +23 -0
- package/lib/API/x.ai/index.js +7 -0
- package/lib/AgentManager.js +1 -1
- package/lib/CdnToolset.js +191 -0
- package/lib/ToolSet.js +19 -1
- package/lib/cdn.js +373 -0
- package/lib/fafs.js +3 -1
- package/lib/genericToolset.js +43 -166
- package/lib/index.js +9 -1
- package/package.json +2 -2
- package/types/API/minimax/ImageToolset.d.ts +3 -0
- package/types/API/minimax/MusicToolset.d.ts +3 -0
- package/types/API/minimax/VideoToolset.d.ts +3 -0
- package/types/API/minimax/image.d.ts +109 -0
- package/types/API/minimax/index.d.ts +15 -0
- package/types/API/minimax/music.d.ts +46 -0
- package/types/API/minimax/video.d.ts +165 -0
- package/types/API/stability.ai/ImageToolset.d.ts +3 -0
- package/types/API/stability.ai/MusicToolset.d.ts +3 -0
- package/types/API/stability.ai/audio.d.ts +193 -0
- package/types/API/stability.ai/image.d.ts +274 -0
- package/types/API/stability.ai/index.d.ts +11 -0
- package/types/API/x.ai/ImageToolset.d.ts +3 -0
- package/types/API/x.ai/image.d.ts +82 -0
- package/types/API/x.ai/index.d.ts +7 -0
- package/types/AgentManager.d.ts +1 -1
- package/types/CdnToolset.d.ts +20 -0
- package/types/ToolSet.d.ts +8 -0
- package/types/cdn.d.ts +141 -0
- package/types/index.d.ts +9 -2
- package/docs/multi-agent-clusters.md.bak +0 -229
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
> ## Documentation Index
|
|
2
|
+
> Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
|
|
3
|
+
> Use this file to discover all available pages before exploring further.
|
|
4
|
+
|
|
5
|
+
# Lyrics Generation
|
|
6
|
+
|
|
7
|
+
> Use this API to generate lyrics, supporting full song creation and lyrics editing/continuation.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## OpenAPI
|
|
12
|
+
|
|
13
|
+
````yaml POST /v1/lyrics_generation
|
|
14
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: MiniMax Lyrics Generation API
|
|
17
|
+
description: >-
|
|
18
|
+
MiniMax Lyrics Generation API with support for full song creation and lyrics
|
|
19
|
+
editing/continuation
|
|
20
|
+
license:
|
|
21
|
+
name: MIT
|
|
22
|
+
version: 1.0.0
|
|
23
|
+
servers:
|
|
24
|
+
- url: https://api.minimax.io
|
|
25
|
+
security:
|
|
26
|
+
- bearerAuth: []
|
|
27
|
+
paths:
|
|
28
|
+
/v1/lyrics_generation:
|
|
29
|
+
post:
|
|
30
|
+
tags:
|
|
31
|
+
- Music
|
|
32
|
+
summary: Lyrics Generation
|
|
33
|
+
operationId: generateLyrics
|
|
34
|
+
parameters:
|
|
35
|
+
- name: Content-Type
|
|
36
|
+
in: header
|
|
37
|
+
required: true
|
|
38
|
+
description: >-
|
|
39
|
+
The media type of the request body. Must be set to
|
|
40
|
+
`application/json` to ensure the data is sent in JSON format.
|
|
41
|
+
schema:
|
|
42
|
+
type: string
|
|
43
|
+
enum:
|
|
44
|
+
- application/json
|
|
45
|
+
default: application/json
|
|
46
|
+
requestBody:
|
|
47
|
+
content:
|
|
48
|
+
application/json:
|
|
49
|
+
schema:
|
|
50
|
+
$ref: '#/components/schemas/GenerateLyricsReq'
|
|
51
|
+
required: true
|
|
52
|
+
responses:
|
|
53
|
+
'200':
|
|
54
|
+
description: Successful response
|
|
55
|
+
content:
|
|
56
|
+
application/json:
|
|
57
|
+
schema:
|
|
58
|
+
$ref: '#/components/schemas/GenerateLyricsResp'
|
|
59
|
+
components:
|
|
60
|
+
schemas:
|
|
61
|
+
GenerateLyricsReq:
|
|
62
|
+
type: object
|
|
63
|
+
required:
|
|
64
|
+
- mode
|
|
65
|
+
properties:
|
|
66
|
+
mode:
|
|
67
|
+
type: string
|
|
68
|
+
description: >-
|
|
69
|
+
Generation mode.<br>`write_full_song`: Write a complete
|
|
70
|
+
song<br>`edit`: Edit/continue existing lyrics
|
|
71
|
+
enum:
|
|
72
|
+
- write_full_song
|
|
73
|
+
- edit
|
|
74
|
+
prompt:
|
|
75
|
+
type: string
|
|
76
|
+
description: >-
|
|
77
|
+
Prompt/instruction describing the song theme, style, or editing
|
|
78
|
+
direction. If empty, a random song will be generated.
|
|
79
|
+
maxLength: 2000
|
|
80
|
+
lyrics:
|
|
81
|
+
type: string
|
|
82
|
+
description: >-
|
|
83
|
+
Existing lyrics content. Only effective in `edit` mode. Can be used
|
|
84
|
+
for continuation or modification of existing lyrics.
|
|
85
|
+
maxLength: 3500
|
|
86
|
+
title:
|
|
87
|
+
type: string
|
|
88
|
+
description: Song title. If provided, the output will keep this title unchanged.
|
|
89
|
+
example:
|
|
90
|
+
mode: write_full_song
|
|
91
|
+
prompt: A cheerful love song about a summer day at the beach
|
|
92
|
+
GenerateLyricsResp:
|
|
93
|
+
type: object
|
|
94
|
+
properties:
|
|
95
|
+
song_title:
|
|
96
|
+
type: string
|
|
97
|
+
description: >-
|
|
98
|
+
Generated song title. If `title` was provided in the request, it
|
|
99
|
+
will be preserved.
|
|
100
|
+
style_tags:
|
|
101
|
+
type: string
|
|
102
|
+
description: >-
|
|
103
|
+
Style tags, comma-separated. For example: `Pop, Upbeat, Female
|
|
104
|
+
Vocals`
|
|
105
|
+
lyrics:
|
|
106
|
+
type: string
|
|
107
|
+
description: >-
|
|
108
|
+
Generated lyrics with structure tags. Can be directly used in the
|
|
109
|
+
`lyrics` parameter of the [Music Generation
|
|
110
|
+
API](/api-reference/music-generation) to generate
|
|
111
|
+
songs.<br>Supported structure tags (14 types): `[Intro]`, `[Verse]`,
|
|
112
|
+
`[Pre-Chorus]`, `[Chorus]`, `[Hook]`, `[Drop]`, `[Bridge]`,
|
|
113
|
+
`[Solo]`, `[Build-up]`, `[Instrumental]`, `[Breakdown]`, `[Break]`,
|
|
114
|
+
`[Interlude]`, `[Outro]`
|
|
115
|
+
base_resp:
|
|
116
|
+
$ref: '#/components/schemas/BaseResp'
|
|
117
|
+
example:
|
|
118
|
+
song_title: Summer Breeze Promise
|
|
119
|
+
style_tags: Pop, Summer Vibe, Romance, Lighthearted, Beach Pop
|
|
120
|
+
lyrics: |-
|
|
121
|
+
[Intro]
|
|
122
|
+
(Ooh-ooh-ooh)
|
|
123
|
+
(Yeah)
|
|
124
|
+
Sunlight dancing on the waves
|
|
125
|
+
|
|
126
|
+
[Verse 1]
|
|
127
|
+
Sea breeze gently through your hair
|
|
128
|
+
Smiling face, like a summer dream
|
|
129
|
+
Waves are crashing at our feet
|
|
130
|
+
Leaving footprints, you and me
|
|
131
|
+
Laughter echoes on the sand
|
|
132
|
+
Every moment, a sweet melody
|
|
133
|
+
I see the sparkle in your eyes
|
|
134
|
+
Like the stars in the deep blue sea
|
|
135
|
+
|
|
136
|
+
[Pre-Chorus]
|
|
137
|
+
You say this feeling is so wonderful
|
|
138
|
+
(So wonderful)
|
|
139
|
+
Want to stay in this moment forever
|
|
140
|
+
(Right here, right now)
|
|
141
|
+
Heartbeat racing like the ocean waves
|
|
142
|
+
|
|
143
|
+
[Chorus]
|
|
144
|
+
Oh, summer by the sea, our promise true
|
|
145
|
+
In the sunlight, your silhouette so beautiful
|
|
146
|
+
The breeze blows away our worries, leaving only sweet
|
|
147
|
+
This moment, I just want to be with you, eternally
|
|
148
|
+
(Forever with you)
|
|
149
|
+
|
|
150
|
+
[Verse 2]
|
|
151
|
+
...
|
|
152
|
+
base_resp:
|
|
153
|
+
status_code: 0
|
|
154
|
+
status_msg: success
|
|
155
|
+
BaseResp:
|
|
156
|
+
type: object
|
|
157
|
+
description: Status code and details
|
|
158
|
+
properties:
|
|
159
|
+
status_code:
|
|
160
|
+
type: integer
|
|
161
|
+
description: >-
|
|
162
|
+
Status codes and their meanings:
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
`0`: Success
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
`1002`: Rate limit triggered, retry later
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
`1004`: Authentication failed, check API key
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
`1008`: Insufficient balance
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
`1026`: Input contains sensitive content
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
`2013`: Invalid parameters, check input
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
`2049`: Invalid API key
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
For more information, please refer to the [Error Code
|
|
187
|
+
Reference](/api-reference/errorcode).
|
|
188
|
+
status_msg:
|
|
189
|
+
type: string
|
|
190
|
+
description: Detailed error message
|
|
191
|
+
securitySchemes:
|
|
192
|
+
bearerAuth:
|
|
193
|
+
type: http
|
|
194
|
+
scheme: bearer
|
|
195
|
+
bearerFormat: JWT
|
|
196
|
+
description: >-
|
|
197
|
+
`HTTP: Bearer Auth`
|
|
198
|
+
|
|
199
|
+
- Security Scheme Type: http
|
|
200
|
+
|
|
201
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
202
|
+
Management>API
|
|
203
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
204
|
+
|
|
205
|
+
````
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
> ## Documentation Index
|
|
3
|
+
> Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
|
|
4
|
+
> Use this file to discover all available pages before exploring further.
|
|
5
|
+
|
|
6
|
+
# Video Download
|
|
7
|
+
|
|
8
|
+
> Use this API to download generated videos.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## OpenAPI
|
|
13
|
+
|
|
14
|
+
````yaml /api-reference/video/generation/api/openapi.json GET /v1/files/retrieve
|
|
15
|
+
openapi: 3.1.0
|
|
16
|
+
info:
|
|
17
|
+
title: MiniMax API
|
|
18
|
+
description: MiniMax video generation and file management API
|
|
19
|
+
license:
|
|
20
|
+
name: MIT
|
|
21
|
+
version: 1.0.0
|
|
22
|
+
servers:
|
|
23
|
+
- url: https://api.minimax.io
|
|
24
|
+
security:
|
|
25
|
+
- bearerAuth: []
|
|
26
|
+
paths:
|
|
27
|
+
/v1/files/retrieve:
|
|
28
|
+
get:
|
|
29
|
+
tags:
|
|
30
|
+
- Files
|
|
31
|
+
summary: Retrieve File
|
|
32
|
+
operationId: retrieveFile
|
|
33
|
+
parameters:
|
|
34
|
+
- name: file_id
|
|
35
|
+
in: query
|
|
36
|
+
required: true
|
|
37
|
+
description: >-
|
|
38
|
+
The unique identifier for the file.
|
|
39
|
+
|
|
40
|
+
Supports `file_id` obtained from video generation and asynchronous
|
|
41
|
+
speech synthesis tasks.
|
|
42
|
+
schema:
|
|
43
|
+
type: integer
|
|
44
|
+
format: int64
|
|
45
|
+
responses:
|
|
46
|
+
'200':
|
|
47
|
+
description: ''
|
|
48
|
+
content:
|
|
49
|
+
application/json:
|
|
50
|
+
schema:
|
|
51
|
+
$ref: '#/components/schemas/RetrieveFileResp'
|
|
52
|
+
components:
|
|
53
|
+
schemas:
|
|
54
|
+
RetrieveFileResp:
|
|
55
|
+
type: object
|
|
56
|
+
properties:
|
|
57
|
+
file:
|
|
58
|
+
$ref: '#/components/schemas/FileObject'
|
|
59
|
+
base_resp:
|
|
60
|
+
$ref: '#/components/schemas/RetrieveFileBaseResp'
|
|
61
|
+
example:
|
|
62
|
+
file:
|
|
63
|
+
file_id: ${file_id}
|
|
64
|
+
bytes: 0
|
|
65
|
+
created_at: 1700469398
|
|
66
|
+
filename: output_aigc.mp4
|
|
67
|
+
purpose: video_generation
|
|
68
|
+
download_url: www.downloadurl.com
|
|
69
|
+
base_resp:
|
|
70
|
+
status_code: 0
|
|
71
|
+
status_msg: success
|
|
72
|
+
FileObject:
|
|
73
|
+
type: object
|
|
74
|
+
properties:
|
|
75
|
+
file_id:
|
|
76
|
+
type: integer
|
|
77
|
+
format: int64
|
|
78
|
+
description: The unique identifier for the file.
|
|
79
|
+
bytes:
|
|
80
|
+
type: integer
|
|
81
|
+
format: int64
|
|
82
|
+
description: The size of the file in bytes.
|
|
83
|
+
created_at:
|
|
84
|
+
type: integer
|
|
85
|
+
format: int64
|
|
86
|
+
description: The Unix timestamp (in seconds) when the file was created.
|
|
87
|
+
filename:
|
|
88
|
+
type: string
|
|
89
|
+
description: The name of the file.
|
|
90
|
+
purpose:
|
|
91
|
+
type: string
|
|
92
|
+
description: The purpose of the file.
|
|
93
|
+
download_url:
|
|
94
|
+
type: string
|
|
95
|
+
format: url
|
|
96
|
+
description: The URL address for downloading the file, valid for 1 hour.
|
|
97
|
+
RetrieveFileBaseResp:
|
|
98
|
+
type: object
|
|
99
|
+
properties:
|
|
100
|
+
status_code:
|
|
101
|
+
type: integer
|
|
102
|
+
description: |-
|
|
103
|
+
The status codes are as follows:
|
|
104
|
+
- 1000, Unknown error;
|
|
105
|
+
- 1001, Timeout;
|
|
106
|
+
- 1002, RPM limit triggered;
|
|
107
|
+
- 1004, Authentication failed;
|
|
108
|
+
- 1008, Insufficient balance;
|
|
109
|
+
- 1013, Internal service error;
|
|
110
|
+
- 1026, Input content error;
|
|
111
|
+
- 1027, Output content error;
|
|
112
|
+
- 1039, TPM limit triggered;
|
|
113
|
+
- 2013, Abnormal input format.
|
|
114
|
+
|
|
115
|
+
For more information, please refer to the [Error Code Reference](/api-reference/errorcode).
|
|
116
|
+
status_msg:
|
|
117
|
+
type: string
|
|
118
|
+
description: Status details.
|
|
119
|
+
securitySchemes:
|
|
120
|
+
bearerAuth:
|
|
121
|
+
type: http
|
|
122
|
+
scheme: bearer
|
|
123
|
+
bearerFormat: JWT
|
|
124
|
+
description: >-
|
|
125
|
+
`HTTP: Bearer Auth`
|
|
126
|
+
|
|
127
|
+
- Security Scheme Type: http
|
|
128
|
+
|
|
129
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
130
|
+
Management>API
|
|
131
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
132
|
+
|
|
133
|
+
````
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
> ## Documentation Index
|
|
2
|
+
> Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
|
|
3
|
+
> Use this file to discover all available pages before exploring further.
|
|
4
|
+
|
|
5
|
+
# Create First & Last Frame Video Generation Task
|
|
6
|
+
|
|
7
|
+
> Use this API to create a video generation task from start and end frame images, with optional text input.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## OpenAPI
|
|
12
|
+
|
|
13
|
+
````yaml /api-reference/video/generation/api/start-end-to-video.json POST /v1/video_generation
|
|
14
|
+
openapi: 3.1.0
|
|
15
|
+
info:
|
|
16
|
+
title: MiniMax API
|
|
17
|
+
description: MiniMax video generation and file management API
|
|
18
|
+
license:
|
|
19
|
+
name: MIT
|
|
20
|
+
version: 1.0.0
|
|
21
|
+
servers:
|
|
22
|
+
- url: https://api.minimax.io
|
|
23
|
+
security:
|
|
24
|
+
- bearerAuth: []
|
|
25
|
+
paths:
|
|
26
|
+
/v1/video_generation:
|
|
27
|
+
post:
|
|
28
|
+
tags:
|
|
29
|
+
- Video
|
|
30
|
+
summary: Video Generation
|
|
31
|
+
operationId: videoGeneration
|
|
32
|
+
parameters:
|
|
33
|
+
- name: Content-Type
|
|
34
|
+
in: header
|
|
35
|
+
required: true
|
|
36
|
+
description: >-
|
|
37
|
+
The media type of the request body. Must be set to
|
|
38
|
+
`application/json` to ensure the data is sent in JSON format.
|
|
39
|
+
schema:
|
|
40
|
+
type: string
|
|
41
|
+
enum:
|
|
42
|
+
- application/json
|
|
43
|
+
default: application/json
|
|
44
|
+
requestBody:
|
|
45
|
+
description: ''
|
|
46
|
+
content:
|
|
47
|
+
application/json:
|
|
48
|
+
schema:
|
|
49
|
+
$ref: '#/components/schemas/VideoGenerationReq'
|
|
50
|
+
required: true
|
|
51
|
+
responses:
|
|
52
|
+
'200':
|
|
53
|
+
description: ''
|
|
54
|
+
content:
|
|
55
|
+
application/json:
|
|
56
|
+
schema:
|
|
57
|
+
$ref: '#/components/schemas/VideoGenerationResp'
|
|
58
|
+
components:
|
|
59
|
+
schemas:
|
|
60
|
+
VideoGenerationReq:
|
|
61
|
+
type: object
|
|
62
|
+
required:
|
|
63
|
+
- model
|
|
64
|
+
- last_frame_image
|
|
65
|
+
properties:
|
|
66
|
+
model:
|
|
67
|
+
type: string
|
|
68
|
+
description: >-
|
|
69
|
+
Model name. Supported values: `MiniMax-Hailuo-02`.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
Note: First & last frame generation does not support 512P
|
|
73
|
+
resolution.
|
|
74
|
+
enum:
|
|
75
|
+
- MiniMax-Hailuo-02
|
|
76
|
+
prompt:
|
|
77
|
+
type: string
|
|
78
|
+
description: "Text description of the video, up to 2000 characters.\nFor `MiniMax-Hailuo-02`, you can use `[commands]` syntax for camera movement control.\nCamera movement commands can be embedded in `prompt` using the `[command]` format for precise control. \n- **Supported 15 camera commands**:\n\t- Truck: `[Truck left]`, `[Truck right]`\n\t- Pan: `[Pan left]`, `[Pan right]`\n\t- Push: `[Push in]`, `[Pull out]`\n\t- Pedestal: `[Pedestal up]`, `[Pedestal down]`\n\t- Tilt: `[Tilt up]`, `[Tilt down]`\n\t- Zoom: `[Zoom in]`, `[Zoom out]`\n\t- Shake: `[Shake]`\n\t- Follow: `[Tracking shot]`\n\t- Static: `[Static shot]`\n\r\n- **Usage rules**: \n - *Combined movements*: Multiple commands inside one `[]` take effect simultaneously (e.g., `[Pan left,Pedestal up]`). Recommended max: 3. \n - *Sequential movements*: Commands appear in order, e.g., `\"...[Push in], then...[Push out]\"`. \n - *Natural language*: Free-form descriptions also work, but explicit commands yield more accurate results. "
|
|
79
|
+
first_frame_image:
|
|
80
|
+
type: string
|
|
81
|
+
description: "Image to be used as the **first frame** of the video. Supports public URLs or Base64-encoded [Data URLs](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data) (`data:image/jpeg;base64,...`).\n\n- Image requirements:\n\t- Formats: JPG, JPEG, PNG, WebP\n\t- Size: < 20MB\n\t- Dimensions: Short side > 300px; Aspect ratio between 2:5 and 5:2\n\n⚠️ Video resolution follows the first frame image"
|
|
82
|
+
last_frame_image:
|
|
83
|
+
type: string
|
|
84
|
+
description: "Image to be used as the **last frame** of the video. Supports public URLs or Base64-encoded [Data URLs](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data) (`data:image/jpeg;base64,...`).\n\n- Image requirements:\n\t- Formats: JPG, JPEG, PNG, WebP\n\t- Size: < 20MB\n\t- Dimensions: Short side > 300px; Aspect ratio between 2:5 and 5:2\n\n⚠️ Video resolution is determined by the first frame. If first and last frames differ in size, the last frame will be cropped to match the first"
|
|
85
|
+
prompt_optimizer:
|
|
86
|
+
type: boolean
|
|
87
|
+
description: >-
|
|
88
|
+
Whether to automatically optimize the `prompt`. Defaults to `true`.
|
|
89
|
+
Set to `false` for more precise control.
|
|
90
|
+
duration:
|
|
91
|
+
type: integer
|
|
92
|
+
description: >-
|
|
93
|
+
Video duration (in seconds). Default: `6`. Available values for
|
|
94
|
+
first & last frame generation depend on resolution:
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
| Model | 768P | 1080P |
|
|
98
|
+
|
|
99
|
+
| :--- | :--- | :--- |
|
|
100
|
+
|
|
101
|
+
| MiniMax-Hailuo-02 | `6` or `10` | `6` |
|
|
102
|
+
resolution:
|
|
103
|
+
type: string
|
|
104
|
+
description: >-
|
|
105
|
+
Video resolution. First & last frame generation supports 768P and
|
|
106
|
+
1080P:
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
| Model | 6s | 10s |
|
|
110
|
+
|
|
111
|
+
| :--- | :--- | :--- |
|
|
112
|
+
|
|
113
|
+
| MiniMax-Hailuo-02 | `768P` (default), `1080P` | `768P` |
|
|
114
|
+
enum:
|
|
115
|
+
- 768P
|
|
116
|
+
- 1080P
|
|
117
|
+
callback_url:
|
|
118
|
+
type: string
|
|
119
|
+
description: "A callback URL to receive asynchronous task status updates.\n1. **Validation**: Once configured, MiniMax sends a `POST` request with a `challenge` field. Your server must echo this value within 3s to validate.\n2. **Updates**: After validation, MiniMax pushes status updates when the task changes. Response structure matches the [*Query Video Generation Task* API](/api-reference/video-generation-query). \n\n**Callback `status` values**:\n- `\"processing\"` – Task in progress\n- `\"success\"` – Task completed successfully\n- `\"failed\"` – Task failed\n\n```python\nfrom fastapi import FastAPI, HTTPException, Request\r\nimport json\r\n\r\napp = FastAPI()\r\n\r\n@app.post(\"/get_callback\")\r\nasync def get_callback(request: Request):\r\n try:\r\n json_data = await request.json()\r\n challenge = json_data.get(\"challenge\")\r\n if challenge is not None:\r\n # Validation request, echo back challenge\r\n return {\"challenge\": challenge}\r\n else:\r\n # Status update request, handle accordingly\r\n # {\r\n # \"task_id\": \"115334141465231360\",\r\n # \"status\": \"success\",\r\n # \"file_id\": \"205258526306433\",\r\n # \"base_resp\": {\r\n # \"status_code\": 0,\r\n # \"status_msg\": \"success\"\r\n # }\r\n # }\r\n return {\"status\": \"success\"}\r\n except Exception as e:\r\n raise HTTPException(status_code=500, detail=str(e))\r\n\r\nif __name__ == \"__main__\":\r\n import uvicorn\r\n uvicorn.run(\r\n app, # Required\r\n host=\"0.0.0.0\", # Required\r\n port=8000, # Required, port can be customized\r\n # ssl_keyfile=\"yourname.yourDomainName.com.key\", # Optional, enable if using SSL\r\n # ssl_certfile=\"yourname.yourDomainName.com.key\", # Optional, enable if using SSL\r\n )\n```"
|
|
120
|
+
example:
|
|
121
|
+
prompt: A little girl grow up.
|
|
122
|
+
first_frame_image: >-
|
|
123
|
+
https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg
|
|
124
|
+
last_frame_image: >-
|
|
125
|
+
https://filecdn.minimax.chat/public/97b7cd08-764e-4b8b-a7bf-87a0bd898575.jpeg
|
|
126
|
+
model: MiniMax-Hailuo-02
|
|
127
|
+
duration: 6
|
|
128
|
+
resolution: 1080P
|
|
129
|
+
VideoGenerationResp:
|
|
130
|
+
type: object
|
|
131
|
+
properties:
|
|
132
|
+
task_id:
|
|
133
|
+
type: string
|
|
134
|
+
description: The video generation task ID, used for querying status.
|
|
135
|
+
base_resp:
|
|
136
|
+
$ref: '#/components/schemas/BaseResp'
|
|
137
|
+
example:
|
|
138
|
+
task_id: '106916112212032'
|
|
139
|
+
base_resp:
|
|
140
|
+
status_code: 0
|
|
141
|
+
status_msg: success
|
|
142
|
+
BaseResp:
|
|
143
|
+
type: object
|
|
144
|
+
properties:
|
|
145
|
+
status_code:
|
|
146
|
+
type: integer
|
|
147
|
+
description: >-
|
|
148
|
+
The status codes and their meanings are as follows:
|
|
149
|
+
|
|
150
|
+
- `0`, Request successful
|
|
151
|
+
|
|
152
|
+
- `1002`, Rate limit triggered, please try again later
|
|
153
|
+
|
|
154
|
+
- `1004`, Account authentication failed, please check if the API Key
|
|
155
|
+
is correct
|
|
156
|
+
|
|
157
|
+
- `1008`, Insufficient account balance
|
|
158
|
+
|
|
159
|
+
- `1026`, Sensitive content detected in prompt
|
|
160
|
+
|
|
161
|
+
- `2013`, Invalid input parameters, please check if the parameters
|
|
162
|
+
are filled in as required
|
|
163
|
+
|
|
164
|
+
- `2049`, Invalid API key
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
For more information, please refer to the [Error Code
|
|
168
|
+
Reference](/api-reference/errorcode).
|
|
169
|
+
status_msg:
|
|
170
|
+
type: string
|
|
171
|
+
description: Status details.
|
|
172
|
+
securitySchemes:
|
|
173
|
+
bearerAuth:
|
|
174
|
+
type: http
|
|
175
|
+
scheme: bearer
|
|
176
|
+
bearerFormat: JWT
|
|
177
|
+
description: >-
|
|
178
|
+
`HTTP: Bearer Auth`
|
|
179
|
+
|
|
180
|
+
- Security Scheme Type: http
|
|
181
|
+
|
|
182
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
183
|
+
Management>API
|
|
184
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
185
|
+
|
|
186
|
+
````
|