105 lines
3.8 KiB
Markdown
105 lines
3.8 KiB
Markdown
# \Class302aiApiApi
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**async_gen_video_api302_jm_async_generate_video_post**](Class302aiApiApi.md#async_gen_video_api302_jm_async_generate_video_post) | **POST** /api/302/jm/async/generate/video | 异步生成视频,提交任务
|
|
[**async_query_video_status_api302_jm_async_query_status_get**](Class302aiApiApi.md#async_query_video_status_api302_jm_async_query_status_get) | **GET** /api/302/jm/async/query/status | 异步查询生成视频的任务状态
|
|
[**sync_generate_video_v2_api302_jm_sync_generate_video_post**](Class302aiApiApi.md#sync_generate_video_v2_api302_jm_sync_generate_video_post) | **POST** /api/302/jm/sync/generate/video | 【302ai】同步:生成视频v2,支持通过图片文件生成视频
|
|
|
|
|
|
|
|
## async_gen_video_api302_jm_async_generate_video_post
|
|
|
|
> serde_json::Value async_gen_video_api302_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_api302_jm_async_query_status_get
|
|
|
|
> serde_json::Value async_query_video_status_api302_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)
|
|
|
|
|
|
## sync_generate_video_v2_api302_jm_sync_generate_video_post
|
|
|
|
> serde_json::Value sync_generate_video_v2_api302_jm_sync_generate_video_post(prompt, img_file, duration, max_wait_time, poll_interval, model_type)
|
|
【302ai】同步:生成视频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)
|
|
|