---
title: "Insert embedded chunks into a vector database."
method: POST
path: "/v1/vector-io/insert"
tags: ["VectorIO"]
---

# Insert embedded chunks into a vector database.

`POST /v1/vector-io/insert`

Insert embedded chunks into a vector database.

## Request body

- InsertChunksRequest — Request body for inserting chunks into a vector store.
  - `vector_store_id` string, required — The ID of the vector store to insert chunks into.
  - `chunks` EmbeddedChunkInput[], required — The list of embedded chunks to insert.
    - `content` union, required
      - string
      - ImageContentItemInput — A image content item
        - `type` 'image'
        - `image` URLOrData, required — A URL or a base64 encoded string
          - `url` URL — A URL reference to external content.
            - `uri` string, required
          - `data` string, byte, nullable
      - TextContentItem — A text content item
        - `type` 'text'
        - `text` string, required
      - union[]
        - union
          - ImageContentItemInput — A image content item
            - `type` 'image'
            - `image` URLOrData, required — A URL or a base64 encoded string
              - …
          - TextContentItem — A text content item
            - `type` 'text'
            - `text` string, required
    - `chunk_id` string, required
    - `metadata` object
    - `chunk_metadata` ChunkMetadata, required — `ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata` is set during chunk creation in `FileSearchToolRuntimeImpl().insert()`and is not expected to change after. Use `Chunk.metadata` for metadata that will be used in the context during inference.
      - `chunk_id` string, nullable
      - `document_id` string, nullable
      - `source` string, nullable
      - `created_timestamp` integer, nullable
      - `updated_timestamp` integer, nullable
      - `chunk_window` string, nullable
      - `chunk_tokenizer` string, nullable
      - `content_token_count` integer, nullable
      - `metadata_token_count` integer, nullable
    - `embedding` number[], required
    - `embedding_model` string, required
    - `embedding_dimension` integer, required
  - `ttl_seconds` integer, nullable — Time-to-live in seconds for the inserted chunks.

## Response `204`

Chunks were inserted.

## Other responses

- `400` — The request was invalid or malformed
- `429` — The client has sent too many requests in a given amount of time
- `500` — The server encountered an unexpected error
- `default` — An error occurred

---

[API](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis.md) · [All operations](https://skmtc.net/ogx-ai/apis/ogx-specification-stable-experimental-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ogx-ai/ogx-specification-stable-experimental-apis/revisions/f3f783962256/schema)
