CAINode
The Lightweight Unofficial Character.AI API for Node.js / Deno / Bun.
Install / Use
/learn @KevinAdhaikal/CAINodeREADME
CAINode
The Lightweight Unofficial Character.AI API for Node.js / Deno / Bun
Access Character.AI via pure JavaScript – no Puppeteer, no browser automation, just WebSocket + HTTPS.
Built for developers who want to chat with Character.AI programmatically using modern JavaScript runtimes (Node, Deno, Bun).
⭐️ Easy-to-use API | 🔥 Lightweight & Fast | 💬 Supports Streaming & History | 🧠 Designed for Bots, CLI & Automation
🚀 Features
CAINode supports nearly all Character.AI features – designed for both simple and advanced use cases:
⚙️ Core Features
- ✅ Lightweight – No Puppeteer, no headless browser. Uses native WebSocket + Fetch
- ✅ Cross-runtime – Works with Node.js, Deno, and Bun
- ✅ Fully Async – Promise-based, easy integration
- ✅ Streaming Chat Support – Typing-style responses, streamed token by token
💬 Chat Support
- 🧠 Single Chat – Chat with any character
- 👥 Group Chat – Chat with multiple characters in one conversation
- 📝 Chat History – Fetch previous messages with metadata
- 🎤 Voice Call Support – Full support for voice interactions with characters
🧩 Character & User Control
- 🔍 Search Characters – Explore, get trending, featured, or searched characters
- 👤 User Profiles – Fetch profile data, persona, and more
- 🧠 Persona Management – Edit and apply custom persona to your characters
🖼️ Media & Generation
- 🖼️ Image Generation – Send prompts, receive image replies
- 🎨 Image Uploading Support – Upload image to use in messages
💥 Bonus
- ⚡ Blazingly Fast – Low latency communication via WebSocket
- 📚 Typed (with JSDoc) – Great autocomplete in editors like VSCode
Table of contents
- Getting Started
- Install - How to Install CAINode Library.
- Example Usage - Example Usage to using CAINode Library.
- Main Function List
- login - Start client initialization with login.
- generate_token_auto - Generate your Character.AI Token by email. and you will get the token by just pressing the button when you receive the email.
- ping - Pings the Character AI server's health check endpoint.
- logout - Logout from the Character.AI.
- User Function List
- user.info - Get current information account.
- user.change_info - Change current information account.
- user.settings - Get current settings information account.
- user.refresh_settings - Refresh current user settings.
- user.update_settings - Update user settings by your own settings.
- user.public_info - Get user public information account.
- user.public_info_array - Get user public information account. same like
public_info(), but this function have less information. - user.public_following_list - Get public user following list.
- user.public_followers_list - Get public user followers list.
- user.following_check - Check are you following this user account or not.
- user.following_list_name - Get account following name list.
- user.followers_list_name - Get account followers name list.
- user.follow - Follow user account.
- user.unfollow - Unfollow user account.
- user.liked_character_list - Get a list of characters that the account likes.
- user.add_muted_words - Add muted words.
- user.remove_muted_words - Remove muted words.
- user.clear_muted_words - Clear muted words.
- Image Function List
- image.generate_avatar - Generate avatar image using prompt.
- image.generate_image - Generate image using prompt.
- Search Function List
- search.list_tags - Get list of tags.
- search.users - Search users by name.
- search.scenes - Search scenes by query.
- search.characters - Search for a characters by name.
- search.voices - Search for a voices by name.
- search.popular - Get popular search.
- search.trending - Get trending search.
- search.autocomplete - Get autocomplete search.
- search.languages - Get languages list.
- Persona Function List
- persona.create - Create your personality for your character.
- persona.set_default - Set your default personality specifically.
- persona.list - Get all your personality data.
- persona.info - Get your personality information.
- persona.update - Update your personality specifically.
- persona.delete - Delete your personality spesifically.
- persona.set_character - Set a custom personality for your character specifically.
- Explore Function List
- explore.featured - Get a list of characters displayed by the Character.AI server.
- explore.for_you - Get a list of characters recommended by the Character.AI server.
- explore.simillar_char - Get a list of simillar character from ID character.
- explore.character_categories - Get a list of characters from the character category exploration.
- explore.featured_voices - Get a list of featured voices.
- Character Function list
- character.votes - Get character vote information.
- character.votes_array - Get character vote information in array.
- character.vote - Used for vote the character.
- character.info - Get detailed information about characters.
- character.recent_list - Get a list of recent chat activity.
- character.connect - Connect client to character chat.
- character.disconnect - Disconnecting client from character chat.
- character.send_message - Send message to character.
- character.generate_turn - Generating message response from character.
- character.generate_turn_candidate - Regenerate character message.
- character.create_new_conversation - it will create a new conversation and your current conversation will save on the history.
- character.delete_message - Delete character message.
- character.edit_message - Edit the character message.
- character.replay_tts - Generate text messages from character to voice audio.
- character.current_voice - Get character current voice info.
- character.get_category - Get category used of the character.
- character.about - Get detailed information of the character about.
- character.info_detailed - Get detailed of the character. but, it will give you a FULL detailed of the Character, including character definition.
- Group Chat Function List
- group_chat.list - Get all list available group chat in account.
- group_chat.connect - Connecting to group chat by the Room ID.
- group_chat.disconnect - Disconnect from group chat.
- group_chat.create - Create group chat.
- group_chat.delete - Delete group chat.
- group_chat.rename - Rename group chat.
- group_chat.join_group_invite - Joining group chat using invite code.
- group_chat.char_add - Add a character with Character ID to the group chat.
- group_chat.char_remove - Remove a character with Character ID from the group chat.
- group_chat.send_message - Send message to group chat.
- group_chat.generate_turn - Generating message response character from group chat.
- group_chat.generate_turn_candidate - Regenerate character message.
- group_chat.reset_conversation - Reset
