Unofficial Python client for juicychat.ai
Project description
JuicyChat Client
Unofficial Python client for JuicyChat. It handles login, encrypted request/response payloads, and provides a CLI for interactive chat, character search, user discovery, personas, and tasks.
Features
- Authentication — Login with user number and password
- Characters — Search characters by term, tags, gender, and sort order; get character details
- Chat — Send messages and stream replies; list, clear, and delete chat history
- Users — Search users, view profiles, follow/unfollow
- Creator Rankings — Browse ranked creators (monthly, all-time, new creators)
- Personas — Create personas and attach them to character chats
- Tasks — View task list, check progress, claim task rewards
- Content Filter — Toggle NSFW content filter
- Crypto — AES-encrypted API payloads; key/IV from env or auto-discovered from the site bundle
- Bundle Discovery — Extract crypto keys, app version, and API endpoints from the site JS bundle
Requirements
- Python 3.11+
cryptography,python-dotenv,requests(seepyproject.toml)
Installation
pip install juicychat-client
Configuration
Credentials and crypto can be set via environment variables or a .env file.
| Variable | Description |
|---|---|
JUICYCHAT_USERNUMBER |
Account user number |
JUICYCHAT_PASSWORD |
Account password |
JUICYCHAT_KEY |
16-byte AES key (UTF-8) for request/response encryption |
JUICYCHAT_IV |
16-byte AES IV (UTF-8) |
If JUICYCHAT_KEY and JUICYCHAT_IV are not set, the client will fetch the site's JS bundle and extract the current key/IV automatically. For stability, setting them in .env is recommended once you have them.
Usage
CLI
Run the interactive menu (login uses env or prompts for user number/password):
juicychat
# or
python -m juicychat.cli
Menu options (available options depend on whether a conversation is selected):
- Select Conversation — Pick from existing chat relations
- Continue Conversation — View history and send messages in the selected chat
- Clear Conversation — Clear message history for the selected chat
- Delete Conversation — Remove the selected chat relation
- Character Detail — View details for the selected character
- Search Characters — Search and select a character
- Get Task List — View available tasks
- Create Persona — Create a new persona (title, name, description, gender, age)
- User Info — View current user details
- Toggle Content Filter — Toggle the NSFW content filter on/off
- Search Users — Search for users and view their profiles
Library
import os
from dotenv import load_dotenv
from juicychat.client import JuicyChatClient, Gender, SortName
load_dotenv()
client = JuicyChatClient(
user_number=os.getenv("JUICYCHAT_USERNUMBER"),
password=os.getenv("JUICYCHAT_PASSWORD"),
key=os.getenv("JUICYCHAT_KEY"),
iv=os.getenv("JUICYCHAT_IV"),
)
info = client.get_user_info()
characters = client.search_characters("elf", gender=Gender.FEMALE, sort_name=SortName.POPULAR)
relations = client.get_chat_relations()
reply = client.send_chat_message(character_id="...", message="Hello")
Client Methods
User
get_user_info()— Current user detailsget_other_user_info(user_id)— Another user's profileget_user_coins()— Coin balanceget_user_progress()— Task/level progressget_user_checkin_prompt()— Daily check-in promptget_user_claim_coupon()— Claim available couponupdate_content_filter(allow_nsfw)— Toggle NSFW content filter
Characters
search_characters(search_content, character_tags, gender, sort_name, page_no, page_size)— Search charactersget_character_list_and_config(...)— Characters with site configget_character_detail(character_id)— Full character details
Chat
get_chat_relations(page_no, page_size)— List chat relationsget_chat_config(character_id)— Chat configuration for a characterget_chat_messages(character_id, chat_id)— Message historysend_chat_message(character_id, message, request_type)— Send message and get streamed replyclear_chat_history(character_id)— Clear chat messagesdelete_chat_relation(character_id)— Remove a chat relation
Personas
get_personas(page_no, page_size)— List personascreate_persona(title, name, description, gender, age)— Create a personaset_persona(character_id, persona_id)— Attach a persona to a chat
Tasks
get_tasks()— List available tasksget_task_progress(task_id)— Progress for a specific taskclaim_task_reward(task_id)— Claim a task reward
Social
search_users(search_content, page_no, page_size)— Search usersfollow_user(user_id)/unfollow_user(user_id)— Follow or unfollow a userget_ranked_creators(ranking_type, page_no, page_size)— Creator leaderboard
Other
get_launch_data()— App launch/config data
Enums
SortName—EDITOR_CHOICE,FOLLOWING,NEW,POPULAR,RECENT,TRENDINGGender—ALL,FEMALE,MALE,NON_BINARY,TRANS_MALE,TRANS_FEMALETaskId—DAILY_CHECK_IN,SEND_10_MESSAGES,CHAT_3_CHARACTERS,DAILY_FOLLOWING,GENERATE_IMAGERankingType—ALL_CREATORS_MONTHLY,NEW_CREATORS_MONTHLY,ALL_CREATORS_ALL_TIME,NEW_CREATORS_ALL_TIME
Standalone Tools
Bundle discovery — extract crypto keys, app version, and API endpoints:
python -m juicychat.discover
Decrypt response data — decrypt an encrypted API response from a file or stdin:
python -m juicychat.crypto response.txt
# or
echo "..." | python -m juicychat.crypto
Notes
- Unofficial — This project is not affiliated with JuicyChat. The API may change; key/IV discovery depends on the current web bundle.
- Credentials — Store user number, password, and key/IV securely.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file juicychat_client-0.2.22.tar.gz.
File metadata
- Download URL: juicychat_client-0.2.22.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae5b42e57488e7e2b97300e51ce6fa25e9dec020dc5365cab09f7bf5f7b3a334
|
|
| MD5 |
15a39cf5d42813f6c41677b13339b509
|
|
| BLAKE2b-256 |
09392d27933f707832b10f013de3074ded8e88f0b437410a97129c0c17855074
|
Provenance
The following attestation bundles were made for juicychat_client-0.2.22.tar.gz:
Publisher:
publish-to-pypi.yaml on kirby900/juicychat-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juicychat_client-0.2.22.tar.gz -
Subject digest:
ae5b42e57488e7e2b97300e51ce6fa25e9dec020dc5365cab09f7bf5f7b3a334 - Sigstore transparency entry: 1265251538
- Sigstore integration time:
-
Permalink:
kirby900/juicychat-client@87ef9113dfdcc4c2f8ac9a60729546b61eff10b7 -
Branch / Tag:
refs/tags/v0.2.22 - Owner: https://github.com/kirby900
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@87ef9113dfdcc4c2f8ac9a60729546b61eff10b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file juicychat_client-0.2.22-py3-none-any.whl.
File metadata
- Download URL: juicychat_client-0.2.22-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81005c28a172700577791c7d9d130d14859cd5ff3fccdef2fa482e58a1a0f5a4
|
|
| MD5 |
1b61fff51dc507a8f580f354e5949bd8
|
|
| BLAKE2b-256 |
fea9538460fdae1cd68f9f543ce13ab5b19b965447ead9b43853926aa17ce981
|
Provenance
The following attestation bundles were made for juicychat_client-0.2.22-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on kirby900/juicychat-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juicychat_client-0.2.22-py3-none-any.whl -
Subject digest:
81005c28a172700577791c7d9d130d14859cd5ff3fccdef2fa482e58a1a0f5a4 - Sigstore transparency entry: 1265251780
- Sigstore integration time:
-
Permalink:
kirby900/juicychat-client@87ef9113dfdcc4c2f8ac9a60729546b61eff10b7 -
Branch / Tag:
refs/tags/v0.2.22 - Owner: https://github.com/kirby900
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@87ef9113dfdcc4c2f8ac9a60729546b61eff10b7 -
Trigger Event:
push
-
Statement type: