> For the complete documentation index, see [llms.txt](https://docs.aibrary.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aibrary.dev/image-features/image-embedding.md).

# Image Embedding

{% tabs %}
{% tab title="Image Embedding" %}

```python
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"
)
```

{% endtab %}
{% endtabs %}

{% openapi src="/files/u1xglWXuuEIddP7tD1Zz" path="/v0/images/embeddings" method="post" %}
[openapi.json](https://2030775142-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp4IwQOR0zSJQKAC7b7hY%2Fuploads%2FZmdgh4MpENDZM5KXzWso%2Fopenapi.json?alt=media\&token=8447eb12-defd-4341-9cea-91bc8eb1a9d0)
{% endopenapi %}
