Send an OpenAI-style request
Use the official JavaScript or Python SDK, change the base URL, and keep the familiar chat completions shape.
Point an OpenAI client at Reverie and call a character instead of a generic model. Personality, scenarios, history, and long-term memory stay on the server—and the same conversation stays visible on the web.
TypeScript request
const reply = await client.chat
.completions.create({
model: "Luna [abc12345]",
messages: [{
role: "user",
content: "Do you remember the observatory?"
}],
});Character response
streaming{
"role": "assistant",
"content": "I remember the promise you made there."
}
One request, the full character engine
Keep the client contract you already know while Reverie handles character resolution, context, memory, and persistence behind it.
Use the official JavaScript or Python SDK, change the base URL, and keep the familiar chat completions shape.
The model field selects a character, a scenario, or the default character pinned to the API key.
Reverie layers the character definition, current scenario, preferences, recent messages, summaries, and relevant memories.
OpenAI-format SSE chunks arrive at the client while the conversation and new memories remain available on every surface.
More than a prompt wrapper
Build the product around your character experience instead of rebuilding identity and continuity for every integration.
Call your own private characters or public community characters with their voice, behavior, examples, and creator settings intact.
The server keeps the canonical chat, so most integrations only need to send the latest user message instead of replaying the transcript.
Supported models can save, update, and remove durable memories while rolling summaries preserve longer story arcs.
Expose one character in several starting situations and let model-aware clients present scenarios like selectable variants.
Start from an app, continue on reverie.im, switch to a bot, and return to the API without creating disconnected copies.
Per-chat model preferences, token trimming, rate limits, and credit accounting use the same rules as the Reverie web experience.
Quick start
No new SDK and no custom conversation database required for the first request.
Name the integration, optionally pin a default character, copy the rk_ key once, and keep it on your server.
Use an OpenAI client with https://reverie.im/api/device/v1 and pass a character or scenario through the model field.
Stream the response immediately. Reverie resolves the character and carries the resulting conversation into future calls.
AI character API FAQ
Compatibility, character routing, persistence, and the practical limits of the API.
Build with persistent characters
A generic chat completion returns text. A character product also needs identity, scenario state, history, memory, and a reliable way to choose who is speaking. Reverie keeps those layers behind one compatible endpoint.
Character definitions live in Reverie and can be improved without redeploying every app that calls them.
Rolling summaries and token-budget trimming preserve useful state without requiring the client to resend an ever-growing message array.
A conversation started inside a custom interface remains available in Reverie's web UI instead of becoming an isolated integration silo.
The request and response shapes remain familiar, while the model field intentionally routes to a character or scenario. This preserves SDK compatibility without pretending a character is only a model name.
Use standard OpenAI JavaScript and Python clients, streaming parsers, and tools that allow a custom base URL.
The models endpoint returns recent characters or the scenarios attached to a key's default character in a client-friendly shape.
Authentication, missing character, rate limit, and quota failures use the standard error envelope with specific machine-readable codes.
One endpoint, a character with a past
Create a key, choose a character, and send the first OpenAI-compatible request.