Unlike ChatGPT, there is currently no official Character AI API.
This means the only officially-supported way you can interact with Character AI’s model is through the official web or mobile app.
However, there are alternative workarounds available to access Character AI’s services outside of the platform.
In this post, I will provide an overview of Character AI’s API and highlight some third-party community projects that allow you to tap into the platform’s server.
What Is A Character AI API
An API, or Application Programming Interface, is a set of rules and protocols that allows different software applications to communicate and interact with each other.
It acts as a bridge, enabling software programs to access and use functionalities or data from another software without needing to understand how that software is implemented.
OpenAI offers a popular API for its GPT models that allow users to connect different apps and personal projects directly to the service.
This API can power chatbots, knowledge hubs, and creativity tools.
Character AI is increasingly popular among users interested in roleplaying, fanfiction, and other creative outlets.
Many of these users are technically inclined and interested in customizing their experience by using a Character AI API in a similar manner to the OpenAI APIs.
Is There A Character AI API?
No, there is not an official Character AI API.
According to Character AI’s official FAQ page, the platform does not have an API.
But the team is open to hearing about potential use cases from users looking to connect to Character AI’s services through alternative means.
The good news is that there are a handful of unofficial solutions that can be found on GitHub.
Project | Link |
---|---|
An unofficial API for Character AI for Python | Link |
Node.js client for the unofficial Character AI API | Link |
Character AI Discord Bot
If you are looking for a Character AI API in order to create a Discord bot, there are several folks who have built solutions that are available on GitHub.
These projects allow you to use your Character AI account to add a Character AI bot to any Discord channel.
I haven’t personally tried any of these, but this project could potentially save you a few hours of trying to build your own solution.
How To Find Character AI API Key
When you are in a Character AI chat, press Ctrl+Shift+S in Chrome.
This will open the Inspect screen in your browser.
Click on Application and then Local Storage to open a view that shows your API key.
Character AI API Alternative
While it’s frustrating that Character AI does not offer an official API, it’s understandable that the company wants to retain full control over its internally-developed AI models.
The good news is that there are several Character AI alternatives powered by private AI models and public LLMs (large language models).
Related: Character AI Alternatives
OpenAI API
The most popular option is OpenAI’s GPT API.
This API allows you to interact with the same model that runs ChatGPT.
According to anecdotal user reports, the OpenAI APIs seem to have a much more forgiving content filter compared to the ChatGPT app.
Related: ChatGPT vs. Playground
This means you might have more luck with roleplaying and creative fiction writing that would otherwise trigger an inappropriate content filter in ChatGPT or Character AI.
NovelAI API
NovelAI is a popular alternative to Character AI.
The platform does not have a strict content filter, making it an appealing option if you frequently run into issues with suggestive content.
NovelAI API Setup Guide
In order to access the NovelAI API, you need to find your API key and connect it to an app like TavernAI or SillyTavern.
Find your NovelAPI key, by logging into your account and creating a new story.
Then open ‘network tools’ in your Chrome or Firefox browser by pressing Ctrl+Shift+I.
Generate something in the NovelAI app, then select the second option (post) in your network tools view.
Below, you will see a series of values under headers.
The long alphanumeric value after ‘Authorization: Bearer’ is your API key.
Note: Bearer is not part of your API key, just use the text after that
Silly Tavern
If you don’t want to build your own application to connect to various AI chat API’s, the best bet is to use a pre-built user interface like SillyTavern.
This community project lets you plug in your personal API key from services like OpenAI and NovelAI.
Related: Silly Tavern: Overview & How to Get Started
FAQ
How do I get Character AI API?
There is currently no official Character AI API available.
However, it is possible to identify your Character AI API key and use third-party solutions to query Character AI’s servers outside of the app.
Alternatively, you can reach out to the Character AI team if you have an API use case in mind. (info@character.ai)
Which LLM does Character.AI use?
Character AI uses an internally developed AI model.
The team has said that they have trained their own language models from scratch.
This would imply that Character AI does not leverage the same LLM that powers ChatGPT.