Handle thousands of requests efficiently
OnlyOneAPI's batch processing allows you to process large volumes of data efficiently with a single API call.
// Batch processing example
const batchData = {
items: [
{ id: 1, text:"First document to process" },
{ id: 2, text:"Second document to process" },
{ id: 3, text:"Third document to process" }
],
operation:"sentiment-analysis"
};
const response = await fetch('https://api.onlyoneapi.com/v1/batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(batchData)
});