---
title: "POST /PutVectors"
method: POST
path: "/PutVectors"
---

# POST /PutVectors

`POST /PutVectors`

Adds one or more vectors to a vector index. To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN).

For more information about limits, see [Limitations and restrictions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html) in the _Amazon S3 User Guide_.

When inserting vector data into your vector index, you must provide the vector data as `float32` (32-bit floating point) values. If you pass higher-precision values to an Amazon Web Services SDK, S3 Vectors converts the values to 32-bit floating point before storing them, and `GetVectors`, `ListVectors`, and `QueryVectors` operations return the float32 values. Different Amazon Web Services SDKs may have different default numeric types, so ensure your vectors are properly formatted as `float32` values regardless of which SDK you're using. For example, in Python, use `numpy.float32` or explicitly cast your values.

Permissions

You must have the `s3vectors:PutVectors` permission to use this operation.

## Request body

- object
  - `vectorBucketName` string — The name of the vector bucket that contains the vector index.
  - `indexName` string — The name of the vector index where you want to write vectors.
  - `indexArn` string — The ARN of the vector index where you want to write vectors.
  - `vectors` PutInputVector[], required — The vectors to add to a vector index. The number of vectors in a single request must not exceed the resource capacity, otherwise the request will be rejected with the error <code>ServiceUnavailableException</code> with the error message "Currently unable to handle the request".
    - `key` string, required — The name of the vector. The key uniquely identifies the vector in a vector index.
    - `data` object, required — <p>The vector data of the vector. </p> <p>Vector dimensions must match the dimension count that's configured for the vector index.</p> <ul> <li> <p>For the <code>cosine</code> distance metric, zero vectors (vectors containing all zeros) aren't allowed.</p> </li> <li> <p>For both <code>cosine</code> and <code>euclidean</code> distance metrics, vector data must contain only valid floating-point values. Invalid values such as NaN (Not a Number) or Infinity aren't allowed.</p> </li> </ul>
      - `float32` Float[] — The vector data as 32-bit floating point numbers. The number of elements in this array must exactly match the dimension of the vector index where the operation is being performed.
    - `metadata` object — Metadata about the vector. All metadata entries undergo validation to ensure they meet the format requirements for size and data types.

## Response `200`

Success

- PutVectorsOutput

## Other responses

- `480` — ValidationException
- `481` — ServiceUnavailableException
- `482` — TooManyRequestsException
- `483` — KmsInvalidKeyUsageException
- `484` — InternalServerException
- `485` — KmsInvalidStateException
- `486` — AccessDeniedException
- `487` — KmsNotFoundException
- `488` — RequestTimeoutException
- `489` — NotFoundException
- `490` — ServiceQuotaExceededException
- `491` — KmsDisabledException

---

[API](https://skmtc.net/aws/apis/s3vectors.md) · [All operations](https://skmtc.net/aws/apis/s3vectors/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/s3vectors/versions/dc31037cd75b/schema)
