# DetoxifySh v0.1.0 - API Reference

## Modules

- [DetoxifySh](DetoxifySh.md): The Detoxify API: toxicity scores for any text, from one call.
- [DetoxifySh.Cache](DetoxifySh.Cache.md): Keeps recent results in memory, so analyzing the same text again neither calls the API nor is
charged (the API charges for its own cache hits).
- [DetoxifySh.Client](DetoxifySh.Client.md): A configured client, made by `DetoxifySh.new/1`. It is plain data: keep one in your
application's configuration or a module attribute and share it between processes.
- [DetoxifySh.Result](DetoxifySh.Result.md): What `DetoxifySh.analyze/2` returns: the model that produced the scores, and the scores.
- [DetoxifySh.Scores](DetoxifySh.Scores.md): Probabilities from 0 to 1 that the text is each of these.

- Exceptions
  - [DetoxifySh.AccountSuspendedError](DetoxifySh.AccountSuspendedError.md): The account is suspended until its unpaid usage is paid (`account_suspended`).
  - [DetoxifySh.AuthenticationError](DetoxifySh.AuthenticationError.md): The API key was not accepted (`unauthorized`).
  - [DetoxifySh.Error](DetoxifySh.Error.md): An error from the API that no more specific exception describes, including codes newer than
this client. Every exception the client returns has the same fields
  - [DetoxifySh.InvalidRequestError](DetoxifySh.InvalidRequestError.md): The request was not valid (`invalid_request`), or the text too long (`payload_too_large`).
  - [DetoxifySh.NetworkError](DetoxifySh.NetworkError.md): The API could not be reached, or did not answer in time. Retried automatically first. Its
`:code` and `:status` are `nil`.

  - [DetoxifySh.QuotaExceededError](DetoxifySh.QuotaExceededError.md): The allowance is used up: the free plan's month (`quota_exceeded`) or the day's calls without a
key (`anonymous_quota_exceeded`). `:help_url` says where to get more.

  - [DetoxifySh.RateLimitError](DetoxifySh.RateLimitError.md): Too many requests in a short time (`rate_limited`). Retried automatically first.
  - [DetoxifySh.ServiceUnavailableError](DetoxifySh.ServiceUnavailableError.md): The service could not answer right now. Retried automatically first, except `internal_error`.

