Turns a picture into words by what it shows: a list of labels with their scores, and one text to search with. It does not read the text printed in the picture.
https://api.opensolr.com/solr_manager/api/image_clipemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
index_nameRequiredYour index. Its owner's AI allowance is used.
imageOne of the twoOne picture: a multipart file, or its base64 (a data: prefix is fine). At most 20 MB.
imagesOne of the twoUp to 10 pictures, as a JSON array of base64 strings.
top_kOptionalHow many labels, 1 to 50. Default 15.
02 · Example
curl -s -X POST "https://api.opensolr.com/solr_manager/api/image_clip" \ -F "email=YOUR_EMAIL" -F "api_key=YOUR_API_KEY" -F "index_name=my_index" \ -F "top_k=5" -F "image=@photo.jpg"
03 · Answer
{ "status": true, "text": "red bicycle, street, city", "labels": [ { "label": "red bicycle", "score": 0.31 }, { "label": "street", "score": 0.22 } ], "model": "..." }
With images: {"status": true, "results": [...], "charged": N}, one answer like the one above per picture, in the same order. A bad picture fails alone, with its own msg. Values shown are an example.
Only pictures the model reads count against the AI allowance; a picture read before costs nothing. Every plan includes a monthly allowance of AI requests: API Quota, Pricing. The allowance used is the one of the account that owns the index.
04 · Errors
INVALID_IMAGEHTTP 400No picture, or not clean base64.
UPLOAD_FAILEDHTTP 400The multipart upload did not arrive whole.
IMAGE_TOO_LARGE_MAX_20_MBHTTP 413The picture is larger than 20 MB.
UNSUPPORTED_IMAGE_TYPE_...HTTP 415Not a JPEG, PNG, WebP, GIF, BMP, TIFF, JPEG 2000, HEIC, HEIF or AVIF picture. The type is read from the bytes, not from the name.
IMAGES_MUST_BE_A_NON_EMPTY_ARRAYHTTP 400images is empty or not a list.
MAX_10_IMAGES_PER_CALLHTTP 400More than 10 pictures.
ERROR_NOT_CORE_OWNERHTTP 404The index is not yours.
VECTOR_NOT_ALLOWEDHTTP 403AI is switched off on the plan of the index owner.
ERROR_AI_MONTHLY_QUOTA_EXCEEDEDHTTP 429The monthly AI allowance is used up.
IMAGE_CLIP_FAILEDHTTP 200The picture could not be read. Retry.
WRONG_API_HOSTHTTP 404Called on opensolr.com.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
05 · Related
Words and their vector in one call: image_index. Words plus the text in the picture: image_to_text.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.