> For the complete documentation index, see [llms.txt](https://learn.getvectorai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.getvectorai.com/vector-search/inserting-into-vector-ai/400-inserting-with-api/400-inserting-with-api-encoding-before-inserting.md).

# Inserting with API - encoding before inserting

## Option 1 - Encoding Before Inserting

![Overall ](/files/-MYwmwrT5dW4Zq2hqtRE)

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://learn.getvectorai.com/vector-search/inserting-into-vector-ai/400-inserting-with-api/400-inserting-with-api-encoding-before-inserting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
