# `TypeSafeSDK.Client`
[🔗](https://github.com/nshkrdotcom/typesafe_sdk/blob/v0.4.0/lib/typesafe_sdk/client.ex#L1)

Thin TypeSafe API client layered on Pristine.

Runtime code does not read OS environment variables. Explicit options win over
application config; the included `config/runtime.exs` materializes the Python
SDK-compatible environment names when this repo is the top-level Mix project.

# `t`

```elixir
@type t() :: %TypeSafeSDK.Client{
  api_key: String.t(),
  base_url: String.t(),
  context: Pristine.SDK.Context.t(),
  default_model: String.t(),
  headers: map(),
  max_request_bytes: pos_integer() | nil,
  pristine_client: Pristine.Client.t(),
  response_contract: %{
    on_unknown_answer: :preserve | :error,
    allowed_models: [String.t()] | nil
  },
  retry: TypeSafeSDK.RetryPolicy.t() | false,
  timeout_ms: pos_integer(),
  transport: module(),
  transport_opts: keyword()
}
```

# `extra_headers`

```elixir
@spec extra_headers(term()) :: map()
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

# `pristine_client`

```elixir
@spec pristine_client(t()) :: Pristine.Client.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
