(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
(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.
(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"}.(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.
(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.
(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.
(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.
(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).
(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").(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.
(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"}.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |