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

Retrieve a vault

beta.agents.vaults.retrieve(vault_id) -> Vault { id, created_at, metadata, 2 more }
GET/vaults/{vault_id}

Retrieves a vault by its ID. See vaults.

ParametersExpand Collapse
vault_id: String
minLength0
maxLength1048576
ReturnsExpand Collapse
class Vault { id, created_at, metadata, 2 more }

A collection of credentials for MCP servers and OpenAI-hosted environments.

id: String

The ID of the vault.

minLength0
created_at: Integer

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

formatint64
metadata: Hash[Symbol, String]

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

name: String

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

minLength0
object: :vault

The object type. Always vault.

Retrieve a vault

require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

vault = openai.beta.agents.vaults.retrieve("vault_id")

puts(vault)
{
  "id": "id",
  "created_at": 0,
  "metadata": {
    "foo": "string"
  },
  "name": "name",
  "object": "vault"
}
Returns Examples
{
  "id": "id",
  "created_at": 0,
  "metadata": {
    "foo": "string"
  },
  "name": "name",
  "object": "vault"
}