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

# Quick start

> Install an SDK, classify a request, and verify your connection.

## Get access

Silmaril supplies an API key and complete classify URL for your deployment. [Book a call](https://cal.com/silmaril/30min) to arrange access. See [connection values](https://silmaril.security/docs/start/access.md) for gateways, plugins, and Macs.

## Prerequisites

Use Node.js 20 or later, Python 3.10 or later, or Go 1.22 or later. For Java, confirm the artifact repository and compatible runtime with Silmaril before setup.

Choose the service that owns model calls or tool execution. Create one Firewall client for that service and reuse it.

## Configure the environment

Set the supplied values in your service environment. For a local check, use the same terminal that runs the example.

```bash theme={"theme":"github-light-default"}
export SILMARIL_API_KEY='REPLACE_WITH_YOUR_API_KEY'
export SILMARIL_API_URL='REPLACE_WITH_YOUR_COMPLETE_CLASSIFY_URL'
```

The URL includes `/classify` and any deployment path prefix.

## Make your first classification

These examples select Shadow mode so you can inspect would-block decisions while the workflow continues.

> [tab] TypeScript
>
> ```sh theme={"theme":"github-light-default"}
> npm install @silmaril-security/sdk@0.10.0
> ```
>
> ```bash theme={"theme":"github-light-default"}
> npm install --save-dev tsx
> ```
>
> ```typescript theme={"theme":"github-light-default"}
> import { Firewall, HookLabel } from "@silmaril-security/sdk"
>
> async function main() {
>   const fw = new Firewall({
>     apiKey: process.env.SILMARIL_API_KEY!,
>     apiUrl: process.env.SILMARIL_API_URL!,
>     shadowMode: true,
>   })
>
>   const result = await fw.classify("Summarize this release note.", {
>     hook: HookLabel.USER_INPUT,
>   })
>   console.log(result.prediction)
> }
>
> main().catch((error) => {
>   console.error(error)
>   process.exitCode = 1
> })
> ```
>
> ```bash theme={"theme":"github-light-default"}
> npx tsx quickstart.ts
> ```

> [tab] Python
>
> ```sh theme={"theme":"github-light-default"}
> pip install silmaril-security-sdk==0.10.0
> ```
>
> ```python theme={"theme":"github-light-default"}
> import os
> from silmaril_security.sdk import Firewall, HookLabel
>
> fw = Firewall(
>     api_key=os.environ["SILMARIL_API_KEY"],
>     api_url=os.environ["SILMARIL_API_URL"],
>     shadow_mode=True,
> )
> result = fw.classify(
>     "Summarize this release note.",
>     hook=HookLabel.USER_INPUT,
> )
> print(result.prediction)
> ```
>
> ```bash theme={"theme":"github-light-default"}
> python quickstart.py
> ```

> [tab] Go
>
> Use your service's existing Go module. For a new example directory, initialize one first.
>
> ```bash theme={"theme":"github-light-default"}
> go mod init example.com/firewall-check
> ```
>
> ```sh theme={"theme":"github-light-default"}
> go get github.com/Silmaril-Security/sdk-go/firewall@v0.8.0
> ```
>
> ```go theme={"theme":"github-light-default"}
> package main
>
> import (
>     "context"
>     "log"
>     "os"
>     "github.com/Silmaril-Security/sdk-go/firewall"
> )
>
> func main() {
>     fw, err := firewall.New(firewall.Options{
>         APIKey: os.Getenv("SILMARIL_API_KEY"),
>         APIURL: os.Getenv("SILMARIL_API_URL"),
>         ShadowMode: true,
>     })
>     if err != nil { log.Fatal(err) }
>
>     result, err := fw.Classify(context.Background(),
>         "Summarize this release note.",
>         firewall.WithHook(firewall.HookUserInput),
>     )
>     if err != nil { log.Fatal(err) }
>     log.Println(result.Prediction)
> }
> ```
>
> ```bash theme={"theme":"github-light-default"}
> go run .
> ```

> [tab] Java
>
> Use an existing Gradle application with the artifact repository supplied by Silmaril. Add the dependency to `build.gradle.kts`.
>
> ```kotlin Gradle theme={"theme":"github-light-default"}
> dependencies {
>     implementation("com.silmaril.security:silmaril-security-sdk:0.7.0")
> }
> ```
>
> Save the example as `src/main/java/FirstClassification.java`.
>
> ```java theme={"theme":"github-light-default"}
> import dev.silmaril.security.ClassifyOptions;
> import dev.silmaril.security.Firewall;
> import dev.silmaril.security.FirewallMode;
> import dev.silmaril.security.HookLabel;
>
> public class FirstClassification {
>     public static void main(String[] args) throws Exception {
>         var fw = Firewall.builder()
>             .apiKey(System.getenv("SILMARIL_API_KEY"))
>             .apiUrl(System.getenv("SILMARIL_API_URL"))
>             .mode(FirewallMode.SHADOW)
>             .build();
>         var result = fw.classify(
>             "Summarize this release note.",
>             ClassifyOptions.builder().hook(HookLabel.USER_INPUT).build()
>         );
>         System.out.println(result.prediction());
>     }
> }
> ```
>
> Set the application's main class to `FirstClassification`, then run it with your Gradle application task. See the [Java guide](https://silmaril.security/docs/sdk/java.md) for modes and error handling.

## Read the result

For this sample input, expect `BENIGN`. Inspect any different verdict with the [finding review workflow](https://silmaril.security/docs/operate/findings.md). An API or network failure leaves the event without a verdict.

When you enable Block, stop an event whose prediction is `MALICIOUS` or whose optional `governance.action` is `block`. TypeScript direct calls return the decision for your code to enforce. Python, Go, and Java use blocking errors in effective Block mode. See [modes and enforcement](https://silmaril.security/docs/guides/enforcement.md).

## Next steps

[Verify your integration](https://silmaril.security/docs/start/verify.md) in the dashboard. Then connect the [framework](https://silmaril.security/docs/integrations/frameworks.md), [gateway](https://silmaril.security/docs/gateways/overview.md), or [execution boundaries](https://silmaril.security/docs/guides/events.md) your application uses.

Reuse a conversation ID for ordered checks in one agent sequence. Read [events and conversations](https://silmaril.security/docs/guides/events.md) before adding conversation-aware or batch calls.

For blocked events and failed calls, follow [enforcement guidance](https://silmaril.security/docs/guides/enforcement.md) and [troubleshooting](https://silmaril.security/docs/operate/troubleshooting.md).


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