Modify vector store

POST /vector_stores/{vector_store_id}

Modifies a vector store.

Path parameters

application/json

Body Required

  • name string | null

    The name of the vector store.

  • The expiration policy for a vector store.

    Hide expires_after attributes Show expires_after attributes object
    • anchor string Required

      Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.

      Value is last_active_at.

    • days integer Required

      The number of days after the anchor time that the vector store will expire.

      Minimum value is 1, maximum value is 365.

  • metadata object | null

    Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      The identifier, which can be referenced in API endpoints.

    • object string Required

      The object type, which is always vector_store.

      Value is vector_store.

    • created_at integer Required

      The Unix timestamp (in seconds) for when the vector store was created.

    • name string Required

      The name of the vector store.

    • usage_bytes integer Required

      The total number of bytes used by the files in the vector store.

    • file_counts object Required
      Hide file_counts attributes Show file_counts attributes object
      • in_progress integer Required

        The number of files that are currently being processed.

      • completed integer Required

        The number of files that have been successfully processed.

      • failed integer Required

        The number of files that have failed to process.

      • cancelled integer Required

        The number of files that were cancelled.

      • total integer Required

        The total number of files.

    • status string Required

      The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use.

      Values are expired, in_progress, or completed.

    • The expiration policy for a vector store.

      Hide expires_after attributes Show expires_after attributes object
      • anchor string Required

        Anchor timestamp after which the expiration policy applies. Supported anchors: last_active_at.

        Value is last_active_at.

      • days integer Required

        The number of days after the anchor time that the vector store will expire.

        Minimum value is 1, maximum value is 365.

    • expires_at integer | null

      The Unix timestamp (in seconds) for when the vector store will expire.

    • last_active_at integer | null Required

      The Unix timestamp (in seconds) for when the vector store was last active.

    • metadata object | null Required

      Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

POST /vector_stores/{vector_store_id}
curl \
 -X POST https://api.openai.com/v1/vector_stores/{vector_store_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","expires_after":{"anchor":"last_active_at","days":42},"metadata":{}}'
Request example
{
  "name": "string",
  "expires_after": {
    "anchor": "last_active_at",
    "days": 42
  },
  "metadata": {}
}
Response examples (200)
{
  "id": "string",
  "object": "vector_store",
  "created_at": 42,
  "name": "string",
  "usage_bytes": 42,
  "file_counts": {
    "in_progress": 42,
    "completed": 42,
    "failed": 42,
    "cancelled": 42,
    "total": 42
  },
  "status": "expired",
  "expires_after": {
    "anchor": "last_active_at",
    "days": 42
  },
  "expires_at": 42,
  "last_active_at": 42,
  "metadata": {}
}