Every AI call inside an app you ship with DontCode draws from the same credit balance you use in the editor. When that balance hits zero, the AI features in your live app pause until you refill. Here is exactly what that looks like for you and for your users.
If your app uses AI image analysis, text generation, agents, or image generation, those calls cost money on every request. End users of your app cannot top up your account, so they cannot fix it when it stops working. You can. This page explains what happens at the wall, what your users see, and what email lands in your inbox.
There is one shared credit pool per DontCode account. The editor (the AI that writes your app) and the deployed app (the AI features your users invoke) both pull from it. Pricing is per-token for chat / vision / agents and per-image for generation, with a small platform markup over the underlying model cost.
We check your balance before every AI call. If it is at or below zero, the call is rejected before any AI runs (you are not charged for a partial failed call). The deployed app receives a structured 402 response that the @dontcode/ai SDK turns into a typed InsufficientCreditsError.
On the very first rejection per project per 24 hours, we also send you an email at your account address. Subsequent rejections inside that 24-hour window are silently counted but do not re-email you, so a busy app cannot spam your inbox. Once you top up, the counter resets and the next-time-it-happens email is armed again.
By default, the SDK surfaces a generic English (or Korean) message: "This feature is temporarily unavailable. The site owner has been notified." We deliberately do not say "out of credits" or mention DontCode to your end user. They are not your billing contact, do not know what credits are, and seeing platform branding inside your app would be confusing.
You can override this copy in your own code if you want a more product-specific message (for example, "Your monthly AI quota has been used up, contact support"). The SDK exposes `error.userFacingMessage` and `error.userFacingMessageKo`, plus a stable `error.code === "INSUFFICIENT_CREDITS"` to detect the case.
Detecting it in your client app
import { isInsufficientCreditsError, useChat } from '@dontcode/ai/client'
function MyChatPage() {
const { error } = useChat({ intent: 'balanced' })
if (isInsufficientCreditsError(error)) {
// Show a friendly message. The owner has already been notified.
return <p>{error.forLocale('en')}</p>
}
// ...your normal UI
}When your app blocks its first request after running out, you will get an email at your account address from "DontCode Billing". The subject reads:
[DontCode] "YourProjectName" is out of AI credits
The body confirms which project ran out, which AI feature was blocked (chat, vision, image generation, or agent), how many user requests have been blocked since the balance hit zero, and a direct link to top up. Once you refill, AI features resume immediately. No redeploy needed.
"quick" uses our smallest model and costs the least. "balanced" is a good default. Only use "thorough" when accuracy genuinely matters more than cost.
Your project credits balance and usage history are visible in the billing area of the dashboard. Set a calendar reminder to check it weekly until you have a feel for your burn rate.
On the Billing page, Auto purchase buys a credit package whenever your balance drops below a level you pick ("Buy when below"). It needs a card payment method. The 24h owner email is a safety net, not a substitute for monitoring.
The default error message is intentionally vague. If you run an internal team app or a small customer base, you may want to override it with copy that mentions support contact details.
When users tell you the AI feature is broken, check these in order:
Open the billing area to see your current balance and refill options.
Billing questions are the kind of thing we want to answer quickly. Email us, we read everything.