You need to enable JavaScript to run this app.
导航
CreateBatchInferenceJob - 创建批量推理任务
最近更新时间:2024.09.29 10:33:19首次发布时间:2024.09.29 10:33:19

创建批量推理任务

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

CreateBatchInferenceJob

要执行的操作,取值:CreateBatchInferenceJob。

Version
String

2024-01-01

API的版本,取值:2024-01-01。

Name
String

-

批量推理任务名称

Description
String

-

批量推理任务描述

ProjectName
String

-

项目名称

Tags
Array of Object

-

批量推理任务绑定的标签

ModelReference
Object

-

批量推理选择的模型

InputFileTosLocation
Object

-

批量推理输入的文件

OutputDirTosLocation
Object

-

批量推理任务输出结果的文件夹

CompletionWindow
String

-

批量推理任务的最大等待时间,从任务提交时间开始计时,单位为“天”,取值:"1d~28d",如"3d",只支持整数天。默认值为"28d"

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
Id
String

-

批量推理任务的ID

请求示例

POST /?Action=CreateBatchInferenceJob&Version=2024-01-01 HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20240514T132743Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240514/cn-beijing/ark/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
    "Name": "批量推理任务",
    "Description": "这是一个批量推理任务",
    "ModelReference": {
      "FoundationModel": {
        "Name": "Doubao-pro-32k",
        "ModelVersion": "240615"
      }
    },
    "InputFileTosLocation": {
      "BucketName": "my-bucket-name",
      "ObjectKey": "batch-inference-job/dataset/my-job.jsonl"
    },
    "OutputDirTosLocation": {
      "ObjectKey": "batch-inference-job/output/",
      "BucketName": "my-bucket-name"
    },
    "ProjectName":"default",
    "CompletionWindow": "1d",
    "Tags": [
      {
        "Key": "test_key",
        "Value": "test_value"
      }
    ]
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "20240918194640ECB302768CB287CEDAC6",
    "Action": "CreateBatchInferenceJob",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "cn-beijing"
  },
  "Result": {
    "Id": "bi-20240918194641-r2nwq"
  }
}

错误码

您可访问公共错误码,获取更多错误码信息。