Liking cljdoc? Tell your friends :D

hyperphor.ellum.providers.anthropic


admin-api-getclj

(admin-api-get path params)
source

admin-api-keyclj

(admin-api-key)
source

api-getclj

(api-get path params)
source

api-keyclj

(api-key)
source

api-postclj

(api-post path body)
source

api-post-streamclj

(api-post-stream path body)
source

api-versionclj

source

base-urlclj

source

completeclj

(complete {:keys [model messages system tools max-tokens]
           :or {model default-model max-tokens 4096}})

Call Anthropic Messages API. req keys: :model :messages :system :tools :max-tokens :stream

Call Anthropic Messages API.
req keys: :model :messages :system :tools :max-tokens :stream
sourceraw docstring

complete-streamclj

(complete-stream {:keys [model messages system tools max-tokens]
                  :or {model default-model max-tokens 4096}})

Call Anthropic Messages API with streaming. Returns lazy seq of parsed SSE events.

Call Anthropic Messages API with streaming.
Returns lazy seq of parsed SSE events.
sourceraw docstring

cost-reportclj

(cost-report params)

Query the organization's cost/billing data in USD (the Cost Admin API). Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY). params is a map of the Anthropic Cost API's query params, e.g. {:starting_at "2026-07-01T00:00:00Z" :ending_at "2026-07-24T00:00:00Z"}.

Query the organization's cost/billing data in USD (the Cost Admin API).
Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY). params is a map of the
Anthropic Cost API's query params, e.g.
{:starting_at "2026-07-01T00:00:00Z" :ending_at "2026-07-24T00:00:00Z"}.
sourceraw docstring

default-modelclj

source

find-api-keyclj

(find-api-key secret)

Identify a specific API key — its name, status, owner, and workspace — by matching its secret against the organization's partial_key_hint values. Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY) belonging to the same organization as secret. Returns the matching APIKey map, or nil if not found.

Identify a specific API key — its name, status, owner, and workspace — by
matching its secret against the organization's partial_key_hint values.
Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY) belonging to the same
organization as secret. Returns the matching APIKey map, or nil if not found.
sourceraw docstring

list-api-keysclj

(list-api-keys &
               {:keys [status workspace-id created-by-user-id limit after-id
                       before-id]})

List API keys for the organization, including each key's name, status, owner (:created_by / :principal), and workspace. Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY). opts: :status :workspace-id :created-by-user-id :limit :after-id :before-id.

List API keys for the organization, including each key's name, status,
owner (:created_by / :principal), and workspace. Requires an Admin API key
(ANTHROPIC_ADMIN_API_KEY). opts: :status :workspace-id :created-by-user-id
:limit :after-id :before-id.
sourceraw docstring

list-modelsclj

(list-models)
source

normalize-modelsclj

(normalize-models response)

Convert a raw Anthropic /models list response to a vector of normalized model maps.

Convert a raw Anthropic /models list response to a vector of normalized model maps.
sourceraw docstring

normalize-responseclj

(normalize-response response)

Convert a raw Anthropic Messages response to the ellum normalized format.

Convert a raw Anthropic Messages response to the ellum normalized format.
sourceraw docstring

organization-infoclj

(organization-info)

Get the organization (id/name) that an Admin API key belongs to (/v1/organizations/me). Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY).

Get the organization (id/name) that an Admin API key belongs to
(/v1/organizations/me). Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY).
sourceraw docstring

organization-rate-limitsclj

(organization-rate-limits & {:keys [model group-type]})

List the organization's configured rate limits (the Rate Limits API). Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY), distinct from a standard API key. Optional opts: :model (look up the group for one model) and :group-type ("model_group" "batch" "token_count" "files" "skills" "web_search").

List the organization's configured rate limits (the Rate Limits API).
Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY), distinct from a
standard API key. Optional opts: :model (look up the group for one model)
and :group-type ("model_group" "batch" "token_count" "files" "skills" "web_search").
sourceraw docstring

rate-limit-statusclj

(rate-limit-status & {:keys [model] :or {model default-model}})

Get the current rate-limit standing for this API key by making a minimal Messages API call (1 output token) and reading back the anthropic-ratelimit-* response headers. Reflects the organization/workspace's live request and token budget — this is the 'status' available to a standard API key; full billing/cost data requires an Admin API key, see usage-report and cost-report.

Get the current rate-limit standing for this API key by making a minimal
Messages API call (1 output token) and reading back the anthropic-ratelimit-*
response headers. Reflects the organization/workspace's live request and
token budget — this is the 'status' available to a standard API key; full
billing/cost data requires an Admin API key, see usage-report and cost-report.
sourceraw docstring

usage-reportclj

(usage-report params)

Query the organization's Messages API token usage (the Usage Admin API). Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY). params is a map of the Anthropic Usage API's query params, e.g. {:starting_at "2026-07-01T00:00:00Z" :ending_at "2026-07-24T00:00:00Z" :bucket_width "1d"}.

Query the organization's Messages API token usage (the Usage Admin API).
Requires an Admin API key (ANTHROPIC_ADMIN_API_KEY). params is a map of the
Anthropic Usage API's query params, e.g.
{:starting_at "2026-07-01T00:00:00Z" :ending_at "2026-07-24T00:00:00Z" :bucket_width "1d"}.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close