3.5 KiB
3.5 KiB
\Hedra30Api
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| handler_hedra_task_submit_api302_hedra_v3_submit_task_post | POST /api/302/hedra/v3/submit/task | 异步提交任务 |
| handler_query_task_status_api302_hedra_v3_task_status_get | GET /api/302/hedra/v3/task/status | 查询任务状态 |
| upload_file_to_hedra_api302_hedra_v3_file_upload_post | POST /api/302/hedra/v3/file/upload | 上传文件到hedra平台,返回资源的id |
handler_hedra_task_submit_api302_hedra_v3_submit_task_post
serde_json::Value handler_hedra_task_submit_api302_hedra_v3_submit_task_post(img_file, audio_file, prompt, resolution, aspect_ratio) 异步提交任务
Parameters
| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| img_file | std::path::PathBuf | 图片文件 | [required] | |
| audio_file | std::path::PathBuf | 音频文件 | [required] | |
| prompt | Option<String> | 文本提示词 | [default to ] | |
| resolution | Option<String> | 分辨率支持: 720p, 540p | [default to 720p] | |
| aspect_ratio | Option<String> | 尺寸: 1:1, 16:9, 9:16 | [default to 1:1] |
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]
handler_query_task_status_api302_hedra_v3_task_status_get
serde_json::Value handler_query_task_status_api302_hedra_v3_task_status_get(task_id) 查询任务状态
Parameters
| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| task_id | String | 任务id | [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]
upload_file_to_hedra_api302_hedra_v3_file_upload_post
serde_json::Value upload_file_to_hedra_api302_hedra_v3_file_upload_post(local_file, purpose) 上传文件到hedra平台,返回资源的id
Parameters
| Name | Type | Description | Required | Notes |
|---|---|---|---|---|
| local_file | std::path::PathBuf | 待上传的文件,支持音频,图片 | [required] | |
| purpose | Option<String> | 上传文件的用途: 支持\"image\" \"audio\" \"video\" \"voice\" | [default to image] |
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]