> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valkyrie.vals.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets resource

> Reference for client.secrets.

Access these methods through `client.secrets`.

## `client.secrets.list`

List stored secrets by name and reference, never their values.

Secrets set or removed in the last few minutes may not show up yet.

```python Signature theme={null}
async def list() -> SecretsResponse
```

**Returns**

[`SecretsResponse`](https://docs.valkyrie.vals.ai/reference/sdk/models/secrets#secrets-response)

For examples, see the [Python SDK guide](https://docs.valkyrie.vals.ai/sdk/resources.md).

## `client.secrets.set`

Create the secret or replace its value; runs reference it by the returned reference.

```python Signature theme={null}
async def set(name: str, value: str) -> SecretEntry
```

**Parameters**

namerequired · str

valuerequired · str

**Returns**

[`SecretEntry`](https://docs.valkyrie.vals.ai/reference/sdk/models/secrets#secret-entry)

For examples, see the [Python SDK guide](https://docs.valkyrie.vals.ai/sdk/resources.md).

## `client.secrets.remove`

Delete the secret immediately; it cannot be recovered.

On hosted Valkyrie a missing secret raises a 404 API error. Self-hosted deployments without a tenant access role can't detect a missing secret, so removing one succeeds.

```python Signature theme={null}
async def remove(name: str) -> SecretEntry
```

**Parameters**

namerequired · str

**Returns**

[`SecretEntry`](https://docs.valkyrie.vals.ai/reference/sdk/models/secrets#secret-entry)

For examples, see the [Python SDK guide](https://docs.valkyrie.vals.ai/sdk/resources.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.