# `TypeSafeAPI.Models`
[🔗](https://github.com/typesend/typesafe_ai/blob/v0.1.0-alpha.3/lib/typesafe_api/models.ex#L1)

The models endpoint: `GET /v1/models`.

The path is not documented on the public API reference; it comes from the
official Python SDK's constants (`MODELS_PATH = "/v1/models"`), and the
response shape `{"models": [{"name", "description", "release_date"}]}` from
its generated schema.

Because the endpoint is undocumented, `list/2` is deliberately tolerant: an
entry it cannot decode is logged at warning and skipped, and the models that
did decode are returned. A list endpoint is the one place where one unfamiliar
row should not cost you the other ten. Only a body with no `models` array at
all is an error.

# `list`

```elixir
@spec list(TypeSafeAPI.Client.t(), keyword()) ::
  {:ok, [TypeSafeAPI.Model.t()]} | {:error, TypeSafeAPI.Error.t()}
```

Lists the models available to the account.

An unknown option is a `:validation` error and no request is sent, the same
as for `TypeSafeAPI.evaluate/4`. An entry that fails to decode is logged and
skipped; see the module doc.

## Options

* `:timeout` (`t:pos_integer/0`) - Timeout in milliseconds for this call.

* `:retry` - Retry policy for this call; see `TypeSafeAPI.Retry.new/1`.

* `:req_options` (`t:keyword/0`) - Extra `Req` options for this call.

* `:telemetry` (`t:map/0`) - Extra metadata merged into telemetry events.

# `options_schema`

```elixir
@spec options_schema() :: NimbleOptions.t()
```

Per-call options accepted by `list/2`.

* `:timeout` (`t:pos_integer/0`) - Timeout in milliseconds for this call.

* `:retry` - Retry policy for this call; see `TypeSafeAPI.Retry.new/1`.

* `:req_options` (`t:keyword/0`) - Extra `Req` options for this call.

* `:telemetry` (`t:map/0`) - Extra metadata merged into telemetry events.

# `path`

```elixir
@spec path() :: String.t()
```

The models endpoint path.

---

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