Skip to contents

List Anthropic (Anthropic) Models

Usage

anthropic_list_models(
  base_url = ANTHROPIC_URL_DEFAULT,
  api_key = NULL,
  api_key_env = ANTHROPIC_API_KEY_ENV_DEFAULT,
  keychain_service = NULL,
  anthropic_version = ANTHROPIC_API_VERSION_DEFAULT
)

Arguments

base_url

Character: Base URL of the Anthropic API.

api_key

Optional character: API key.

api_key_env

Character: Environment variable containing the API key.

keychain_service

Optional character: macOS Keychain service containing the API key.

anthropic_version

Character: anthropic-version header value.

Value

Character vector: Model ids.

Author

EDG

Examples

# Requires running Anthropic-compatible server with /models endpoint
if (FALSE) { # \dontrun{
  anthropic_list_models(
    base_url = "http://localhost:1234/v1",
   api_key = "test-key"
  )
} # }