usage2 returns the character usage and configured character limit for the current billing period of a DeepL API Free account.

usage2(auth_key)

Arguments

auth_key

Character. Your DeepL API authentication key. If missing, the function uses the DEEPL_API_KEY environment variable. You can set it using Sys.setenv(DEEPL_API_KEY = "your_key") or define it in your .Renviron file for persistent use.

Value

A named list or structured object containing:

  • character_count – Number of characters used in the current billing period.

  • character_limit – Total character limit for the current billing period.

Details

To use this function, you must register for a DeepL API Free account at https://www.deepl.com/pro#developer. The Free plan includes up to 500,000 characters per month.

Examples

if (FALSE) { # \dontrun{
usage2()
} # }