Character cards: what is inside and how they are used
A character card is a file, usually a PNG image with embedded JSON, that stores everything a roleplay frontend needs to play a character.
What a character card is
Character cards are the standard way to share roleplay characters between frontends such as SillyTavern, Agnai, RisuAI and others. Most are PNG images: the picture is the character's avatar, and the character data is stored as base64-encoded JSON in a text chunk of the PNG (named chara, with V3 cards also using ccv3). Some are distributed as plain JSON. Editing the image in a normal image editor often strips that chunk, which is why a re-saved card can lose its character.
The fields and what they do
The widely used Character Card V2 spec (and its successor V3) defines fields including:
- name: the character's name, substituted for the
{{char}}macro. - description: the main body of who the character is. Always sent.
- personality and scenario: shorter summaries of temperament and setting.
- first_mes: the first message that opens the chat, plus alternate_greetings.
- mes_example: example dialogue showing voice and format.
- system_prompt and post_history_instructions: optional card-specific instructions that can replace the frontend's defaults.
- character_book: an embedded lorebook.
- creator_notes, tags, creator: metadata for humans, not sent to the model.
How a card becomes a prompt
The frontend does not send the card as a file. It pastes the relevant fields into the prompt as text, in an order set by your preset, together with your persona and system prompt. Macros like {{char}} and {{user}} are replaced with names first. So a card is only as good as the text inside it, and its size comes straight out of your context window on every request.
Writing a good card
- Show, then tell. The first message and examples shape the output more than adjectives in the description. Write them in the style you want back.
- Concrete details. Habits, speech patterns, wants and specific history beat lists of traits like "kind, mysterious, loyal".
- Keep it tight. 500 to 1,500 tokens is plenty for most characters. Put setting details that only matter sometimes in a lorebook.
- Do not write the user. A first message that narrates what
{{user}}does teaches the model to keep doing it.
Using cards with Wild West API
Cards work the same on any backend, because the frontend turns them into ordinary messages. Import the card in SillyTavern, connect Chat Completion with the custom OpenAI-compatible source pointed at https://wildwestapi.com/v1, and pick a model. See the SillyTavern setup guide. Since the models are uncensored, cards do not need jailbreak text bolted on.
FAQ
Why did my character card lose its data?
The character is stored in a text chunk inside the PNG. Re-saving or compressing the image in many editors and chat apps strips that chunk.
How long should a character card be?
Most good cards are between 500 and 1,500 tokens. Longer is fine for complex characters, but every token is resent on each turn.