mixvideo-v2/cargos/text-video-agent-rust-sdk/docs/Class302Api.md

5.0 KiB

\Class302Api

All URIs are relative to http://localhost

Method HTTP request Description
fetch_supported_model_api_union_img_model_list_get GET /api/union/img/model/list 获取支持的模型列表
fetch_supported_model_api_union_video_model_list_get GET /api/union/video/model/list 获取支持的模型列表
query_task_status_api_union_video_async_task_id_status_get GET /api/union/video/async/{task_id}/status 异步查询任务状态
submit_task_api_union_video_async_generate_video_post POST /api/union/video/async/generate/video 异步提交任务
sync_gen_image_api_union_img_sync_generate_image_post POST /api/union/img/sync/generate/image 生图

fetch_supported_model_api_union_img_model_list_get

serde_json::Value fetch_supported_model_api_union_img_model_list_get() 获取支持的模型列表

Parameters

This endpoint does not need any parameter.

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

fetch_supported_model_api_union_video_model_list_get

serde_json::Value fetch_supported_model_api_union_video_model_list_get() 获取支持的模型列表

Parameters

This endpoint does not need any parameter.

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

query_task_status_api_union_video_async_task_id_status_get

serde_json::Value query_task_status_api_union_video_async_task_id_status_get(task_id) 异步查询任务状态

Parameters

Name Type Description Required Notes
task_id String [required]

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

submit_task_api_union_video_async_generate_video_post

serde_json::Value submit_task_api_union_video_async_generate_video_post(prompt, img_file, model, duration) 异步提交任务

Parameters

Name Type Description Required Notes
prompt String 生图的提示词 [required]
img_file Option<std::path::PathBuf> 首帧图片
model Option<String> 生图的模型 [default to 302/seedance_i2v]
duration Option<i32> 视频时长 [default to 5]

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

sync_gen_image_api_union_img_sync_generate_image_post

serde_json::Value sync_gen_image_api_union_img_sync_generate_image_post(prompt, model, img_file, aspect_ratio) 生图

详细参考: https://doc.302.ai/286288228e0

Parameters

Name Type Description Required Notes
prompt String 生图的提示词 [required]
model Option<String> 生图的模型默认.mj [default to 302/midjourney-v7-t2i]
img_file Option<std::path::PathBuf> 参考图
aspect_ratio Option<String> 图片的尺寸 [default to 9:16]

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]