← Blog

How to Access the Claude AI API: A Practical Guide

2026-09-04 · 5 min read · SubToAPI Team

Accessing the Claude AI API means getting a valid set of credentials and an HTTPS endpoint you can call from your code — nothing more mystical than that. There are three main routes: sign up directly with Anthropic and get an API key from their console, go through a cloud provider like AWS Bedrock or Google Vertex AI if you already run infrastructure there, or use a middle layer like SubToAPI that turns access you already have into a standard API key with extra tooling on top.

Which one is right for you depends on whether you want the absolute simplest path, whether you're already committed to a cloud vendor for billing and compliance reasons, or whether you want usage tracking, team seats, and streaming handled for you instead of building that plumbing yourself. Below is what each option actually looks like in practice.

Option 1: Direct Access via Anthropic's Console

This is the default path most developers try first.

  1. Create an account at the Anthropic Console.
  2. Add a payment method — API access is billed by usage, not a flat subscription.
  3. Generate an API key from the dashboard.
  4. Call the Messages endpoint with that key.

A basic request looks like this:

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-3-5-sonnet-20241022",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Explain HTTP caching in two sentences."}]
  }'

This is fine for solo projects and quick prototypes. The tradeoffs show up later: you're managing raw usage billing per token, there's no built-in team seat management, and if you want to expose this to multiple internal apps you'll be building your own key-issuing and logging layer.

Option 2: Access Through a Cloud Provider

If your company already runs on AWS or Google Cloud, you can reach Claude models through Bedrock or Vertex AI instead of Anthropic directly. This routes billing through your existing cloud account and can simplify procurement and compliance reviews, since you're not adding a new vendor relationship.

The request shape differs slightly per provider — Bedrock uses its own SDK and IAM-based auth, Vertex AI uses Google's authentication and endpoint conventions. This is a reasonable choice if:

The downside is more moving parts: provider-specific SDKs, separate rate limit rules, and less direct visibility into per-model pricing changes.

Option 3: Access via SubToAPI

SubToAPI takes a different angle: instead of managing a raw Anthropic billing account or wiring up cloud IAM, you get a standard HTTPS API with an sub_live_... key that's built around what teams actually need day-to-day — streaming, tool use, usage metadata per key, and multiple seats under one dashboard.

Setup takes a few minutes:

  1. Sign up at /signup and start the free trial.
  2. Generate an application key from the dashboard.
  3. Call the Messages endpoint.
curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-3-5-sonnet-20241022",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Summarize this PR description."}]
  }'

Streaming responses work the same way you'd expect from any modern LLM API — see /docs/streaming for the event format. Tool use (function calling) is documented at /docs/tools, and the full request/response schema for chat completions is in /docs/messages. If you're starting from zero, /docs/quickstart walks through the first request end to end.

This route makes sense when:

Pricing is flat and predictable: Solo is €9, Team is €19 per seat, and Scale is €49 per seat — see /pricing for what's included at each tier. Every plan starts with a free trial, so you can test real requests against your actual codebase before committing.

Choosing Between the Three

A rough way to decide:

None of these are mutually exclusive — some teams prototype directly with Anthropic, then move to a managed layer once more than one person needs access or once they need to track usage per feature instead of per account.

A Few Things to Check Before You Commit

Regardless of the route:

questions

Do I need a separate account for every developer on my team? Not necessarily. Direct Anthropic access ties keys to one account, but tools like SubToAPI let you issue individual application keys under shared team or scale plans, so each person or app gets its own key without sharing credentials.

Is API access the same as a Claude.ai subscription? No. A Claude.ai subscription is for the chat interface; API access is a separate, usage-based way to call Claude models programmatically from your own code, with its own billing.

Can I switch providers later without rewriting my code? Mostly yes, if you keep your request/response handling close to the standard Messages format. Endpoint URLs and auth headers will differ, but the core payload structure (model, messages, max_tokens) is consistent enough that switching is usually a small refactor, not a rewrite.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →