# 文本视频智能体客户端

[![Crates.io](https://img.shields.io/crates/v/text_video_agent_client.svg)](https://crates.io/crates/text_video_agent_client)
[![文档](https://docs.rs/text_video_agent_client/badge.svg)](https://docs.rs/text_video_agent_client)
[![许可证: MIT OR Apache-2.0](https://img.shields.io/badge/License-MIT%20OR%20Apache--2.0-blue.svg)](https://github.com/your-repo/text-video-agent-rust-sdk)

一个全面的 Rust 客户端，用于文本视频智能体 API - 一个支持以下功能的 AI 内容生成服务：

- 🎨 **图像生成** - 多种 AI 模型（Midjourney、Stable Diffusion 等）
- 🎬 **视频生成** - 文本转视频和图像转视频
- 🎵 **音频合成** - 文本转语音和声音克隆
- 💋 **唇形同步** - 使用 Hedra 的高级唇形同步技术
- 🤖 **数字人** - 创建和动画数字化身
- 🧠 **大语言模型集成** - 多模态 AI 分析和推理
- 🔧 **工作流自动化** - ComfyUI 工作流执行

## 特性

- **类型安全的 API** - 从 OpenAPI 3.1 规范生成
- **异步/等待支持** - 基于 `reqwest` 和 `tokio` 构建
- **全面覆盖** - 包含所有 API 端点
- **文件上传支持** - 多部分表单数据处理
- **错误处理** - 结构化错误响应
- **文档** - 完整的 API 文档

## 安装

将以下内容添加到您的 `Cargo.toml`：

```toml
[dependencies]
text_video_agent_client = "1.0.6"
tokio = { version = "1.0", features = ["full"] }
```

## 快速开始

```rust
use text_video_agent_client::{apis::configuration::Configuration, apis::default_api};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = Configuration {
        base_path: "https://your-api-endpoint.com".to_string(),
        ..Default::default()
    };

    // 生成图像
    let response = default_api::submit_image_task_api_custom_image_submit_task_post(
        &config,
        // 在此处添加您的参数
    ).await?;

    println!("任务已提交: {:?}", response);
    Ok(())
}
```

## API 概览

此客户端是从文本视频智能体 API 规范生成的，提供对所有可用端点的访问：

- **API 版本**: 1.0.6
- **包版本**: 1.0.6
- **生成工具**: OpenAPI Generator 7.14.0

## API 端点文档

所有 URI 都相对于 *http://localhost*

类 | 方法 | HTTP 请求 | 描述
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**check_template_task_type_api_template_check_task_type_get**](docs/DefaultApi.md#check_template_task_type_api_template_check_task_type_get) | **GET** /api/template/check/task_type | 检查任务类型是否可用
*DefaultApi* | [**create_higgsfield_character_api_custom_extend_higgsfield_create_character_post**](docs/DefaultApi.md#create_higgsfield_character_api_custom_extend_higgsfield_create_character_post) | **POST** /api/custom/extend/higgsfield/create/character | 提交创建生成角色任务
*DefaultApi* | [**get_sample_prompt_api_prompt_default_get**](docs/DefaultApi.md#get_sample_prompt_api_prompt_default_get) | **GET** /api/prompt/default | 获取示例提示词
*DefaultApi* | [**get_supported_model_api_custom_extend_model_list_get**](docs/DefaultApi.md#get_supported_model_api_custom_extend_model_list_get) | **GET** /api/custom/extend/model/list | 获取支持的模型列表
*DefaultApi* | [**get_supported_model_api_custom_model_list_get**](docs/DefaultApi.md#get_supported_model_api_custom_model_list_get) | **GET** /api/custom/model/list | 获取支持的模型列表
*DefaultApi* | [**handler_create_digital_api_ark_digital_create_post**](docs/DefaultApi.md#handler_create_digital_api_ark_digital_create_post) | **POST** /api/ark/digital/create | 提交创建数字人任务
*DefaultApi* | [**handler_create_video_template_api_template_create_post**](docs/DefaultApi.md#handler_create_video_template_api_template_create_post) | **POST** /api/template/create | 创建新的视频模板
*DefaultApi* | [**handler_delete_video_template_api_template_delete_template_id_delete**](docs/DefaultApi.md#handler_delete_video_template_api_template_delete_template_id_delete) | **DELETE** /api/template/delete/{template_id} | 删除视频模板
*DefaultApi* | [**handler_higgsfield_submit_task_api_custom_extend_higgsfield_submit_task_post**](docs/DefaultApi.md#handler_higgsfield_submit_task_api_custom_extend_higgsfield_submit_task_post) | **POST** /api/custom/extend/higgsfield/submit/task | higgsfield Soul（文生图片）模型
*DefaultApi* | [**handler_submit_generate_video_api_ark_digital_video_submit_task_post**](docs/DefaultApi.md#handler_submit_generate_video_api_ark_digital_video_submit_task_post) | **POST** /api/ark/digital/video/submit/task | 生成数字人视频
*DefaultApi* | [**handler_update_video_template_api_template_update_put**](docs/DefaultApi.md#handler_update_video_template_api_template_update_put) | **PUT** /api/template/update | 更新视频模板
*DefaultApi* | [**health_check_api_file_health_get**](docs/DefaultApi.md#health_check_api_file_health_get) | **GET** /api/file/health | 健康检测
*DefaultApi* | [**health_check_api_prompt_health_get**](docs/DefaultApi.md#health_check_api_prompt_health_get) | **GET** /api/prompt/health | 健康检测
*DefaultApi* | [**query_frame_task_status_api_custom_extend_frame_task_status_get**](docs/DefaultApi.md#query_frame_task_status_api_custom_extend_frame_task_status_get) | **GET** /api/custom/extend/frame/task/status | 查询首尾帧任务状态
*DefaultApi* | [**query_higgsfield_character_status_api_custom_extend_higgsfield_character_status_post**](docs/DefaultApi.md#query_higgsfield_character_status_api_custom_extend_higgsfield_character_status_post) | **POST** /api/custom/extend/higgsfield/character/status | 查询创建角色状态
*DefaultApi* | [**query_higgsfield_task_status_api_custom_extend_higgsfield_task_status_get**](docs/DefaultApi.md#query_higgsfield_task_status_api_custom_extend_higgsfield_task_status_get) | **GET** /api/custom/extend/higgsfield/task/status | higgsfield 查询任务执行状态
*DefaultApi* | [**query_task_status_api_ark_digital_task_status_get**](docs/DefaultApi.md#query_task_status_api_ark_digital_task_status_get) | **GET** /api/ark/digital/task/status | 查询任务状态
*DefaultApi* | [**query_task_status_api_custom_task_status_get**](docs/DefaultApi.md#query_task_status_api_custom_task_status_get) | **GET** /api/custom/task/status | Query Task Status
*DefaultApi* | [**query_video_template_v2_api_template_default_get**](docs/DefaultApi.md#query_video_template_v2_api_template_default_get) | **GET** /api/template/default | 获取视频模板列表
*DefaultApi* | [**submit_frame_video_task_api_custom_extend_frame_submit_task_post**](docs/DefaultApi.md#submit_frame_video_task_api_custom_extend_frame_submit_task_post) | **POST** /api/custom/extend/frame/submit/task | 【首尾帧生成视频】
*DefaultApi* | [**submit_image_task_api_custom_image_submit_task_post**](docs/DefaultApi.md#submit_image_task_api_custom_image_submit_task_post) | **POST** /api/custom/image/submit/task | 提交图片生成任务
*DefaultApi* | [**submit_video_task_api_custom_video_submit_task_post**](docs/DefaultApi.md#submit_video_task_api_custom_video_submit_task_post) | **POST** /api/custom/video/submit/task | 提交视频生成任务
*DefaultApi* | [**upload_file2cloud_api_ark_digital_url2vid_post**](docs/DefaultApi.md#upload_file2cloud_api_ark_digital_url2vid_post) | **POST** /api/ark/digital/url2vid | 【异步】上传视频生成视频云id, 仅仅支持mp4格式的视频,视频时长较时时,建议使用链接
*DefaultApi* | [**upload_file_api_file_upload_post**](docs/DefaultApi.md#upload_file_api_file_upload_post) | **POST** /api/file/upload | 上传文件到COS
*DefaultApi* | [**upload_s3_api_file_upload_s3_post**](docs/DefaultApi.md#upload_s3_api_file_upload_s3_post) | **POST** /api/file/upload/s3 | 上传文件到s3【推荐 cdn加速】
*ApiApi* | [**get_voices_hl_api302_hl_router_sync_get_voices_get**](docs/ApiApi.md#get_voices_hl_api302_hl_router_sync_get_voices_get) | **GET** /api/302/hl_router/sync/get/voices | 查询克隆的音色ID, 【接口来自官方， 302没有对应的中转接口】
*ApiApi* | [**hl_tts_api302_hl_router_sync_generate_speech_post**](docs/ApiApi.md#hl_tts_api302_hl_router_sync_generate_speech_post) | **POST** /api/302/hl_router/sync/generate/speech | 海螺同步生成音频
*ApiApi* | [**upload_material_file_api302_hl_router_sync_file_upload_post**](docs/ApiApi.md#upload_material_file_api302_hl_router_sync_file_upload_post) | **POST** /api/302/hl_router/sync/file/upload | 上传素材到302ai,用于复刻
*ApiApi* | [**voice_clone_api302_hl_router_sync_voice_clone_post**](docs/ApiApi.md#voice_clone_api302_hl_router_sync_voice_clone_post) | **POST** /api/302/hl_router/sync/voice/clone | 声音克隆
*ApiApi* | [**async_gen_video_api_jm_async_generate_video_post**](docs/ApiApi.md#async_gen_video_api_jm_async_generate_video_post) | **POST** /api/jm/async/generate/video | 异步生成视频,提交任务
*ApiApi* | [**async_query_video_status_api_jm_async_query_status_get**](docs/ApiApi.md#async_query_video_status_api_jm_async_query_status_get) | **GET** /api/jm/async/query/status | 异步查询生成视频的任务状态
*ApiApi* | [**generate_video_api_api_jm_generate_video_post**](docs/ApiApi.md#generate_video_api_api_jm_generate_video_post) | **POST** /api/jm/generate-video | 生成视频
*ApiApi* | [**get_task_status_v2_api_task_status_task_id_get**](docs/ApiApi.md#get_task_status_v2_api_task_status_task_id_get) | **GET** /api/task/status/{task_id} | 异步查询任务状态
*ApiApi* | [**health_check_api_jm_health_get**](docs/ApiApi.md#health_check_api_jm_health_get) | **GET** /api/jm/health | 健康检查
*ApiApi* | [**health_check_api_task_health_get**](docs/ApiApi.md#health_check_api_task_health_get) | **GET** /api/task/health | 健康检测
*ApiApi* | [**submit_task_v2_api_task_create_task_post**](docs/ApiApi.md#submit_task_v2_api_task_create_task_post) | **POST** /api/task/create/task | 新版异步提交任务）
*ApiApi* | [**submit_task_v3_api_task_create_task_v2_post**](docs/ApiApi.md#submit_task_v3_api_task_create_task_v2_post) | **POST** /api/task/create/task/v2 | 新版本异步提交任务
*ApiApi* | [**sync_generate_video_v2_api_jm_sync_generate_video_post**](docs/ApiApi.md#sync_generate_video_v2_api_jm_sync_generate_video_post) | **POST** /api/jm/sync/generate/video | 同步:生成视频v2,支持通过图片文件生成视频
*Class302Api* | [**fetch_supported_model_api_union_img_model_list_get**](docs/Class302Api.md#fetch_supported_model_api_union_img_model_list_get) | **GET** /api/union/img/model/list | 获取支持的模型列表
*Class302Api* | [**fetch_supported_model_api_union_video_model_list_get**](docs/Class302Api.md#fetch_supported_model_api_union_video_model_list_get) | **GET** /api/union/video/model/list | 获取支持的模型列表
*Class302Api* | [**query_task_status_api_union_video_async_task_id_status_get**](docs/Class302Api.md#query_task_status_api_union_video_async_task_id_status_get) | **GET** /api/union/video/async/{task_id}/status | 异步查询任务状态
*Class302Api* | [**submit_task_api_union_video_async_generate_video_post**](docs/Class302Api.md#submit_task_api_union_video_async_generate_video_post) | **POST** /api/union/video/async/generate/video | 异步提交任务
*Class302Api* | [**sync_gen_image_api_union_img_sync_generate_image_post**](docs/Class302Api.md#sync_gen_image_api_union_img_sync_generate_image_post) | **POST** /api/union/img/sync/generate/image | 生图
*Class302aiApiApi* | [**async_gen_video_api302_jm_async_generate_video_post**](docs/Class302aiApiApi.md#async_gen_video_api302_jm_async_generate_video_post) | **POST** /api/302/jm/async/generate/video | 异步生成视频,提交任务
*Class302aiApiApi* | [**async_query_video_status_api302_jm_async_query_status_get**](docs/Class302aiApiApi.md#async_query_video_status_api302_jm_async_query_status_get) | **GET** /api/302/jm/async/query/status | 异步查询生成视频的任务状态
*Class302aiApiApi* | [**sync_generate_video_v2_api302_jm_sync_generate_video_post**](docs/Class302aiApiApi.md#sync_generate_video_v2_api302_jm_sync_generate_video_post) | **POST** /api/302/jm/sync/generate/video | 【302ai】同步:生成视频v2,支持通过图片文件生成视频
*Class302aiMidjourneyApi* | [**async_gen_image_api302_mj_async_generate_image_post**](docs/Class302aiMidjourneyApi.md#async_gen_image_api302_mj_async_generate_image_post) | **POST** /api/302/mj/async/generate/image | 异步提交生图任务
*Class302aiMidjourneyApi* | [**async_query_status_api302_mj_async_query_status_get**](docs/Class302aiMidjourneyApi.md#async_query_status_api302_mj_async_query_status_get) | **GET** /api/302/mj/async/query/status | 异步查询任务状态
*Class302aiMidjourneyApi* | [**async_query_task_status_api302_mj_video_async_task_status_post**](docs/Class302aiMidjourneyApi.md#async_query_task_status_api302_mj_video_async_task_status_post) | **POST** /api/302/mj/video/async/task/status | 异步查询生成任务进度
*Class302aiMidjourneyApi* | [**cancel_task_api302_mj_task_cancel_post**](docs/Class302aiMidjourneyApi.md#cancel_task_api302_mj_task_cancel_post) | **POST** /api/302/mj/task/cancel | 取消任务
*Class302aiMidjourneyApi* | [**desc_img_by_file_api302_mj_sync_file_img_describe_post**](docs/Class302aiMidjourneyApi.md#desc_img_by_file_api302_mj_sync_file_img_describe_post) | **POST** /api/302/mj/sync/file/img/describe | 通过文件获取生图的提示词
*Class302aiMidjourneyApi* | [**describe_image_api_api302_mj_sync_img_describe_post**](docs/Class302aiMidjourneyApi.md#describe_image_api_api302_mj_sync_img_describe_post) | **POST** /api/302/mj/sync/img/describe | 获取图像描述
*Class302aiMidjourneyApi* | [**generate_image_sync_api302_mj_sync_image_post**](docs/Class302aiMidjourneyApi.md#generate_image_sync_api302_mj_sync_image_post) | **POST** /api/302/mj/sync/image | 同步生成图片接口
*Class302aiMidjourneyApi* | [**submit_task_api302_mj_video_async_submit_post**](docs/Class302aiMidjourneyApi.md#submit_task_api302_mj_video_async_submit_post) | **POST** /api/302/mj/video/async/submit | 异步提交生成视频任务
*Class302aiMidjourneyApi* | [**sync_gen_video_api302_mj_video_sync_generate_video_post**](docs/Class302aiMidjourneyApi.md#sync_gen_video_api302_mj_video_sync_generate_video_post) | **POST** /api/302/mj/video/sync/generate/video | 同步生成视频【text+img-->video】
*Class302aiVeoApi* | [**get_task_status_api302_veo_video_task_task_id_get**](docs/Class302aiVeoApi.md#get_task_status_api302_veo_video_task_task_id_get) | **GET** /api/302/veo/video/task/{task_id} | 异步: 获取任务执行状态
*Class302aiVeoApi* | [**submit_iv_submit_api302_veo_video_async_submit_post**](docs/Class302aiVeoApi.md#submit_iv_submit_api302_veo_video_async_submit_post) | **POST** /api/302/veo/video/async/submit | 异步:text-->video or text + img --> video
*Class302aiVeoApi* | [**sync_img2video_api302_veo_video_sync_generate_video_post**](docs/Class302aiVeoApi.md#sync_img2video_api302_veo_video_sync_generate_video_post) | **POST** /api/302/veo/video/sync/generate/video | 同步: 生成视频【文本+图片 OR 文生成视频】
*ComfyuiApi* | [**get_running_node_api_comfy_fetch_running_node_get**](docs/ComfyuiApi.md#get_running_node_api_comfy_fetch_running_node_get) | **GET** /api/comfy/fetch/running/node | 根据任务数,获取运行节点
*ComfyuiApi* | [**query_task_status_api_comfy_async_task_status_get**](docs/ComfyuiApi.md#query_task_status_api_comfy_async_task_status_get) | **GET** /api/comfy/async/task/status | 查询任务状态
*ComfyuiApi* | [**submit_task_api_comfy_async_submit_task_post**](docs/ComfyuiApi.md#submit_task_api_comfy_async_submit_task_post) | **POST** /api/comfy/async/submit/task | 异步提交任务
*ComfyuiApi* | [**sync_execute_workflow_api_comfy_sync_execute_workflow_post**](docs/ComfyuiApi.md#sync_execute_workflow_api_comfy_sync_execute_workflow_post) | **POST** /api/comfy/sync/execute/workflow | 同步执行comfy工作流
*DefaultApi* | [**root_get**](docs/DefaultApi.md#root_get) | **GET** / | Root
*Hedra20Api* | [**internal_upload_file_api302_hedra_v2_upload_post**](docs/Hedra20Api.md#internal_upload_file_api302_hedra_v2_upload_post) | **POST** /api/302/hedra/v2/upload | 上传文件到hedra服务器仅支持,image, audio
*Hedra20Api* | [**query_task_status_api302_hedra_v2_task_status_get**](docs/Hedra20Api.md#query_task_status_api302_hedra_v2_task_status_get) | **GET** /api/302/hedra/v2/task/status | 查询任务状态
*Hedra20Api* | [**submit_character_task_api302_hedra_v2_submit_task_post**](docs/Hedra20Api.md#submit_character_task_api302_hedra_v2_submit_task_post) | **POST** /api/302/hedra/v2/submit/task | 提交口型合成任务
*Hedra30Api* | [**handler_hedra_task_submit_api302_hedra_v3_submit_task_post**](docs/Hedra30Api.md#handler_hedra_task_submit_api302_hedra_v3_submit_task_post) | **POST** /api/302/hedra/v3/submit/task | 异步提交任务
*Hedra30Api* | [**handler_query_task_status_api302_hedra_v3_task_status_get**](docs/Hedra30Api.md#handler_query_task_status_api302_hedra_v3_task_status_get) | **GET** /api/302/hedra/v3/task/status | 查询任务状态
*Hedra30Api* | [**upload_file_to_hedra_api302_hedra_v3_file_upload_post**](docs/Hedra30Api.md#upload_file_to_hedra_api302_hedra_v3_file_upload_post) | **POST** /api/302/hedra/v3/file/upload | 上传文件到hedra平台,返回资源的id
*LlmApi* | [**google_file_upload**](docs/LlmApi.md#google_file_upload) | **POST** /api/llm/google/vertex-ai/upload | 上传文件到谷歌存储,用于gemini视觉功能
*LlmApi* | [**invoke_gemini_ai_api_llm_google_chat_post**](docs/LlmApi.md#invoke_gemini_ai_api_llm_google_chat_post) | **POST** /api/llm/google/chat | 调用google推理
*LlmApi* | [**invoke_media_analysis_api_llm_google_sync_media_analysis_post**](docs/LlmApi.md#invoke_media_analysis_api_llm_google_sync_media_analysis_post) | **POST** /api/llm/google/sync/media/analysis | 【同步适合小文件】gemini多模态分析,支持视频,音频,图片
*LlmApi* | [**llm_chat**](docs/LlmApi.md#llm_chat) | **POST** /api/llm/chat | 调用大模型进行推理
*LlmApi* | [**llm_supported_models**](docs/LlmApi.md#llm_supported_models) | **GET** /api/llm/model/list | 获取支持的模型列表
*LlmApi* | [**llm_task_id**](docs/LlmApi.md#llm_task_id) | **GET** /api/llm/task/status | 查询推理过程结果
*LlmApi* | [**submit_media_inference_api_llm_google_async_media_analysis_post**](docs/LlmApi.md#submit_media_inference_api_llm_google_async_media_analysis_post) | **POST** /api/llm/google/async/media/analysis | 【异步适合需要长时间的推理过程】gemini多模态分析,支持视频,音频,图片
*MidjourneyApi* | [**async_gen_image_api_mj_async_generate_image_post**](docs/MidjourneyApi.md#async_gen_image_api_mj_async_generate_image_post) | **POST** /api/mj/async/generate/image | 异步提交生图任务
*MidjourneyApi* | [**async_query_status_api_mj_async_query_status_get**](docs/MidjourneyApi.md#async_query_status_api_mj_async_query_status_get) | **GET** /api/mj/async/query/status | 异步查询任务状态
*MidjourneyApi* | [**desc_img_by_file_api_mj_sync_file_img_describe_post**](docs/MidjourneyApi.md#desc_img_by_file_api_mj_sync_file_img_describe_post) | **POST** /api/mj/sync/file/img/describe | 通过文件获取生图的提示词
*MidjourneyApi* | [**describe_image_api_api_mj_sync_img_describe_post**](docs/MidjourneyApi.md#describe_image_api_api_mj_sync_img_describe_post) | **POST** /api/mj/sync/img/describe | 获取图像描述
*MidjourneyApi* | [**generate_image_api_api_mj_generate_image_post**](docs/MidjourneyApi.md#generate_image_api_api_mj_generate_image_post) | **POST** /api/mj/generate-image | 生成图片
*MidjourneyApi* | [**generate_image_sync_api_mj_sync_image_post**](docs/MidjourneyApi.md#generate_image_sync_api_mj_sync_image_post) | **POST** /api/mj/sync/image | 同步生成图片接口
*MidjourneyApi* | [**health_check_api_mj_health_get**](docs/MidjourneyApi.md#health_check_api_mj_health_get) | **GET** /api/mj/health | 健康检查
*MidjourneyApi* | [**prompt_check_api_mj_prompt_check_get**](docs/MidjourneyApi.md#prompt_check_api_mj_prompt_check_get) | **GET** /api/mj/prompt/check | 🔥图片提示词预审
*MidjourneyapiApi* | [**async_query_task_status_api_mj_video_async_task_status_post**](docs/MidjourneyapiApi.md#async_query_task_status_api_mj_video_async_task_status_post) | **POST** /api/mj/video/async/task/status | 异步查询生成任务进度
*MidjourneyapiApi* | [**health_check_api_mj_video_health_get**](docs/MidjourneyapiApi.md#health_check_api_mj_video_health_get) | **GET** /api/mj/video/health | 健康检查
*MidjourneyapiApi* | [**submit_video_task_api_mj_video_async_submit_post**](docs/MidjourneyapiApi.md#submit_video_task_api_mj_video_async_submit_post) | **POST** /api/mj/video/async/submit | 异步提交生成视频任务
*MidjourneyapiApi* | [**sync_submit_task_api_mj_video_sync_gen_post**](docs/MidjourneyapiApi.md#sync_submit_task_api_mj_video_sync_gen_post) | **POST** /api/mj/video/sync/gen | 同步生成视频视频
*OmniHumanApi* | [**query_img_recognition_status_api_ark_omnihuman_task_status_get**](docs/OmniHumanApi.md#query_img_recognition_status_api_ark_omnihuman_task_status_get) | **GET** /api/ark/omnihuman/task/status | 查询任务状态
*OmniHumanApi* | [**submit_img_recognition_api_ark_omnihuman_img_recognition_post**](docs/OmniHumanApi.md#submit_img_recognition_api_ark_omnihuman_img_recognition_post) | **POST** /api/ark/omnihuman/img/recognition | 提交图片检测任务,图片中是否包含人、类人、拟人等主体
*OmniHumanApi* | [**submit_video_generate_task_api_ark_omnihuman_video_submit_task_post**](docs/OmniHumanApi.md#submit_video_generate_task_api_ark_omnihuman_video_submit_task_post) | **POST** /api/ark/omnihuman/video/submit/task | 提交视频生成任务


## 模型文档

 - [FileUploadResponse](docs/FileUploadResponse.md) - 文件上传响应
 - [HttpValidationError](docs/HttpValidationError.md) - HTTP 验证错误
 - [TaskRequest](docs/TaskRequest.md) - 任务请求
 - [ValidationError](docs/ValidationError.md) - 验证错误
 - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) - 验证错误位置内部


## 示例

### 快速开始 - 健康检查

```rust
use text_video_agent_client::apis::configuration::Configuration;
use text_video_agent_client::apis::{default_api, llm_api};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = Configuration {
        base_path: "https://bowongai-dev--text-video-agent-fastapi-app.modal.run".to_string(),
        ..Default::default()
    };

    // 测试连接
    let response = default_api::root_get(&config).await?;
    println!("连接成功: {}", response);

    // 获取支持的模型
    let models = llm_api::llm_supported_models(&config).await?;
    println!("可用模型: {}", models);

    Ok(())
}
```

### LLM 聊天

```rust
use text_video_agent_client::apis::{configuration::Configuration, llm_api};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = Configuration {
        base_path: "https://bowongai-dev--text-video-agent-fastapi-app.modal.run".to_string(),
        ..Default::default()
    };

    // LLM 聊天
    let response = llm_api::llm_chat(
        &config,
        "你好，请介绍一下你自己",
        None,           // model_name
        Some(0.7),      // temperature
        Some(1000),     // max_tokens
        Some(30.0),     // timeout
    ).await?;

    println!("AI 回复: {}", response);
    Ok(())
}
```

### Midjourney 图像生成

```rust
use text_video_agent_client::apis::{configuration::Configuration, midjourney_api};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = Configuration {
        base_path: "https://bowongai-dev--text-video-agent-fastapi-app.modal.run".to_string(),
        ..Default::default()
    };

    // 异步图像生成
    let response = midjourney_api::async_gen_image_api_mj_async_generate_image_post(
        &config,
        "a beautiful sunset over mountains, digital art",
        None, // img_file
    ).await?;

    println!("图像生成任务: {}", response);
    Ok(())
}
```

## 运行测试示例

我们提供了多个测试示例来验证 API 功能：

### 使用测试脚本（推荐）

**Windows (PowerShell):**
```powershell
cd cargos/text-video-agent-rust-sdk
.\run_tests.ps1
```

**Linux/macOS (Bash):**
```bash
cd cargos/text-video-agent-rust-sdk
./run_tests.sh
```

### 手动运行单个测试

```bash
# 健康检查测试
cargo run --example health_check

# LLM 聊天测试
cargo run --example llm_chat_test

# Midjourney 图像生成测试
cargo run --example midjourney_image_test

# 文件上传和媒体分析测试
cargo run --example file_upload_test

# 综合功能测试
cargo run --example comprehensive_test
```

### 测试示例说明

1. **health_check.rs** - 基础健康检查，验证 API 连接和服务状态
2. **llm_chat_test.rs** - 测试大语言模型聊天功能，包括交互式聊天
3. **midjourney_image_test.rs** - 测试 Midjourney 图像生成功能
4. **file_upload_test.rs** - 测试文件上传和媒体分析功能
5. **comprehensive_test.rs** - 综合测试，包含性能测试和结果汇总

## API 分类

客户端提供对以下 API 分类的访问：

- **DefaultApi** - 核心功能（模板、文件上传、健康检查）
- **ApiApi** - 任务管理和基本操作
- **Class302Api** - 302AI 集成服务
- **Class302aiApiApi** - 302AI 即梦视频生成
- **Class302aiMidjourneyApi** - 302AI Midjourney 集成
- **Class302aiVeoApi** - 302AI VEO 视频生成
- **ComfyuiApi** - ComfyUI 工作流执行
- **Hedra20Api** - Hedra 2.0 唇形同步服务
- **Hedra30Api** - Hedra 3.0 唇形同步服务
- **LlmApi** - 大语言模型集成
- **MidjourneyApi** - Midjourney 图像生成
- **MidjourneyapiApi** - Midjourney 视频生成
- **OmniHumanApi** - 数字人服务

## 文档

要访问完整的 API 文档：

```bash
cargo doc --open
```

或访问 [docs.rs/text_video_agent_client](https://docs.rs/text_video_agent_client)

## 贡献

此客户端是从 OpenAPI 规范自动生成的。对于与 API 本身相关的问题，请联系 API 提供商。对于此 Rust 客户端的问题，请在仓库中提交 issue。

## 许可证

根据以下任一许可证授权：

- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) 或 http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) 或 http://opensource.org/licenses/MIT)

您可以选择其中任何一个。

## 作者



