An unofficial API for Character AI for Python using Playwright
If you have any questions or just want to chat about character.ai, go to Telegram chat
pip install characterai
Simple code for chatting with character
from characterai import PyCAI
client = PyCAI('TOKEN')
while True:
message = input('You: ')
data = client.chat.send_message('CHAR', message)
message = data['replies'][0]['text']
name = data['src_char']['participant']['name']
print(f"{name}: {message}")
The library has documentation! It says everything about this library
- The only library for character.ai
- Asynchronous
- So easy to use
This library is written by a beginner in python, if you have any problems, write to me in Telegram