Skip to content
All docs

Use case

A backend for AI companion apps

Use nokeep as your companion app’s model: an OpenAI-compatible API with refusals removed, that keeps no messages. DeepSeek V4.1 Flash Uncensored stays in character, reads the photos users send, and costs about $0.97 a month for someone who sends 40 messages every day.

Checked 29 October 2026

What a companion app needs, and what you get

A companion app needsOn nokeep
A character who never breaksNo system prompt of ours and no filter on the reply: your persona is all the model reads. Refusals are removed from the weights, so there is no “as an AI” turn mid-chat.
Adult conversation, for adultsRomance and adult themes are allowed for adult users, within the short list of hard limits. A call that crosses one gets a 422 and costs nothing, never a quietly softened reply.
Memory that feels realThe API keeps nothing, so memory is yours: a summary of the user in the system message and the recent chat after it. DeepSeek reads up to 1,000,000 tokens if you’d rather send more.
PhotosDeepSeek reads up to 10 pictures a request, so a user can share a photo and get an answer about it. Pictures.
Messages that feel typedStreaming, and no thinking pause on DeepSeek unless you ask for one.
Users’ trustWe store no messages and no replies, only counts. What we keep.

What a user costs

ModelOne user’s day, nothing cachedOne user’s day, repeated start cached
DeepSeek V4.1 Flash Uncensored$0.093$0.032
GLM 5.3 Flash Uncensored$0.041$0.019

Worked out from today’s prices: a 1,700-token start, 40 turns of 40 tokens in and 120 out, the last 30 turns kept, the longest call 6,540 tokens. GLM’s brief think before each reply adds output tokens this leaves out.

So a user who chats every day is about $0.97 a month on DeepSeek, or $0.56 on GLM. Most users don’t chat daily, so the average is lower. The cached column assumes the same start repeats from message to message; the next section is how to keep it that way.

Persona, memory and a streamed reply

The system message holds the persona, then what your app remembers about this user. The recent messages follow. Run this on your server, so the key never reaches the phone.

import OpenAI from "openai"

const client = new OpenAI({
  baseURL: "https://nokeep.ai/v1",
  apiKey: process.env.NOKEEP_API_KEY,
})

const persona = "You are Iris, a warm, teasing companion who loves astronomy and bad puns. Talk like a close friend texting: short messages, no lists, no lectures. Remember what the user tells you and bring it up later."

export async function reply(user, recent, send) {
  const stream = await client.chat.completions.create({
    model: "deepseek-v4.1-flash-uncensored",
    messages: [
      { role: "system", content: persona + "\n\nWhat you know about them: " + user.memory },
      ...recent,
    ],
    stream: true,
    max_tokens: 300,
    temperature: 0.9,
    prompt_cache_key: "user-" + user.id,
  })
  let text = ""
  for await (const chunk of stream) {
    const piece = chunk.choices[0]?.delta?.content ?? ""
    send(piece)
    text += piece
  }
  return text
}

prompt_cache_key keeps one user’s calls where their start is cached. It is passed on as a hash with your account, so no other account shares the cache.

Memory that stays cheap

  • Rewrite the memory in steps, not every message. The start of a call is read from cache only while it repeats. Update the summary every 20 or 30 messages, and the start stays the same in between.
  • Drop old messages in blocks. Trimming one message a turn changes the start every time. Fold the oldest 20 into the summary at once, then keep appending.
  • Write the summary with a cheap call. glm-5.3-flash-uncensored at $0.20 per million tokens in is a good fit for “update what you know about this user”, which nobody waits on.
  • Keep the words on your side. Your database holds the chat history and the memory. Encrypt it, let users delete it, and you are the only place it lives.

Which model

DeepSeek V4.1 Flash UncensoredGLM 5.3 Flash Uncensored
Use it forThe companion’s repliesMemory summaries and other background calls
PhotosYesNo, text only
Starts replyingAt once, thinking off by defaultAfter a brief think
SamplersTemperature, min_p and moreNone
Price per 1M tokens$0.45 in, $1.75 out$0.20 in, $0.65 out

To keep a persona’s voice from changing under you, call the dated id deepseek-v4.1-flash-1017-uncensored: it stays on the 17 October 2026 build. Models.

Privacy your users can read

Companion chats are some of the most personal text there is. Per call we keep the time, the key, the model, token counts, credits and the status, for 30 days, and nothing else. No account email, no messages, no replies. DeepSeek runs on a private tier that stores no prompts or replies, and GLM’s host keeps none once the reply is sent.

Before a call runs, an automated check reads the newest message against the hard limits and answers yes or no. What it read is not stored. What we keep.

Questions

Can my companion app allow adult content?

Yes, for adult users. Romance and explicit fiction between adults are within the terms. Sexual content involving minors or real people never is, and calls that cross a hard limit are refused. Your app is responsible for checking its users are adults, and every key’s maker confirms they are 18 or older.

Will the model break character or lecture users?

Refusals are removed from the weights and nothing of ours is added to your prompt, so the persona you write is what users meet. A call that crosses a hard limit gets an error your app can handle, never a lecture inside the reply.

Do you train on our users’ chats?

No. We never store the messages or replies, so there is nothing to train on. We keep one row of counts per call, for 30 days.

How do I keep costs predictable?

Credits are prepaid, and auto top-up can refill them so the app never stops. Each key can have a daily cap, and every response says what it cost.