286 lines
9.6 KiB
Markdown
286 lines
9.6 KiB
Markdown
# \ApiApi
|
||
|
||
All URIs are relative to *http://localhost*
|
||
|
||
Method | HTTP request | Description
|
||
------------- | ------------- | -------------
|
||
[**async_gen_video_api_jm_async_generate_video_post**](ApiApi.md#async_gen_video_api_jm_async_generate_video_post) | **POST** /api/jm/async/generate/video | 异步生成视频,提交任务
|
||
[**async_query_video_status_api_jm_async_query_status_get**](ApiApi.md#async_query_video_status_api_jm_async_query_status_get) | **GET** /api/jm/async/query/status | 异步查询生成视频的任务状态
|
||
[**generate_video_api_api_jm_generate_video_post**](ApiApi.md#generate_video_api_api_jm_generate_video_post) | **POST** /api/jm/generate-video | 生成视频
|
||
[**get_task_status_v2_api_task_status_task_id_get**](ApiApi.md#get_task_status_v2_api_task_status_task_id_get) | **GET** /api/task/status/{task_id} | 异步查询任务状态
|
||
[**health_check_api_jm_health_get**](ApiApi.md#health_check_api_jm_health_get) | **GET** /api/jm/health | 健康检查
|
||
[**health_check_api_task_health_get**](ApiApi.md#health_check_api_task_health_get) | **GET** /api/task/health | 健康检测
|
||
[**submit_task_v2_api_task_create_task_post**](ApiApi.md#submit_task_v2_api_task_create_task_post) | **POST** /api/task/create/task | 新版异步提交任务)
|
||
[**submit_task_v3_api_task_create_task_v2_post**](ApiApi.md#submit_task_v3_api_task_create_task_v2_post) | **POST** /api/task/create/task/v2 | 新版本异步提交任务
|
||
[**sync_generate_video_v2_api_jm_sync_generate_video_post**](ApiApi.md#sync_generate_video_v2_api_jm_sync_generate_video_post) | **POST** /api/jm/sync/generate/video | 同步:生成视频v2,支持通过图片文件生成视频
|
||
|
||
|
||
|
||
## async_gen_video_api_jm_async_generate_video_post
|
||
|
||
> serde_json::Value async_gen_video_api_jm_async_generate_video_post(prompt, img_url, img_file, duration, model_type)
|
||
异步生成视频,提交任务
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**prompt** | **String** | 视频生成提示词 | [required] |
|
||
**img_url** | Option<**String**> | | |
|
||
**img_file** | Option<**std::path::PathBuf**> | | |
|
||
**duration** | Option<**String**> | 视频时长(秒) | |[default to 5]
|
||
**model_type** | Option<**String**> | | |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: multipart/form-data
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## async_query_video_status_api_jm_async_query_status_get
|
||
|
||
> serde_json::Value async_query_video_status_api_jm_async_query_status_get(task_id)
|
||
异步查询生成视频的任务状态
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**task_id** | **String** | | [required] |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: Not defined
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## generate_video_api_api_jm_generate_video_post
|
||
|
||
> serde_json::Value generate_video_api_api_jm_generate_video_post(prompt, img_url, duration, max_wait_time, poll_interval, model_type)
|
||
生成视频
|
||
|
||
生成视频接口
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**prompt** | **String** | 视频生成提示词 | [required] |
|
||
**img_url** | **String** | 图片URL地址 | [required] |
|
||
**duration** | Option<**String**> | 视频时长(秒) | |[default to 5]
|
||
**max_wait_time** | Option<**i32**> | 最大等待时间(秒) | |[default to 300]
|
||
**poll_interval** | Option<**i32**> | 轮询间隔(秒) | |[default to 5]
|
||
**model_type** | Option<**String**> | | |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: application/x-www-form-urlencoded
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## get_task_status_v2_api_task_status_task_id_get
|
||
|
||
> serde_json::Value get_task_status_v2_api_task_status_task_id_get(task_id)
|
||
异步查询任务状态
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**task_id** | **String** | | [required] |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: Not defined
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## health_check_api_jm_health_get
|
||
|
||
> serde_json::Value health_check_api_jm_health_get()
|
||
健康检查
|
||
|
||
健康检查接口
|
||
|
||
### Parameters
|
||
|
||
This endpoint does not need any parameter.
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: Not defined
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## health_check_api_task_health_get
|
||
|
||
> serde_json::Value health_check_api_task_health_get()
|
||
健康检测
|
||
|
||
### Parameters
|
||
|
||
This endpoint does not need any parameter.
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: Not defined
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## submit_task_v2_api_task_create_task_post
|
||
|
||
> serde_json::Value submit_task_v2_api_task_create_task_post(task_request)
|
||
新版异步提交任务)
|
||
|
||
异步提交任务到 Modal 进行处理(不阻塞,立即返回任务ID) - **task_type**: 任务类型 (tea/chop/lady/vlog) - **prompt**: 生成提示词 - **img_url**: 可选的参考图片URL,如果提供会先进行图片描述 - **ar**: 生成图片的长宽比 默认为9:16 立即返回 Modal 任务ID,任务在后台异步执行
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**task_request** | [**TaskRequest**](TaskRequest.md) | | [required] |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: application/json
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## submit_task_v3_api_task_create_task_v2_post
|
||
|
||
> serde_json::Value submit_task_v3_api_task_create_task_v2_post(task_request)
|
||
新版本异步提交任务
|
||
|
||
异步提交任务到 Modal 进行处理(不阻塞,立即返回任务ID) - **task_type**: 任务类型 (tea/chop/lady/vlog) - **prompt**: 生成提示词 - **img_url**: 可选的参考图片URL,如果提供会先进行图片描述 - **ar**: 生成图片的长宽比 默认为9:16 立即返回 Modal 任务ID,任务在后台异步执行
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**task_request** | [**TaskRequest**](TaskRequest.md) | | [required] |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: application/json
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|
||
|
||
## sync_generate_video_v2_api_jm_sync_generate_video_post
|
||
|
||
> serde_json::Value sync_generate_video_v2_api_jm_sync_generate_video_post(prompt, img_file, duration, max_wait_time, poll_interval, model_type)
|
||
同步:生成视频v2,支持通过图片文件生成视频
|
||
|
||
### Parameters
|
||
|
||
|
||
Name | Type | Description | Required | Notes
|
||
------------- | ------------- | ------------- | ------------- | -------------
|
||
**prompt** | **String** | 生成视频的提示词 | [required] |
|
||
**img_file** | **std::path::PathBuf** | 生成视频的图片 | [required] |
|
||
**duration** | Option<**String**> | 视频时长(秒) | |[default to 5]
|
||
**max_wait_time** | Option<**i32**> | 最大等待时间(秒) | |[default to 300]
|
||
**poll_interval** | Option<**i32**> | 轮询间隔(秒) | |[default to 5]
|
||
**model_type** | Option<**String**> | | |
|
||
|
||
### Return type
|
||
|
||
[**serde_json::Value**](serde_json::Value.md)
|
||
|
||
### Authorization
|
||
|
||
No authorization required
|
||
|
||
### HTTP request headers
|
||
|
||
- **Content-Type**: multipart/form-data
|
||
- **Accept**: application/json
|
||
|
||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||
|