Batch API Reference
Batch image edit contract
Batch endpoint allows batch processing of images by specifying a cloud Storage directory as input. See Storage overview for more info.
In other aspects, the Batch endpoint behaves like the Async endpoint, returning a response without waiting for an actual result that should be queried with another request.
By default, it is expected that the images will be located in the root of the cloud directory that is specified in the input
field. To retrieve all images from subdirectories recursively, the input
field should have the recursive
parameter as following:
In the Batch endpoint you could also set input as list of publicly accessible URLs, so our service can fetch and process them:
Request image processing
The request body for Batch endpoint is the same as for regular image edit operation, except Storage directories are allowed for input
and output
parameters. See Image edit contract for more info.
Request
Read a response
Once you have made the request to https://api.claid.ai/v1-beta1/image/edit/batch
you will get a response with information about request status and other details, see the Read a response part of the Async endpoint page for more info.
Response body
See the Request Headers and Response Headers to learn about headers.
Result of request processing contract
To get Batch image editing result, you need to know the ID of the processing request. Or you can take a ready-to-use link from the result_url
property of the response body described above.
Request
Read a response
Once you have made the request to https://api.claid.ai/v1-beta1/image/edit/batch/<task_id>
you will get a response with information about the request, input, and output images.
Image information shown in the response:
Parameter | Type | Description |
---|---|---|
id | integer | Task ID. |
status | string | Request processing status. Can have values: |
created_at | string | Exact time when the processing was requested. |
request | object | The body of the request that was used for processing. |
errors | list | List of errors, if any are occurred during image processing ( |
results | list | List of results in form of |
See input_object
and output_object
properties description at the Read a response part of the Async endpoint page.
Response body
See Response headers to learn about headers.
Last updated