跳转到主要内容
POST
/
open
/
agentic_engine
/
laiye
/
files
/
upload
文件上传
const form = new FormData();
form.append('chunk', '<string>');
form.append('application_id', '<string>');
form.append('sharing_scope', 'application');

const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};

options.body = form;

fetch('https://adp.laiye.com/open/agentic_engine/laiye/files/upload', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "code": "<string>",
  "message": "<string>",
  "tips": "<string>",
  "data": {
    "id": "<string>",
    "file_name": "<string>",
    "file_size": 123,
    "content_type": "<string>",
    "download_url": "<string>",
    "status": "<string>"
  }
}

授权

X-API-Key
string
header
必填

工作流智能引擎 API 访问密钥。

请求体

multipart/form-data
chunk
file
必填
application_id
string
sharing_scope
enum<string>
默认值:application
可用选项:
user,
application

响应

文件信息。

code

业务码。成功通常为 success 或 200。

message
string

返回信息。

tips
string | null

详细信息,默认为空。

data
object