Claude-API  by KoushikNavuluri

Unofficial API for Claude AI

created 2 years ago
838 stars

Top 43.4% 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

11 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.