@j-o-r/hello-dave 0.0.10 → 0.1.0
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 +9 -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 +9 -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 +8 -2
- package/docs/multi-agent-clusters.md.bak +0 -229
|
@@ -0,0 +1,206 @@
|
|
|
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
|
+
# Image-to-Video Task
|
|
6
|
+
|
|
7
|
+
> Use this API to create a video generation task from image, with optional text input.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## OpenAPI
|
|
12
|
+
|
|
13
|
+
````yaml /api-reference/video/generation/api/image-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
|
+
- first_frame_image
|
|
65
|
+
properties:
|
|
66
|
+
model:
|
|
67
|
+
type: string
|
|
68
|
+
description: >-
|
|
69
|
+
Model name. Supported values: `MiniMax-Hailuo-2.3`,
|
|
70
|
+
`MiniMax-Hailuo-2.3-Fast`, `MiniMax-Hailuo-02`, `I2V-01-Director`,
|
|
71
|
+
`I2V-01-live`, `I2V-01`.
|
|
72
|
+
enum:
|
|
73
|
+
- MiniMax-Hailuo-2.3
|
|
74
|
+
- MiniMax-Hailuo-2.3-Fast
|
|
75
|
+
- MiniMax-Hailuo-02
|
|
76
|
+
- I2V-01-Director
|
|
77
|
+
- I2V-01-live
|
|
78
|
+
- I2V-01
|
|
79
|
+
first_frame_image:
|
|
80
|
+
type: string
|
|
81
|
+
description: "Specify an image as the starting frame of the video. Supports public URLs or Base64-encoded [Data URLs](https://developer.mozilla.org/en-US/Web/URI/Reference/Schemes/data) (`data:image/jpeg;base64,...`). \n\n- Image requirements:\n\t- Formats: JPG, JPEG, PNG, WebP \n\t- Size: Less than 20MB \n\t- Dimensions: Short edge > 300px; aspect ratio between 2:5 and 5:2 "
|
|
82
|
+
prompt:
|
|
83
|
+
type: string
|
|
84
|
+
description: "Text description of the video, up to 2000 characters. For `MiniMax-Hailuo-2.3`, `MiniMax-Hailuo-2.3-Fast`, `MiniMax-Hailuo-02` and `I2V-01-Director` models, camera movement can be controlled using `[command]` syntax.\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. "
|
|
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
|
+
fast_pretreatment:
|
|
91
|
+
type: boolean
|
|
92
|
+
description: >-
|
|
93
|
+
Reduces optimization time when `prompt_optimizer` is enabled.
|
|
94
|
+
Defaults to `false`. Applies only to `MiniMax-Hailuo-2.3`,
|
|
95
|
+
`MiniMax-Hailuo-2.3-Fast` and `MiniMax-Hailuo-02`.
|
|
96
|
+
duration:
|
|
97
|
+
type: integer
|
|
98
|
+
description: >-
|
|
99
|
+
Video duration (seconds). Default is `6`. Supported values depend on
|
|
100
|
+
the model and resolution:
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
| Model | 512P | 768P | 1080P |
|
|
104
|
+
|
|
105
|
+
| :--- | :--- | :--- | :--- |
|
|
106
|
+
|
|
107
|
+
| MiniMax-Hailuo-2.3 | - | `6` or `10` | `6` |
|
|
108
|
+
|
|
109
|
+
| MiniMax-Hailuo-2.3-Fast | - | `6` or `10` | `6` |
|
|
110
|
+
|
|
111
|
+
| MiniMax-Hailuo-02 | `6` or `10` | `6` or `10` | `6` |
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Notes: The default resolution for other models is 720p.
|
|
115
|
+
resolution:
|
|
116
|
+
type: string
|
|
117
|
+
description: >-
|
|
118
|
+
Video resolution. Options depend on model and duration:
|
|
119
|
+
|
|
120
|
+
| Model | 6s | 10s |
|
|
121
|
+
|
|
122
|
+
| :--- | :--- | :--- |
|
|
123
|
+
|
|
124
|
+
| MiniMax-Hailuo-2.3 | `768P` (default), `1080P` | `768P` (default)
|
|
125
|
+
|
|
|
126
|
+
|
|
127
|
+
| MiniMax-Hailuo-2.3-Fast | `768P` (default), `1080P` | `768P`
|
|
128
|
+
(default) |
|
|
129
|
+
|
|
130
|
+
| MiniMax-Hailuo-02 | `512P`, `768P` (default), `1080P` | `512P`,
|
|
131
|
+
`768P` (default) |
|
|
132
|
+
|
|
133
|
+
| Other models | `720P` (default) | Not supported |
|
|
134
|
+
enum:
|
|
135
|
+
- 512P
|
|
136
|
+
- 720P
|
|
137
|
+
- 768P
|
|
138
|
+
- 1080P
|
|
139
|
+
callback_url:
|
|
140
|
+
type: string
|
|
141
|
+
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```"
|
|
142
|
+
example:
|
|
143
|
+
prompt: A mouse runs toward the camera, smiling and blinking.
|
|
144
|
+
first_frame_image: >-
|
|
145
|
+
https://cdn.hailuoai.com/prod/2024-09-18-16/user/multi_chat_file/9c0b5c14-ee88-4a5b-b503-4f626f018639.jpeg
|
|
146
|
+
model: MiniMax-Hailuo-2.3
|
|
147
|
+
duration: 6
|
|
148
|
+
resolution: 1080P
|
|
149
|
+
VideoGenerationResp:
|
|
150
|
+
type: object
|
|
151
|
+
properties:
|
|
152
|
+
task_id:
|
|
153
|
+
type: string
|
|
154
|
+
description: The video generation task ID, used for querying status.
|
|
155
|
+
base_resp:
|
|
156
|
+
$ref: '#/components/schemas/BaseResp'
|
|
157
|
+
example:
|
|
158
|
+
task_id: '106916112212032'
|
|
159
|
+
base_resp:
|
|
160
|
+
status_code: 0
|
|
161
|
+
status_msg: success
|
|
162
|
+
BaseResp:
|
|
163
|
+
type: object
|
|
164
|
+
properties:
|
|
165
|
+
status_code:
|
|
166
|
+
type: integer
|
|
167
|
+
description: >-
|
|
168
|
+
The status codes and their meanings are as follows:
|
|
169
|
+
|
|
170
|
+
- `0`, Request successful
|
|
171
|
+
|
|
172
|
+
- `1002`, Rate limit triggered, please try again later
|
|
173
|
+
|
|
174
|
+
- `1004`, Account authentication failed, please check if the API Key
|
|
175
|
+
is correct
|
|
176
|
+
|
|
177
|
+
- `1008`, Insufficient account balance
|
|
178
|
+
|
|
179
|
+
- `1026`, Sensitive content detected in prompt
|
|
180
|
+
|
|
181
|
+
- `2013`, Invalid input parameters, please check if the parameters
|
|
182
|
+
are filled in as required
|
|
183
|
+
|
|
184
|
+
- `2049`, Invalid API key
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
For more information, please refer to the [Error Code
|
|
188
|
+
Reference](/api-reference/errorcode).
|
|
189
|
+
status_msg:
|
|
190
|
+
type: string
|
|
191
|
+
description: Status details.
|
|
192
|
+
securitySchemes:
|
|
193
|
+
bearerAuth:
|
|
194
|
+
type: http
|
|
195
|
+
scheme: bearer
|
|
196
|
+
bearerFormat: JWT
|
|
197
|
+
description: >-
|
|
198
|
+
`HTTP: Bearer Auth`
|
|
199
|
+
|
|
200
|
+
- Security Scheme Type: http
|
|
201
|
+
|
|
202
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
203
|
+
Management>API
|
|
204
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
205
|
+
|
|
206
|
+
````
|
|
@@ -0,0 +1,164 @@
|
|
|
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
|
+
# Subject-Reference to Video Generation Task
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## OpenAPI
|
|
10
|
+
|
|
11
|
+
````yaml /api-reference/video/generation/api/subject-reference-to-video.json POST /v1/video_generation
|
|
12
|
+
openapi: 3.1.0
|
|
13
|
+
info:
|
|
14
|
+
title: MiniMax API
|
|
15
|
+
description: MiniMax video generation and file management API
|
|
16
|
+
license:
|
|
17
|
+
name: MIT
|
|
18
|
+
version: 1.0.0
|
|
19
|
+
servers:
|
|
20
|
+
- url: https://api.minimax.io
|
|
21
|
+
security:
|
|
22
|
+
- bearerAuth: []
|
|
23
|
+
paths:
|
|
24
|
+
/v1/video_generation:
|
|
25
|
+
post:
|
|
26
|
+
tags:
|
|
27
|
+
- Video
|
|
28
|
+
summary: Video Generation
|
|
29
|
+
operationId: videoGeneration
|
|
30
|
+
parameters:
|
|
31
|
+
- name: Content-Type
|
|
32
|
+
in: header
|
|
33
|
+
required: true
|
|
34
|
+
description: >-
|
|
35
|
+
The media type of the request body. Must be set to
|
|
36
|
+
`application/json` to ensure the data is sent in JSON format.
|
|
37
|
+
schema:
|
|
38
|
+
type: string
|
|
39
|
+
enum:
|
|
40
|
+
- application/json
|
|
41
|
+
default: application/json
|
|
42
|
+
requestBody:
|
|
43
|
+
description: ''
|
|
44
|
+
content:
|
|
45
|
+
application/json:
|
|
46
|
+
schema:
|
|
47
|
+
$ref: '#/components/schemas/VideoGenerationReq'
|
|
48
|
+
required: true
|
|
49
|
+
responses:
|
|
50
|
+
'200':
|
|
51
|
+
description: ''
|
|
52
|
+
content:
|
|
53
|
+
application/json:
|
|
54
|
+
schema:
|
|
55
|
+
$ref: '#/components/schemas/VideoGenerationResp'
|
|
56
|
+
components:
|
|
57
|
+
schemas:
|
|
58
|
+
VideoGenerationReq:
|
|
59
|
+
type: object
|
|
60
|
+
required:
|
|
61
|
+
- model
|
|
62
|
+
- subject_reference
|
|
63
|
+
properties:
|
|
64
|
+
model:
|
|
65
|
+
type: string
|
|
66
|
+
description: 'Model name. Supported values: `S2V-01`. '
|
|
67
|
+
enum:
|
|
68
|
+
- S2V-01
|
|
69
|
+
prompt:
|
|
70
|
+
type: string
|
|
71
|
+
description: Text description of the video, up to 2000 characters.
|
|
72
|
+
prompt_optimizer:
|
|
73
|
+
type: boolean
|
|
74
|
+
description: >-
|
|
75
|
+
Whether to automatically optimize the `prompt`. Defaults to `true`.
|
|
76
|
+
Set to `false` for more precise control.
|
|
77
|
+
subject_reference:
|
|
78
|
+
type: array
|
|
79
|
+
items:
|
|
80
|
+
$ref: '#/components/schemas/SubjectReference'
|
|
81
|
+
description: Subject reference images
|
|
82
|
+
callback_url:
|
|
83
|
+
type: string
|
|
84
|
+
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```"
|
|
85
|
+
example:
|
|
86
|
+
prompt: A girl runs toward the camera and winks with a smile.
|
|
87
|
+
subject_reference:
|
|
88
|
+
- type: character
|
|
89
|
+
image:
|
|
90
|
+
- >-
|
|
91
|
+
https://cdn.hailuoai.com/prod/2025-08-12-17/video_cover/1754990600020238321-411603868533342214-cover.jpg
|
|
92
|
+
model: S2V-01
|
|
93
|
+
VideoGenerationResp:
|
|
94
|
+
type: object
|
|
95
|
+
properties:
|
|
96
|
+
task_id:
|
|
97
|
+
type: string
|
|
98
|
+
description: The video generation task ID, used for querying status.
|
|
99
|
+
base_resp:
|
|
100
|
+
$ref: '#/components/schemas/BaseResp'
|
|
101
|
+
example:
|
|
102
|
+
task_id: '106916112212032'
|
|
103
|
+
base_resp:
|
|
104
|
+
status_code: 0
|
|
105
|
+
status_msg: success
|
|
106
|
+
SubjectReference:
|
|
107
|
+
type: object
|
|
108
|
+
required:
|
|
109
|
+
- type
|
|
110
|
+
- image
|
|
111
|
+
properties:
|
|
112
|
+
type:
|
|
113
|
+
type: string
|
|
114
|
+
description: Subject type, currently only `character` (face of a person).
|
|
115
|
+
image:
|
|
116
|
+
type: array
|
|
117
|
+
items:
|
|
118
|
+
type: string
|
|
119
|
+
description: "Array containing the reference image (only one image supported). \n- Requirements: \n\t- Formats: JPG, JPEG, PNG, WebP. \n\t- File size: < 20MB. \n\t- Resolution: shorter side > 300px; aspect ratio between 2:5 and 5:2. "
|
|
120
|
+
BaseResp:
|
|
121
|
+
type: object
|
|
122
|
+
properties:
|
|
123
|
+
status_code:
|
|
124
|
+
type: integer
|
|
125
|
+
description: >-
|
|
126
|
+
The status codes and their meanings are as follows:
|
|
127
|
+
|
|
128
|
+
- `0`, Request successful
|
|
129
|
+
|
|
130
|
+
- `1002`, Rate limit triggered, please try again later
|
|
131
|
+
|
|
132
|
+
- `1004`, Account authentication failed, please check if the API Key
|
|
133
|
+
is correct
|
|
134
|
+
|
|
135
|
+
- `1008`, Insufficient account balance
|
|
136
|
+
|
|
137
|
+
- `1026`, Sensitive content detected in prompt
|
|
138
|
+
|
|
139
|
+
- `2013`, Invalid input parameters, please check if the parameters
|
|
140
|
+
are filled in as required
|
|
141
|
+
|
|
142
|
+
- `2049`, Invalid API key
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
For more information, please refer to the [Error Code
|
|
146
|
+
Reference](/api-reference/errorcode).
|
|
147
|
+
status_msg:
|
|
148
|
+
type: string
|
|
149
|
+
description: Status details.
|
|
150
|
+
securitySchemes:
|
|
151
|
+
bearerAuth:
|
|
152
|
+
type: http
|
|
153
|
+
scheme: bearer
|
|
154
|
+
bearerFormat: JWT
|
|
155
|
+
description: >-
|
|
156
|
+
`HTTP: Bearer Auth`
|
|
157
|
+
|
|
158
|
+
- Security Scheme Type: http
|
|
159
|
+
|
|
160
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
161
|
+
Management>API
|
|
162
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
163
|
+
|
|
164
|
+
````
|
|
@@ -0,0 +1,192 @@
|
|
|
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 Text-to-Video Generation Task
|
|
6
|
+
|
|
7
|
+
> Use this API to create a video generation task from text input.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## OpenAPI
|
|
12
|
+
|
|
13
|
+
````yaml /api-reference/video/generation/api/text-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
|
+
- prompt
|
|
65
|
+
properties:
|
|
66
|
+
model:
|
|
67
|
+
type: string
|
|
68
|
+
description: >-
|
|
69
|
+
Model name. Supported values:
|
|
70
|
+
|
|
71
|
+
`MiniMax-Hailuo-2.3`, `MiniMax-Hailuo-02`, `T2V-01-Director`,
|
|
72
|
+
`T2V-01`.
|
|
73
|
+
enum:
|
|
74
|
+
- MiniMax-Hailuo-2.3
|
|
75
|
+
- MiniMax-Hailuo-02
|
|
76
|
+
- T2V-01-Director
|
|
77
|
+
- T2V-01
|
|
78
|
+
prompt:
|
|
79
|
+
type: string
|
|
80
|
+
description: "Text description of the video, up to 2000 characters. \r\nFor `MiniMax-Hailuo-2.3`, `MiniMax-Hailuo-02` and `T2V-01-Director` models, camera movement can be controlled using `[command]` syntax.\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. "
|
|
81
|
+
prompt_optimizer:
|
|
82
|
+
type: boolean
|
|
83
|
+
description: >-
|
|
84
|
+
Whether to automatically optimize the `prompt`. Defaults to `true`.
|
|
85
|
+
Set to `false` for more precise control.
|
|
86
|
+
fast_pretreatment:
|
|
87
|
+
type: boolean
|
|
88
|
+
description: >-
|
|
89
|
+
Reduces optimization time when `prompt_optimizer` is enabled.
|
|
90
|
+
Defaults to `false`. Applies only to `MiniMax-Hailuo-2.3` and
|
|
91
|
+
`MiniMax-Hailuo-02`.
|
|
92
|
+
duration:
|
|
93
|
+
type: integer
|
|
94
|
+
description: >-
|
|
95
|
+
Video length (seconds). Default is `6`. Available values depend on
|
|
96
|
+
model and resolution:
|
|
97
|
+
|
|
98
|
+
| Model | 720P |768P | 1080P |
|
|
99
|
+
|
|
100
|
+
| :--- |:--- |:--- | :--- |
|
|
101
|
+
|
|
102
|
+
| MiniMax-Hailuo-2.3 | - | `6` or `10` | `6` |
|
|
103
|
+
|
|
104
|
+
| MiniMax-Hailuo-02 | - | `6` or `10` | `6` |
|
|
105
|
+
|
|
106
|
+
| Other models | `6` | - |`6` |
|
|
107
|
+
resolution:
|
|
108
|
+
type: string
|
|
109
|
+
description: >-
|
|
110
|
+
Video resolution. Options depend on model and duration:
|
|
111
|
+
|
|
112
|
+
| Model | 6s | 10s |
|
|
113
|
+
|
|
114
|
+
| :--- | :--- | :--- |
|
|
115
|
+
|
|
116
|
+
| MiniMax-Hailuo-2.3 | `768P` (default), `1080P` | `768P`
|
|
117
|
+
(default) |
|
|
118
|
+
|
|
119
|
+
| MiniMax-Hailuo-02 | `768P` (default), `1080P` | `768P` (default)
|
|
120
|
+
|
|
|
121
|
+
|
|
122
|
+
| Other models | `720P` (default) | Not supported |
|
|
123
|
+
enum:
|
|
124
|
+
- 720P
|
|
125
|
+
- 768P
|
|
126
|
+
- 1080P
|
|
127
|
+
callback_url:
|
|
128
|
+
type: string
|
|
129
|
+
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```"
|
|
130
|
+
example:
|
|
131
|
+
model: MiniMax-Hailuo-2.3
|
|
132
|
+
prompt: A man picks up a book [Pedestal up], then reads [Static shot].
|
|
133
|
+
duration: 6
|
|
134
|
+
resolution: 1080P
|
|
135
|
+
VideoGenerationResp:
|
|
136
|
+
type: object
|
|
137
|
+
properties:
|
|
138
|
+
task_id:
|
|
139
|
+
type: string
|
|
140
|
+
description: The video generation task ID, used for querying status.
|
|
141
|
+
base_resp:
|
|
142
|
+
$ref: '#/components/schemas/BaseResp'
|
|
143
|
+
example:
|
|
144
|
+
task_id: '106916112212032'
|
|
145
|
+
base_resp:
|
|
146
|
+
status_code: 0
|
|
147
|
+
status_msg: success
|
|
148
|
+
BaseResp:
|
|
149
|
+
type: object
|
|
150
|
+
properties:
|
|
151
|
+
status_code:
|
|
152
|
+
type: integer
|
|
153
|
+
description: >-
|
|
154
|
+
The status codes and their meanings are as follows:
|
|
155
|
+
|
|
156
|
+
- `0`, Request successful
|
|
157
|
+
|
|
158
|
+
- `1002`, Rate limit triggered, please try again later
|
|
159
|
+
|
|
160
|
+
- `1004`, Account authentication failed, please check if the API Key
|
|
161
|
+
is correct
|
|
162
|
+
|
|
163
|
+
- `1008`, Insufficient account balance
|
|
164
|
+
|
|
165
|
+
- `1026`, Sensitive content detected in prompt
|
|
166
|
+
|
|
167
|
+
- `2013`, Invalid input parameters, please check if the parameters
|
|
168
|
+
are filled in as required
|
|
169
|
+
|
|
170
|
+
- `2049`, Invalid API key
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
For more information, please refer to the [Error Code
|
|
174
|
+
Reference](/api-reference/errorcode).
|
|
175
|
+
status_msg:
|
|
176
|
+
type: string
|
|
177
|
+
description: Status details.
|
|
178
|
+
securitySchemes:
|
|
179
|
+
bearerAuth:
|
|
180
|
+
type: http
|
|
181
|
+
scheme: bearer
|
|
182
|
+
bearerFormat: JWT
|
|
183
|
+
description: >-
|
|
184
|
+
`HTTP: Bearer Auth`
|
|
185
|
+
|
|
186
|
+
- Security Scheme Type: http
|
|
187
|
+
|
|
188
|
+
- HTTP Authorization Scheme: `Bearer API_key`, can be found in [Account
|
|
189
|
+
Management>API
|
|
190
|
+
Keys](https://platform.minimax.io/user-center/basic-information/interface-key).
|
|
191
|
+
|
|
192
|
+
````
|