# Image Search For Developers

### Setup

{% tabs %}
{% tab title="Python SDK" %}

```python
from vectorai import ViClient
vi = ViClient()
```

{% endtab %}

{% tab title="Python API" %}

```python
import requests 
requests.post(
```

{% endtab %}
{% endtabs %}

You can search images using the endpoint when encoding as below.

{% tabs %}
{% tab title="Python SDK" %}

```
search_results = vi_client.search(
    collection_name,
    text_encoder.encode('samsung phone'), 
    'name_vector_',
    page_size=5, 
    page=1
)
```

{% endtab %}

{% tab title="Python API" %}

```
```

{% endtab %}
{% endtabs %}

### Image Search

You can search the images using the following

{% tabs %}
{% tab title="Python SDK" %}

```
vi_client.show_json(
    search_results,
    selected_fields=['_id', 'name', 'sku'],
    image_fields=['image_url'],
    image_width=100
)
```

{% endtab %}
{% endtabs %}

![](/files/-MUloHEmlVp0EmyX0qxX)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.getvectorai.com/vector-ai-documentation/search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
