Last updated 2 months ago
from aibrary import AiBrary aibrary = AiBrary() # 1 aibrary.image_embedding( providers="google", file=open("tests/assets/ocr-test.jpg", "rb").read(), file_name="test.jpg", ) # 2 aibrary.image_embedding( providers="google", file_url="https://builtin.com/sites/www.builtin.com/files/styles/ckeditor_optimize/public/inline-images/5_python-ocr.jpg", ) # 3 aibrary.image_embedding( providers="google", file="tests/assets/ocr-test.jpg" )
true
false
document
query
symetric
POST /v0/images/embeddings HTTP/1.1 Host: api.aibrary.dev Authorization: Bearer YOUR_SECRET_TOKEN Content-Type: multipart/form-data Accept: */* Content-Length: 202 { "providers": "text", "settings": "text", "response_as_dict": true, "attributes_as_list": false, "show_base_64": true, "show_original_response": false, "representation": "document", "file": "binary", "file_url": "text" }
Successful Response
No content