Authorization
Token-based authentication header in the form of
<YOUR_LAYERS_TOKEN>
.Headers
Body
Image file to upload. Supported formats: JPEG, JPG, PNG, WebP. Maximum file size: 15MB (15,360 KB).
Response
Status of the upload operation. Returns “success” on successful upload.
Unique UUID identifier for the uploaded image. Use this ID in the Image Search API to perform visual searches.
Usage
The Image Upload endpoint enables a two-step process for visual search:- Upload the image using this endpoint to receive an
imageId
- Search with the image using the
imageId
in the Image Search API
- Better performance: Avoids repeated base64 encoding/decoding
- Caching: Processed image embeddings are cached for faster subsequent searches
- Reduced payload size: Use lightweight UUID instead of large base64 strings
Error Responses
Validation errors returned when the request fails validation.
- File required: No image file provided
- Invalid file type: File format not supported (must be JPEG, JPG, PNG, or WebP)
- File too large: Image exceeds 15MB size limit