Claude-API  by KoushikNavuluri

Unofficial API for Claude AI

Created 2 years ago
848 stars

Top 42.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project offers an unofficial Python API for interacting with Claude AI, targeting developers building chatbots, automation tools, or integrating Claude's capabilities into other applications. It simplifies sending messages, managing conversations, and handling attachments, providing a programmatic interface to the Claude AI service.

How It Works

The API functions by leveraging a user's Claude AI session cookie to authenticate requests to the Claude AI web interface. It parses responses from the web API and exposes methods for common chat operations like sending messages, listing conversations, creating new chats, and deleting existing ones. This approach bypasses the need for official API keys, relying instead on the user's browser session.

Quick Start & Requirements

  • Install via pip: pip install claude-api
  • Requires Python and the requests library.
  • Authentication requires a Claude AI session cookie, obtainable from browser developer tools.
  • Official documentation: https://claude.ai/docs

Highlighted Details

  • Supports sending messages with file attachments.
  • Allows listing, creating, renaming, and deleting conversations.
  • Includes functionality to retrieve chat history and reset all conversations.
  • Offers timeout configuration for requests.

Maintenance & Community

The project is maintained by KoushikNavuluri. No specific community channels or roadmap details are provided in the README.

Licensing & Compatibility

The README does not explicitly state a license. As an unofficial API interacting with Claude AI, its use is subject to Claude AI's terms of service. Compatibility with commercial or closed-source applications is not specified and may be impacted by Claude AI's terms.

Limitations & Caveats

This is an unofficial API, meaning it is not supported by Claude AI or Anthropic and may break if Claude AI updates its web interface. Obtaining and managing the session cookie is a manual process. The project's reliance on web scraping makes it inherently less stable than an official API.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
9 more.

companion-app by a16z-infra

0.1%
6k
AI companion stack for personalized chatbots
Created 2 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Ishaan Jaffer Ishaan Jaffer(Cofounder of LiteLLM), and
4 more.

chathub by chathub-dev

0.1%
10k
All-in-one chatbot client
Created 2 years ago
Updated 6 months ago
Feedback? Help us improve.