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

# Get a Secret

`novita.secret.get()` fetches the metadata of an active Secret by name. It returns `SecretBinding` metadata and does not return the real value. Use it to confirm a Secret exists and inspect its host allow list before referencing it from a sandbox.

## Example

```python Python icon="python" theme={"system"}
from novita_sandbox import Novita

secret_name = "<your-secret-name>"

novita = Novita()

# Fetch the Secret metadata by name (no real value returned).
fetched = novita.secret.get(secret_name)
print(fetched)
```

```js JavaScript & TypeScript icon="js" theme={"system"}
import { Novita } from 'novita-sandbox'

const secretName = '<your-secret-name>'

const novita = new Novita()

const fetched = await novita.secret.get(secretName)
console.log(fetched)
```

```bash CLI icon="terminal" theme={"system"}
novita secret get <secret_name>

# JSON output
novita secret get <secret_name> --output json
```

> [!NOTE]
>
> `novita.secret.get()` returns `SecretBinding` metadata only — it never returns the real value. If the name does not exist or has been deleted, the call returns `404 Not Found`.


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