Anthropic
Anthropic provides Claude AI models for natural language processing, function calling, and vision analysis.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
Anthropic
API key or token
Anthropic Admin
Admin API Key
Anthropic
Connect to Anthropic's Claude AI models for text generation, function calling, and vision analysis.
Set up in Anthropic
Go to the Anthropic Console at https://console.anthropic.com and sign in or create an account.
Add a payment method under Billing; API access is pay-as-you-go and keys cannot be created until billing is set up.
Open Settings → API keys, click Create Key, give it a name, and copy the key (it starts with
sk-ant-and is shown only once).
Set up in StackAI
Open Settings → Connections, add a connection, and select Anthropic.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
GitHub Token (Optional)
Optional / as applicable
GitHub Personal Access Token (classic ghp_… or fine-grained github_pat_…), required only if the Claude Code action will clone private repos. Scope to the workflow's needs: • Investigation only (clone + read): Contents: Read (+ Metadata: Read for fine-grained). • Claude Code opens PRs via gh CLI inside the sandbox: also add Contents: Read and write and Pull requests: Read and write. Provider instructions.
Provider documentation: Setup reference.
Anthropic Admin
Read Anthropic organization cost, token usage and Claude Code metrics with an Admin API key. Separate from the standard Anthropic connection, which cannot access organization billing.
Set up in Anthropic
Prepare the Anthropic account or service that the workflow will access. Grant access to the required resources and operations.
Admin API Key: An Anthropic Admin API key, which starts with
sk-ant-admin. Create one in the Console under Settings, Admin keys. This is NOT the same as a normal API key: a normal key cannot read organization cost or usage and is rejected here. An admin key can read spend across the whole organization, so treat it as a high-privilege secret.
Set up in StackAI
Open Settings → Connections, add a connection, and select Anthropic Admin.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
Admin API Key
Yes
An Anthropic Admin API key, which starts with sk-ant-admin. Create one in the Console under Settings, Admin keys. This is NOT the same as a normal API key: a normal key cannot read organization cost or usage and is rejected here. An admin key can read spend across the whole organization, so treat it as a high-privilege secret. Provider instructions.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Use an action
Add the required Anthropic action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Create Message
Create messages using Claude with support for text, function calling, and image analysis.
Inputs
Request Body
object
Yes
Complete configuration for Claude message generation including model selection, conversation messages (text/images), optional tools for function calling, system instructions, generation parameters (temperature, tokens), streaming options, and metadata. This unified interface supports all Claude capabilities: text generation, vision analysis, and tool use in a single action.
Outputs
Status Code
integer
Status code of the response.
Headers
dict
Headers of the response.
Body
object
Body of the response.
List Models
List available Anthropic Claude models for dynamic model selection.
Inputs
No input fields are required in this catalog entry.
Outputs
Status Code
integer
Status code of the response.
Headers
dict
Headers of the response.
Body
object
Body of the response.
Claude Code
Run Claude Code in an isolated sandbox.
Inputs
Prompt
string
Yes
The natural-language task for Claude Code to execute.
Model
select (string)
No
Anthropic model Claude Code uses inside the session. Available values: Default (Claude Code picks), Haiku (fast, cheap), Sonnet (balanced), Opus (deep reasoning). Default: .
Sandbox ID
string
No
Optional sandbox ID to reuse across calls.
Claude Code Session ID
string
No
Optional Claude Code session ID to resume an in-progress conversation.
Max steps
integer
No
Hard cap on how many internal steps Claude Code can take. A step is one action by the agent — calling a tool, editing a file, running a shell command, or producing its final response. The initial prompt does not count. Raise only for genuinely long, multi-step tasks. Default: 25.
Timeout (seconds)
integer
No
Maximum time (in seconds) to wait for Claude Code to finish before killing the run. If exceeded, the run is terminated and returns whatever output exists so far. Default: 600.
GitHub repos
string_array
No
Optional GitHub repos to clone into the sandbox before running.
Full clone
boolean
No
Clone the full git history instead of just the latest commit. Turn on when Claude Code needs to: read past commits with git log, find when a line changed with git blame, bisect a bug across commits, check out an older branch or tag, or compare versions of a file over time. Otherwise leave off — the shallow clone is much faster. Default: false.
Include intermediate steps
boolean
No
Return every step from Claude Code's agent loop — each tool call, file edit, and shell command — in turn_events. Turn on for debugging or when a downstream node needs the full trace of what the agent did. Leave off when you only care about the final answer from Claude. Default: false.
Outputs
Final Output
textarea
Claude Code's final assistant message.
Session ID
string
Claude Code session ID for resuming this conversation.
Sandbox ID
string
The sandbox ID used for this run.
Turn events
object_array
Redacted JSONL turn events from Claude Code.
New Files Created
object_array
Files created in /home/user/ during the Claude Code run.
Total Input Tokens
integer
Total prompt tokens for the run, including prompt-cache writes and reads.
Total Output Tokens
integer
Total output tokens for the run.
Stopped reason
string
Why the Claude Code run stopped.
Get Cost Report
Read what your Anthropic organization spent over a date range, optionally broken down by workspace or by model and token type.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Anthropic buckets usage by UTC day. Options load from the selected connection. Default: last_30_days.
Start Date
string
No
First UTC day to include (YYYY-MM-DD). Needed for 'custom'.
End Date
string
No
Last UTC day to include (YYYY-MM-DD). This day is included. Needed for 'custom'.
Group By
select (string)
No
Break the cost down by workspace, or by description to see per-model and per-token-type lines. Leave empty for daily totals only. Options load from the selected connection.
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
Outputs
Total Cost
number
Total spend over the whole date range, in dollars.
Currency
string
Currency of the amounts, as reported by Anthropic.
Buckets
array
One entry per day, with its total and its cost lines.
Start Date
string
Inclusive start of the range covered (RFC 3339).
End Date
string
Exclusive end of the range covered (RFC 3339).
Truncated
boolean
True when more pages were available than were fetched.
Get Messages Usage Report
Read Anthropic token usage over a date range, broken down by model, workspace, API key or service tier, with a cache hit rate.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Anthropic buckets usage by UTC day. Options load from the selected connection. Default: last_7_days.
Start Date
string
No
First UTC day to include (YYYY-MM-DD). Needed for 'custom'.
End Date
string
No
Last UTC day to include (YYYY-MM-DD). This day is included. Needed for 'custom'.
Bucket Size
select (string)
No
Size of each time bucket. Narrower buckets return more buckets per request, and the API caps how many one response carries. Longer ranges are fetched a page at a time, so raise Max Pages if the result comes back truncated. Options load from the selected connection. Default: 1d.
Group By
select (string)
No
Break usage down by one or more of model, workspace, API key, account, service account, service tier, context window or inference geo. Options load from the selected connection.
Workspace
select (string)
No
Limit the report to one workspace. Leave empty for the whole org. Options load from the selected connection.
API Key
select (string)
No
Limit the report to usage from one API key. Options load from the selected connection.
Accounts
select (string)
No
Limit the report to usage from specific organization members. Applies to console and OAuth traffic, which is the usage attributed to a person. Options load from the selected connection.
Models
string
No
Limit the report to specific models. Comma-separated.
Service Tiers
select (string)
No
Limit the report to specific service tiers, such as batch or standard. Options load from the selected connection.
Context Window
select (string)
No
Limit the report to a context window band. Long-context requests are priced differently, so this separates them. Options load from the selected connection.
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
Outputs
Totals
object
Token counts summed across the whole range.
Buckets
array
One entry per time bucket, with its usage lines.
Cache Read Share
number
Share of input tokens served from cache, as a percentage. Higher is cheaper.
Start Date
string
Inclusive start of the range covered (RFC 3339).
End Date
string
Exclusive end of the range covered (RFC 3339).
Truncated
boolean
True when more pages were available than were fetched.
Get Claude Code Usage Report
Read who used Claude Code on a given day, with sessions, lines of code, commits, pull requests and estimated cost per person.
Inputs
Day
select (string)
No
Which single UTC day to report on. This endpoint covers one day per call, so only single-day options are offered. Options load from the selected connection. Default: yesterday.
Start Date
string
No
First UTC day to include (YYYY-MM-DD). Needed for 'custom'.
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
Outputs
Records
array
One record per actor, with their Claude Code activity for the day.
Total Estimated Cost
number
Estimated Claude Code cost for the day, in dollars.
Total Sessions
number
Claude Code sessions across every actor.
Active Actors
number
Distinct users or API keys that used Claude Code that day.
Day
string
The UTC day the report covers (YYYY-MM-DD).
Truncated
boolean
True when more pages were available than were fetched.
Get Organization
Read which Anthropic organization the connected Admin key belongs to.
Inputs
No input fields are required in this catalog entry.
Outputs
Organization ID
string
Identifier of the organization the Admin key belongs to.
Name
string
Display name of the organization.
List Workspaces
List the workspaces in your Anthropic organization, with their names and IDs.
Inputs
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
After ID
string
No
Continue a listing that was cut short. Paste the Next Cursor from the previous run.
Outputs
Workspaces
array
Workspaces in the organization.
Total Count
number
Number of entries returned.
Truncated
boolean
True when more results existed than the page limit fetched.
Next Cursor
string
Cursor that continues a truncated listing.
List Organization API Keys
List your Anthropic organization's API keys, with their status and workspace.
Inputs
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
After ID
string
No
Continue a listing that was cut short. Paste the Next Cursor from the previous run.
Outputs
API Keys
array
API keys in the organization.
Total Count
number
Number of entries returned.
Truncated
boolean
True when more results existed than the page limit fetched.
Next Cursor
string
Cursor that continues a truncated listing.
List Organization Members
List the members of your Anthropic organization, with their roles.
Inputs
Maximum Pages
integer
No
How many result pages to fetch before stopping (1-100). Minimum: 1. Maximum: 100.
After ID
string
No
Continue a listing that was cut short. Paste the Next Cursor from the previous run.
Outputs
Users
array
Members of the organization.
Total Count
number
Number of entries returned.
Truncated
boolean
True when more results existed than the page limit fetched.
Next Cursor
string
Cursor that continues a truncated listing.
Important behavior
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

