Skip to main content

An unofficial API for character.ai for Python

Project description

💬 CharacterAI

Tag Tag Downloads

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

💻 Installation

pip install characterai

📙 Example

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}")

📚 Documentation

The library has documentation! It says everything about this library

⭐️ Features

  • The only library for character.ai
  • Asynchronous
  • So easy to use

⚠️ Disclaimer

This library is written by a beginner in python, if you have any problems, write to me in Telegram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

characterai-0.6.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page