Our API offers a suite of services accessible via HTTP calls, each operating asynchronously to enhance performance and responsiveness. Upon each service request, a unique process ID is returned, enabling you to track the processing status and access results when available.
How it works
-
Service Requests and Process IDs
When a service is requested, an HTTP call to the API will initiate the process, and a process ID is returned. This ID serves as a unique identifier for tracking the status of that specific request. -
Polling for Status Updates
To check the progress of a service, use our polling route by providing the process ID. The polling route will return the current status of the request (e.g., pending, in progress, completed) along with relevant information, including the result if processing is complete. See more on βοΈ Get Process Status -
Optional Webhook Integration
For additional flexibility, you can include a webhook URL in the initial request payload. When provided, this webhook will automatically send a callback with the processing results once completed, eliminating the need for continuous polling.
β οΈ Important usage guidelines
Every enhancement request submitted to the system is processed and considered billable. This means sending the same image multiple times will result in multiple billable enhancement requests. For example, sending an image three times for enhancement will count as three separate requests, each billed individually.
Best Practices:
-
Check for Duplicate Requests: Before submitting an image for enhancement, ensure that the image hasn't already been processed. This will help you avoid unnecessary duplicate requests, which will be billed multiple times.
-
Implement Retry Logic:
- Use retry mechanisms that follow HTTP error code handling best practices. For example, if you receive a
500 Internal Server Error
, consider implementing exponential backoff in your retry logic. - Set a Retry Limit: Ensure a maximum retry limit is in place to prevent excessive requests, which can lead to unexpected billing.
- Use retry mechanisms that follow HTTP error code handling best practices. For example, if you receive a
By adhering to these guidelines, you can avoid redundant or unwanted billable requests and ensure that your usage of the API is both efficient and cost-effective.
Image input specifications
When adding an image to the request payload, it is essential to adhere to the following guidelines to ensure the image is processed correctly:
- Maximum Payload Size: The file must be no larger than 15 MB.
- Supported File Formats: The following formats are accepted: JPG/PNG/Webp/HEIC/HEIF
- β οΈ Note that HEIC/HEIF formats may increase processing time.
Please ensure your images conform to these specifications to avoid processing errors.
Handling High-Resolution Images
In the case of our API, if an input image exceeds the dimension (4096 x 2160 pixels), we will automatically resize it to fit within the dimension limit. This ensures compatibility with our processing pipeline and maintains optimal performance across all services.
- Automatic Resizing: Images with dimensions larger than our limite will be resized proportionally to fit within the dimension (4096x2160 pixels) while preserving the aspect ratio.
- No Quality Loss: This resizing process does not degrade the image quality or alter its visual content. The resized image retains the same level of detail and fidelity.
- Consistent Output: The API will return the processed image in the resized format, ensuring consistent and predictable output across all requests.
- Processing time*: Note that may increase processing time
This approach allows us to efficiently handle large images while delivering high-quality results without requiring additional adjustments from our users.
Image masking
Some services, like Home Staging and Magic Eraser, support image masking for more precise control, more information are available on a dedicated page βΎImage Masking Explanation