claudeers.
// Integrations & Connectors

Claude-API

This project provides an unofficial API for Claude AI, allowing users to access and interact with Claude AI .

// Integrations & Connectors[ cli ][ api ][ web ][ claude ]#claude#ai#api#chatbot#chatgpt#claude-ai#claude-api#python#integrationsMIT$open-sourceupdated 2 months ago
Dormant
0/100
last commit about 3 years ago
last release none
releases 0
open issues 21
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

⚠ Unverified source (community-unclaimed, low activity) — reveal the prompt
⚠ Unverified source (community-unclaimed, low activity). Inspect the repo before letting your agent install it.

Install and set up Claude-API (pip project) into my current project.
Found on https://claudeers.com/claude-api
Repo: https://github.com/KoushikNavuluri/Claude-API
Homepage/docs: https://pypi.org/project/claude-api/
Detected install method: pip → pip install claude-api
Category: integrations. Platforms: cli, api, web.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
dormant; community-verified: false. Confirm the source before running anything.
// or install directly (pip)
pip install claude-api
// or clone · unverified · not recently updated
git clone https://github.com/KoushikNavuluri/Claude-API

// compatibility

Platformscli, api, web
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguagePython

Claude AI-API ( Unofficial )

This project provides an unofficial API for Claude AI, allowing users to access and interact with Claude AI .

Claude-API

Current Version == 1.0.17 ( Added Timeouts,Faster Requests,File handling Fixed.. )

Use Cases

1. Python Console ChatBot ( Check in usecases folder for sample console chatbot )

2. Discord Chatbot   

3. Many more can be done....

Prerequisites

To use this API, you need to have the following:

Python installed on your system requests library installed

  pip install requests

Installation

To use the Claude AI Unofficial API, you can either clone the GitHub repository or directly download the Python file.

Terminal :

pip install claude-api

or

Clone the repository:

git clone https://github.com/KoushikNavuluri/Claude-API.git

Usage

Import the claude_api module in your Python script:

from claude_api import Client
  • Next, you need to create an instance of the Client class by providing your Claude AI cookie:

  • You can get cookie from the browser's developer tools network tab ( see for any claude.ai requests check out cookie ,copy whole value ) or storage tab ( You can find cookie of claude.ai ,there will be four values )

  • (Checkout below image for the format of cookie ,It is Better to Use from network tab to grab cookie easily )

    Screenshot (8)

    cookie = os.environ.get('cookie')
    claude_api = Client(cookie)
    

List All Conversations

To list all the conversation Id's you had with Claude , you can use the list_all_conversations method:

conversations = claude_api.list_all_conversations()
for conversation in conversations:
    conversation_id = conversation['uuid']
    print(conversation_id)

Send Message

To send a message to Claude, you can use the send_message method. You need to provide the prompt and the conversation ID:

prompt = "Hello, Claude!"
conversation_id = "<conversation_id>" or claude_api.create_new_chat()['uuid']
response = claude_api.send_message(prompt, conversation_id)
print(response)

Send Message with attachment

You can send any type of attachment to claude to get responses using attachment argument in send_message(). Note: Claude currently supports only some file types.

{ You can also add timeout if you need ,using timeout parameter[default set to 500] }

prompt = "Hey,Summarize me this document.!"
conversation_id = "<conversation_id>" or claude_api.create_new_chat()['uuid']
response = claude_api.send_message(prompt, conversation_id,attachment="path/to/file.pdf",timeout=600)
print(response)

Delete Conversation

To delete a conversation, you can use the delete_conversation method:

conversation_id = "<conversation_id>"
deleted = claude_api.delete_conversation(conversation_id)
if deleted:
    print("Conversation deleted successfully")
else:
    print("Failed to delete conversation")

Chat Conversation History

To get the chat conversation history, you can use the chat_conversation_history method:

conversation_id = "<conversation_id>"
history = claude_api.chat_conversation_history(conversation_id)
print(history)

Create New Chat

To create a new chat conversation (id), you can use the create_new_chat method:

new_chat = claude_api.create_new_chat()
conversation_id = new_chat['uuid']
print(conversation_id)

Reset All Conversations

To reset all conversations, you can use the reset_all method:

reset = claude_api.reset_all()
if reset:
    print("All conversations reset successfully")
else:
    print("Failed to reset conversations")   

Rename Chat

To rename a chat conversation, you can use the rename_chat method:

conversation_id = "<conversation_id>"
title = "New Chat Title"
renamed = claude_api.rename_chat(title, conversation_id)
if renamed:
    print("Chat conversation renamed successfully")
else:
    print("Failed to rename chat conversation")

Disclaimer

This project provides an unofficial API for Claude AI and is not affiliated with or endorsed by Claude AI or Anthropic. Use it at your own risk.

Please refer to the official Claude AI documentation[https://claude.ai/docs] for more information on how to use Claude AI.

// faq

What is Claude-API?

This project provides an unofficial API for Claude AI, allowing users to access and interact with Claude AI .. It is open-source on GitHub.

Is Claude-API free to use?

Claude-API is open-source under the MIT license, so it is free to use.

What category does Claude-API belong to?

Claude-API is listed under integrations in the Claudeers registry of Claude-compatible tools.

0 views
907 stars
unclaimed
updated 2 months ago

// embed badge

Claude-API on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-api.svg)](https://claudeers.com/claude-api)

// retro hit counter

Claude-API hit counter
[![Hits](https://claudeers.com/api/counter/claude-api.svg)](https://claudeers.com/claude-api)

// reviews

// guestbook

0/500

// related in Integrations & Connectors

🔓

Use claude code and codex for free in the terminal, VSCode extension, and discord like OpenClaw (voice supported)

// integrationsAlishahryar1/Python45,500MIT[ claude ]
🔓

Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat…

// integrationschenhg5/Go15,039[ claude ]
🔓

All parts of Claude Code's system prompt, 27 builtin tool descriptions, sub agent prompts (Plan/Explore/Task), utility prompts (CLAUDE.md, compact, statusli…

// integrationsPiebald-AI/JavaScript12,399MIT[ claude ]
🔓

Claude Code skill/plugin: immersive scroll-scrubbed 'fly through the world' landing pages generated with Higgsfield (Emons-style diorama flights, seamless co…

// integrationsoso95/JavaScript8,462MIT[ claude ]

// built by

Ecosystem hubone of the most connected projects in the claude ecosystem · 16 connections
→ see how Claude-API connects across the ecosystem