๐Ÿฆ€Agento
FeaturesPricingBlog
HomeGuidesConnecting Your Anthropic Account via API or OAuth

Connecting Your Anthropic Account via API or OAuth

Feb 8, 2026ยท3 min read

Table of Contents

  • Prerequisites
  • Option A: Connect via OAuth (Recommended)
  • Option B: Connect via API Key
  • Choose a Model
  • Switching Between Methods
  • Verify the Connection
  • Disconnecting
  • Troubleshooting

This guide shows you how to connect your Anthropic account to an Agento agent so it can use Claude models like Claude Sonnet 4.5 and Claude Opus 4. You can connect via OAuth (recommended) or by pasting an API key.

Prerequisites

Before you start, make sure you have:

  • An Agento account with at least one agent created
  • An Anthropic account at console.anthropic.com

If using the API key method, you'll also need a funded API key (free-tier keys work but have lower rate limits).

Option A: Connect via OAuth (Recommended)

OAuth lets you connect your Anthropic account without managing API keys โ€” authentication happens through the browser and tokens refresh automatically.

  1. Open the Agento dashboard and click on your agent
  2. Go to the Settings tab
  3. Under AI Provider, select Anthropic
  4. Click Connect with Anthropic
  5. A browser window will open โ€” log in to your Anthropic account and authorize access
  6. After authorizing, you'll see a page with a code. Copy the code shown on the page, or copy the entire URL from your browser's address bar
  7. Paste the code or URL back in Agento and click Complete Connection

The settings page will show a green "Connected" indicator once done.

Why OAuth?

  • No key to copy/paste โ€” authentication happens through the browser
  • Automatic refresh โ€” Agento refreshes your token before it expires
  • Revocable โ€” disconnect at any time from your agent settings or from your Anthropic account
  • Works with Claude Pro/Team subscriptions โ€” no separate API billing needed

Option B: Connect via API Key

If you prefer using an API key:

Get Your API Key

  1. Log in to console.anthropic.com
  2. Navigate to API Keys in the left sidebar
  3. Click Create Key
  4. Give it a descriptive name like "Agento Agent"
  5. Copy the key โ€” you won't be able to see it again

Keep your API key secure. Never share it publicly or commit it to version control.

Add the Key to Your Agent

  1. Open the Agento dashboard and click on your agent
  2. Go to the Settings tab
  3. Under AI Provider, select Anthropic
  4. Paste your API key into the API Key field
  5. Click Save

Agento encrypts your key at rest and never exposes it in the UI after saving.

Choose a Model

After connecting (via either method), select the model your agent should use:

Model Best For
Claude Sonnet 4.5 Balanced speed and quality for most tasks
Claude Opus 4 Complex reasoning and long-form content
Claude Haiku 3.5 Fast responses and simple tasks

You can change the model at any time without reconnecting.

Switching Between Methods

You can switch between OAuth and API key at any time from the Settings tab:

  • If connected via OAuth, click Use API Key Instead to switch
  • If connected via API key, click Switch to OAuth to switch

Only one method can be active at a time.

Verify the Connection

Start your agent (or restart it if it was already running). Open the web chat or send a message through Telegram. If the agent responds, your Anthropic connection is working.

Disconnecting

To disconnect Anthropic:

  1. Go to your agent's Settings tab
  2. Click Disconnect (for OAuth) or Remove Key (for API key)
  3. The agent will stop using Anthropic and you'll need to configure a different provider

Troubleshooting

OAuth window doesn't open: Make sure pop-ups are allowed for agento.host in your browser.

"Authorization failed" error: Try signing out of Anthropic in your browser first, then retry the OAuth flow.

Agent shows "credential error" (API key): Double-check that you copied the full API key including the sk-ant- prefix.

Agent responds slowly or times out: Your Anthropic account may have hit rate limits. Check your usage at console.anthropic.com/settings/usage.

Agent won't start: Make sure your Anthropic account has billing set up. API keys without a payment method may be restricted.

Back to all guides
๐Ÿฆ€Agento

AI agents that run 24/7 for your business. Deploy in minutes, not hours.

Remsys, Inc

1606 Headway Cir STE 9078

Austin, TX 78754, USA

+1 650 396 9091

๐ŸฆžPowered by OpenClaw

Product

  • Features
  • Pricing
  • Security

Company

  • About
  • Contact

Resources

  • Skills Marketplace
  • Agento Blog
  • API Reference
  • Guides
  • OpenClaw
  • Skills.sh

Legal

  • Privacy
  • Terms
  • GDPR

ยฉ 2026 Agento. All rights reserved.