Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

List vaults

GET/vaults

Lists vaults using ID-based pagination. See vaults.

Query ParametersExpand Collapse
after: optional string

Return resources after this resource ID in the selected order.

minLength0
maxLength1048576
limit: optional number

The maximum number of resources to return, between 1 and 100. Defaults to 20.

formatint64
minimum1
maximum100
metadata: optional map[string]

Exact string matches supplied as metadata[key]=value. All supplied pairs must match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512 characters. Filtering is eventually consistent; metadata changes may take time to appear.

order: optional "asc" or "desc"

The order in which resources are returned. Defaults to desc.

One of the following:
"asc"

Returns resources in ascending order.

"desc"

Returns resources in descending order.

status: optional VaultStatusFilter

Filter by one status or a list, such as status=active or status[]=active&status[]=archived. Both statuses are included by default.

One of the following:
VaultStatus = "active" or "archived"

Whether a vault or credential is active or archived.

One of the following:
"active"
"archived"
array of VaultStatus
One of the following:
"active"
"archived"
ReturnsExpand Collapse
data: array of Vault { id, created_at, metadata, 2 more }

The resources returned in this page, in the requested sort order.

id: string

The ID of the vault.

minLength0
created_at: number

The Unix timestamp, in seconds, when the vault was created.

formatint64
metadata: map[string]

Key-value pairs associated with the vault, such as an application or team identifier.

name: string or null

The human-readable name of the vault, if set.

minLength0
object: "vault"

The object type. Always vault.

first_id: string or null

The ID of the first resource in data, or null if the page is empty.

minLength0
has_more: boolean

Whether there are more resources to retrieve after this page.

last_id: string or null

The ID of the last resource in data, or null if the page is empty. Pass this as after with the same order and filters.

minLength0
object: "list"

The object type, which is always list.

List vaults

curl https://api.openai.com/v1/vaults \
    -H 'OpenAI-Beta: agents=v1' \
    -H "Authorization: Bearer $OPENAI_API_KEY"
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "metadata": {
        "foo": "string"
      },
      "name": "name",
      "object": "vault"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "metadata": {
        "foo": "string"
      },
      "name": "name",
      "object": "vault"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}