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

# HealthResource: Check Figranium Server Status

> Use the HealthResource to verify that a Figranium server is running and reachable. No authentication is required.

The `HealthResource` provides a lightweight liveness probe for any Figranium instance. Call `check()` to confirm the server is up, read its version, and verify that your SDK install and network path are working. No API key or session is required.

## Client setup

```ts theme={null}
import { Figranium } from "@figranium/sdk";

const figranium = new Figranium({ apiKey: process.env.FIGRANIUM_API_KEY! });
```

## Methods

<AccordionGroup>
  <Accordion title="check">
    ```ts theme={null}
    check(options?: RequestOptions): Promise<HealthStatus>
    ```

    Performs a `GET /api/health` request and returns the server's health status. This is the fastest way to verify connectivity and SDK configuration.

    ### Returns

    `HealthStatus` extends `UnknownRecord` for forward compatibility, so newer servers can add fields without breaking existing consumers. Common fields include:

    * `status`: a human-readable status string such as `"ok"`
    * `version`: the running Figranium server version

    ### Example: verify connectivity

    ```ts theme={null}
    const status = await figranium.health.check();
    console.log(status.status);   // "ok"
    console.log(status.version);  // "0.14.4"
    ```

    ### Example: browser usage

    Because `check()` requires no authentication, you can call it from a browser before the user has signed in or provided an API key:

    ```ts theme={null}
    const figranium = new Figranium({ baseUrl: "https://figranium.example" });
    const status = await figranium.health.check();
    ```

    ### Example: handle transport failures

    Wrap `check()` in a `try/catch` to detect network or DNS issues. Transport failures surface as [`FigraniumError`](/docs/sdk/js/errors) with `code: "NETWORK_ERROR"`:

    ```ts theme={null}
    import { FigraniumError } from "@figranium/sdk";

    try {
      const status = await figranium.health.check();
      console.log("Server is up:", status.status);
    } catch (error) {
      if (error instanceof FigraniumError && error.code === "NETWORK_ERROR") {
        console.error("Cannot reach the Figranium server. Check the baseUrl and network.");
      }
      throw error;
    }
    ```

    <Note>
      The `check()` method accepts the standard [`RequestOptions`](/docs/sdk/js/request-options) object as its final argument, so you can pass a custom `signal`, `timeoutMs`, or extra `headers` when needed.
    </Note>
  </Accordion>
</AccordionGroup>
