# Inserting with API - encoding before inserting

## Option 1 - Encoding Before Inserting

![Overall ](https://1051526003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTAoGc3QCIn04xUpURg%2F-MYwlDqVLBn9uyCs5kgl%2F-MYwmwrT5dW4Zq2hqtRE%2Fimage.png?alt=media\&token=d2be1772-b329-477a-a94e-7db0c09fad82)

Encoding before inserting can often be the best decision when you have a locally saved model and want to test it out without having to deploy it. This allows you to quickly test if the model will be a good fit (and is even faster if you are using the Vector AI API and SDK).&#x20;

If you are looking to insert, you will be using the following API endpoint.&#x20;

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

```python
import requests
url = "https://vectorai-development-api.azurewebsites.net/collection/bulk_insert" 
response = requests.post(
    url=url,
        json={
        "username": "string",
        "api_key": "string",
        "collection_name": "string",
        "documents": [{},{}],
        "insert_date": true,
        "overwrite": true,
        "update_schema": true,
        "quick": false,
        "pipeline": [ ]
        }
    )
```

{% endtab %}

{% tab title="Javascript" %}

```
```

{% endtab %}
{% endtabs %}

The documentation for this endpoint can be found in the API.

If the collection name does not exist, Vector AI will automatically create a collection for you so you can just insert properly.
