# \Class302aiMidjourneyApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**async_gen_image_api302_mj_async_generate_image_post**](Class302aiMidjourneyApi.md#async_gen_image_api302_mj_async_generate_image_post) | **POST** /api/302/mj/async/generate/image | 异步提交生图任务
[**async_query_status_api302_mj_async_query_status_get**](Class302aiMidjourneyApi.md#async_query_status_api302_mj_async_query_status_get) | **GET** /api/302/mj/async/query/status | 异步查询任务状态
[**async_query_task_status_api302_mj_video_async_task_status_post**](Class302aiMidjourneyApi.md#async_query_task_status_api302_mj_video_async_task_status_post) | **POST** /api/302/mj/video/async/task/status | 异步查询生成任务进度
[**cancel_task_api302_mj_task_cancel_post**](Class302aiMidjourneyApi.md#cancel_task_api302_mj_task_cancel_post) | **POST** /api/302/mj/task/cancel | 取消任务
[**desc_img_by_file_api302_mj_sync_file_img_describe_post**](Class302aiMidjourneyApi.md#desc_img_by_file_api302_mj_sync_file_img_describe_post) | **POST** /api/302/mj/sync/file/img/describe | 通过文件获取生图的提示词
[**describe_image_api_api302_mj_sync_img_describe_post**](Class302aiMidjourneyApi.md#describe_image_api_api302_mj_sync_img_describe_post) | **POST** /api/302/mj/sync/img/describe | 获取图像描述
[**generate_image_sync_api302_mj_sync_image_post**](Class302aiMidjourneyApi.md#generate_image_sync_api302_mj_sync_image_post) | **POST** /api/302/mj/sync/image | 同步生成图片接口
[**submit_task_api302_mj_video_async_submit_post**](Class302aiMidjourneyApi.md#submit_task_api302_mj_video_async_submit_post) | **POST** /api/302/mj/video/async/submit | 异步提交生成视频任务
[**sync_gen_video_api302_mj_video_sync_generate_video_post**](Class302aiMidjourneyApi.md#sync_gen_video_api302_mj_video_sync_generate_video_post) | **POST** /api/302/mj/video/sync/generate/video | 同步生成视频【text+img-->video】



## async_gen_image_api302_mj_async_generate_image_post

> serde_json::Value async_gen_image_api302_mj_async_generate_image_post(prompt, img_file, mode)
异步提交生图任务

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**prompt** | **String** |  | [required] |
**img_file** | Option<**std::path::PathBuf**> |  |  |
**mode** | Option<**String**> | 运行模式,支持 turbo, fast |  |[default to fast]

### 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_status_api302_mj_async_query_status_get

> serde_json::Value async_query_status_api302_mj_async_query_status_get(task_id, task_type, cdn_flag, mode)
异步查询任务状态

Args:      cdn_flag: 是否cdn转换,默认为False 【cnd 转换耗时】      task_id: 任务id      task_type: 任务类型：image【生图】, describe【反推提示词】  Returns:

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**task_id** | **String** |  | [required] |
**task_type** | Option<**String**> |  |  |[default to image]
**cdn_flag** | Option<**bool**> |  |  |[default to false]
**mode** | Option<**String**> |  |  |[default to fast]

### 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)


## async_query_task_status_api302_mj_video_async_task_status_post

> serde_json::Value async_query_task_status_api302_mj_video_async_task_status_post(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)


## cancel_task_api302_mj_task_cancel_post

> serde_json::Value cancel_task_api302_mj_task_cancel_post(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)


## desc_img_by_file_api302_mj_sync_file_img_describe_post

> serde_json::Value desc_img_by_file_api302_mj_sync_file_img_describe_post(img_file, max_wait_time, poll_interval)
通过文件获取生图的提示词

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**img_file** | **std::path::PathBuf** | 上传的图片 | [required] |
**max_wait_time** | Option<**i32**> | 最大等待时间(秒) |  |[default to 120]
**poll_interval** | Option<**i32**> | 轮询间隔(秒) |  |[default to 2]

### 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)


## describe_image_api_api302_mj_sync_img_describe_post

> serde_json::Value describe_image_api_api302_mj_sync_img_describe_post(image_url, max_wait_time, poll_interval)
获取图像描述

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**image_url** | **String** | 图片URL地址 | [required] |
**max_wait_time** | Option<**i32**> | 最大等待时间(秒) |  |[default to 120]
**poll_interval** | Option<**i32**> | 轮询间隔(秒) |  |[default to 2]

### 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)


## generate_image_sync_api302_mj_sync_image_post

> serde_json::Value generate_image_sync_api302_mj_sync_image_post(prompt, max_wait_time, poll_interval, mode, img_file)
同步生成图片接口

Args:      mode: 模式 支持 fast turbo 模式  Returns:

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**prompt** | **String** |  | [required] |
**max_wait_time** | Option<**i32**> |  |  |[default to 500]
**poll_interval** | Option<**i32**> |  |  |[default to 4]
**mode** | Option<**String**> |  |  |[default to fast]
**img_file** | Option<**std::path::PathBuf**> |  |  |

### 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)


## submit_task_api302_mj_video_async_submit_post

> serde_json::Value submit_task_api302_mj_video_async_submit_post(prompt, img_file)
异步提交生成视频任务

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**prompt** | **String** | 生成视频的提示词 | [required] |
**img_file** | Option<**std::path::PathBuf**> |  |  |

### 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)


## sync_gen_video_api302_mj_video_sync_generate_video_post

> serde_json::Value sync_gen_video_api302_mj_video_sync_generate_video_post(prompt, img_file, timeout, interval)
同步生成视频【text+img-->video】

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**prompt** | **String** | 生成视频的提示词 | [required] |
**img_file** | **std::path::PathBuf** | 首帧参考图文件 | [required] |
**timeout** | Option<**i32**> | 超时时间 |  |[default to 300]
**interval** | Option<**i32**> | 轮询间隔 |  |[default to 3]

### 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)

