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

# SDK configuration

> Reference local binary options and preview HTTP, retry, polling, concurrency and logging options.

export const RemoteContract = () => <Warning>
    <strong>Preview surface.</strong> The root package types the intended
    workflow HTTP and SSE API. The reference engine does not ship a compatible
    workflow service today. Do not point it at the stable resident firer or
    <code>nika model serve</code>.
  </Warning>;

export const LocalContract = () => <Tip>
    <strong>Live surface.</strong> <code>@supernovae-st/nika-client/local</code>
    drives the released <code>nika</code> binary through its versioned machine
    contracts. It is the production path today.
  </Tip>;

## Local options

<LocalContract />

```ts theme={"system"}
interface LocalNikaOptions {
  bin?: string
  cwd?: string
}
```

| Option | Default                                                 | Meaning                                |
| ------ | ------------------------------------------------------- | -------------------------------------- |
| `bin`  | explicit option, then `NIKA_BIN`, then `nika` on `PATH` | Executable to spawn                    |
| `cwd`  | current Node process directory                          | Base for relative workflows and traces |

### Check options

```ts theme={"system"}
interface CheckOptions {
  model?: string
  nativeStrict?: boolean
}
```

### Run options

```ts theme={"system"}
interface RunOptions {
  vars?: Record<string, string | number | boolean>
  model?: string
  maxCostUsd?: number
  resume?: string
  signal?: AbortSignal
}
```

The `vars` field maps to repeatable CLI `--var KEY=VALUE` overrides. It does
not reintroduce a top-level `vars:` key in the workflow envelope.

## Remote options

<RemoteContract />

| Option         | Required | Default                  |
| -------------- | -------: | ------------------------ |
| `url`          |      yes | none                     |
| `token`        |      yes | none                     |
| `timeout`      |       no | 30 seconds               |
| `retries`      |       no | 2                        |
| `concurrency`  |       no | 24                       |
| `pollInterval` |       no | 2 seconds                |
| `pollTimeout`  |       no | 5 minutes                |
| `pollBackoff`  |       no | 1.5                      |
| `fetch`        |       no | bound `globalThis.fetch` |
| `logger`       |       no | none                     |

```ts theme={"system"}
const nika = Nika.fromEnv({
  timeout: 15_000,
  retries: 1,
  concurrency: 8,
})
```

`fromEnv()` reads `NIKA_URL` and `NIKA_TOKEN`.

## Continue

<CardGroup cols={2}>
  <Card title="Method index" icon="list" href="/sdk/reference/methods">
    See where every option is consumed.
  </Card>

  <Card title="Type index" icon="brackets-curly" href="/sdk/reference/types">
    Read all exported result shapes.
  </Card>

  <Card title="Local client" icon="terminal" href="/sdk/local/client">
    Configure the released path.
  </Card>

  <Card title="Remote client" icon="satellite-dish" href="/sdk/remote/client">
    Configure the preview transport.
  </Card>
</CardGroup>
