# Anthropic

Learn how to connect Buddy with Anthropic and run the Claude Code action in your CI/CD pipelines.

## What is Anthropic?

Anthropic is the AI company behind **Claude**, a family of large language models, and **Claude Code**, an agentic coding assistant that can read, write, and refactor code from natural-language prompts.

By integrating Buddy with Anthropic you can add the **Claude Code** action to your pipelines and let Claude review code, generate changes, or automate routine engineering tasks on every push, on a schedule, or on demand.

## Setting up Anthropic integration

1. Go to the <u>Integrations</u> tab and click **New integration**.

2. Look up and click **Anthropic**.

3. A configuration window will show up. Here you provide:

- **Name** and **ID** of the integration
- **Scope** - whether the integration is available across the whole <u>Workspace</u>, a single <u>Project</u>, or a specific <u>Environment</u>
- **Authorization** method - either an **API key** or a **Claude Code** token (see below)

<Hint type="info">

You can adjust who can use the integration and where in the <u>Permissions</u> tab.

</Hint>

4. Once done, click **Add a new integration** to finish configuration.

## Authorization

The Anthropic integration supports two authorization methods. Pick the one that matches how you obtain credentials.

### API key

Authorize with a standard Anthropic API key. This is the default option.

![Anthropic integration configuration with API key authorization](/docs/integrations/anthropic/anthropic-api-key.png 640x384)

To obtain the key:

1. Go to [https://console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys "seo-nf") (also linked as **Get API key** in the form).
2. Create a new key and copy its value.
3. Paste it into the **API KEY** field - the value always starts with `sk-ant-`.

### Claude Code token

Authorize with a token generated by the Claude Code CLI. Use this option when you sign in through a Claude subscription rather than a console API key.

![Anthropic integration configuration with Claude Code authorization](/docs/integrations/anthropic/anthropic-claude-code.png 640x384)

To obtain the token:

1. Run `claude setup-token` in your terminal.
2. Copy the generated token.
3. Paste it into the **TOKEN** field.

Once the integration is added, you can use the **Claude Code** action in your pipeline and reference the integration by its ID.

<Hint type="info">

Read how to configure [Claude Code with YAML](/docs/yaml/yaml-actions/claude-code.md) and [Claude Code POST parameters](/docs/api/actions/add/claude-code.md).

</Hint>


---
Original source: https://buddy.works/docs/integrations/anthropic