← all repositories
KoushikNavuluri/Claude-API

Python glue for Claude’s web chat, cookie required

A Python wrapper that automates Claude by piggybacking on its web interface with your browser session cookie.

907 stars Python Chat Assistants
Claude-API
Not currently ranked — collecting fresh signals.
star history

What it does

This library wraps Claude’s web chat interface into a Python Client class. You pass in a browser session cookie copied from the dev-tools network tab, then call methods to send messages, list conversations, rename or delete chats, and attach files. It is essentially glue code over the undocumented HTTP endpoints that Claude’s frontend calls.

The interesting bit

Instead of an official API key, the entire authentication flow relies on copy-pasting a cookie string from your browser. That makes it a pragmatic workaround for scripting Claude when you lack formal API access, though it also means you are tightly coupled to whatever Anthropic’s web team shipped this week.

Key highlights

  • Supports full conversation lifecycle: create, list, rename, delete, reset, and fetch history
  • Can send messages with file attachments and configurable request timeouts
  • Includes sample use cases for a console chatbot and a Discord bot
  • Version 1.0.17 added faster requests and fixed file-handling bugs
  • Explicitly disclaimed as unofficial and unaffiliated with Anthropic

Caveats

  • Authentication requires manually extracting a session cookie from browser dev tools; there is no API key or OAuth flow
  • The README warns the project is unofficial and unsupported by Anthropic, so breakage is always possible
  • File attachment support is limited to the file types Claude’s web UI currently accepts

Verdict

Useful for quick personal automation or prototyping if you cannot get official API credentials, but it is fundamentally brittle scaffolding. If you are building anything that needs stability or compliance, this is not your foundation.

Frequently asked

What is KoushikNavuluri/Claude-API?
A Python wrapper that automates Claude by piggybacking on its web interface with your browser session cookie.
Is Claude-API open source?
Yes — KoushikNavuluri/Claude-API is open source, released under the MIT license.
What language is Claude-API written in?
KoushikNavuluri/Claude-API is primarily written in Python.
How popular is Claude-API?
KoushikNavuluri/Claude-API has 907 stars on GitHub.
Where can I find Claude-API?
KoushikNavuluri/Claude-API is on GitHub at https://github.com/KoushikNavuluri/Claude-API.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.