Batch Requests
To make a batch request, append the product features in an array
Request Object Format
The batch request data sent to the API should be appended to the JSON array:
Key
Type
Value
id
required
string
It is used to uniquely identify the request and will be included in the response. Must be unique for each product in the array.
imageurl
optional
string
List of Image URLs for the product.
text
optional
string
It contains the textual product description.
NOTE: It is advised to use a Webhook listener for Batch Requests, as they require more time to process.
Example Request
CASE 1: Multiple-Object Image without Webhook endpoint
curl --location --request POST 'https://api.frenzy.ai/imageUrlTextProcess' \
--header 'Content-Type: application/json' \
--header 'X-Frenzy-Authorization: API_KEY' \
--data-raw '[
{
"id": "1",
"imageurl": "http://image_url_1",
"text": "product description of the image_1"
},
{
"id": "2",
"imageurl": "http://image_url_2",
"text": "product description of the image_2"
}
]'
CASE 2: Multiple-Object Image with Webhook endpoint
curl --location --request POST 'https://api.frenzy.ai/imageUrlTextProcess' \
--header 'Content-Type: application/json' \
--header 'X-Frenzy-Authorization: API_KEY' \
--header 'X-Frenzy-Webhook-Endpoint: https://webhook_endpoint' \
--data-raw '[
{
"id": "1",
"imageurl": "http://image_url_1",
"text": "product description of the image_1"
},
{
"id": "2",
"imageurl": "http://image_url_2",
"text": "product description of the image_2"
}
]'
CASE 3: Single-Object Image without Webhook endpoint
curl --location --request POST 'https://api.frenzy.ai/imageUrlTextProcess' \
--header 'Content-Type: application/json' \
--header 'X-Frenzy-Authorization: API_KEY' \
--header 'X-Frenzy-Single-Object-Images: true' \
--data-raw '[
{
"id": "1",
"imageurl": "http://image_url_1",
"text": "product description of the image_1"
},
{
"id": "2",
"imageurl": "http://image_url_2",
"text": "product description of the image_2"
}
]'
CASE 4: Single-Object Image with Webhook endpoint
curl --location --request POST 'https://api.frenzy.ai/imageUrlTextProcess' \
--header 'Content-Type: application/json' \
--header 'X-Frenzy-Authorization: API_KEY' \
--header 'X-Frenzy-Single-Object-Images: true' \
--header 'X-Frenzy-Webhook-Endpoint: https://webhook_endpoint' \
--data-raw '[
{
"id": "1",
"imageurl": "http://image_url_1",
"text": "product description of the image_1"
},
{
"id": "2",
"imageurl": "http://image_url_2",
"text": "product description of the image_2"
}
]'
For more details about how to submit batch requests, see the batch requests page.
Last updated
Was this helpful?