const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input_file_id: '<string>',
endpoint: '<string>',
completion_window: '<string>',
metadata: {},
debug: {
enabled: true,
return_upstream_request: true,
return_upstream_response: true,
trace: true,
trace_level: 'summary'
},
provider: {
order: ['<string>'],
only: ['<string>'],
ignore: ['<string>'],
include_alpha: true
}
})
};
fetch('https://api.phaseo.app/v1/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));