const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 'app_abc123',
inputs: {query: '请帮我分析这份采购单'},
files: [
{
url: 'https://example.com/purchase_order.pdf',
name: '采购单.pdf',
mime_type: 'application/pdf'
}
]
})
};
fetch('https://adp.laiye.com/open/agentic_engine/laiye/v1/app/run/create/task', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));