Apps that can think a little.
Not the assistant that writes your code. The finished app, summarizing, sorting, reading documents, and running multi-step work on its own, hours after you closed the chat. You bring one provider key. The building half lives here.
You ask in English. It ships a working call.
Two lines of config say the app wants an AI key. The handler asks for a model by family name, gives it a tool, and lets the runtime drive the loop. This is the exact shape the platform teaches your agent.
# declares that this app needs an AI key.
# with no providers list, the setup page
# offers all three: anthropic, openai, google.
[ai]
required = true
description = "Triages and answers support mail."
# to accept only one of them instead:
# providers = ["anthropic"]
import { ai, db } from 'hatchable';
export const access = 'member';
export default async function (req, res) {
const { text, steps } = await ai.generateText({
model: 'sonnet', // family, not a dated id
purpose: 'triage', // labels it in ai.usage()
userId: req.member.id,
prompt: req.body.message,
system: 'Sort the message, then draft a reply.',
maxSteps: 8, // cap on the tool loop
tools: [{
name: 'findOrder',
description: 'Look up an order by email.',
inputSchema: { type: 'object', required: ['email'],
properties: { email: { type: 'string' } } },
execute: async ({ email }) => {
const { rows } = await db.query(
'SELECT id, status FROM orders WHERE email = $1',
[email]);
return { orders: rows };
},
}],
});
res.json({ reply: text, rounds: steps.length });
}
An AI gateway you never had to build.
Key handling, model routing, the tool loop, pricing, metering, and a spending ceiling. All of it is already there, and none of it is a plan upgrade.
One key, all your apps
Get a key from Anthropic, OpenAI, or Google, paste it once on your account, and every project you build can use it. Hatchable does not resell inference and adds no markup. Usage is billed by your provider, at their price.
One key behind a reading log, an expense tracker, and a Friday summary.
Ask for a family, not a version
Your code says sonnet or gpt or gemini, and the platform resolves that to the current model in that line. When a new generation ships, the mapping changes centrally and your app does not need a redeploy.
A summarizer written in spring is still on the current model in August.
Multi-step work, not one shot
Hand the model tools like "query the database" or "send an email", set a step cap, and the runtime drives the loop: pick a tool, run it, feed the result back, repeat. Every round trip comes back in a trace you can read.
"Find this customer's order and draft a reply" runs to the end on its own.
Beyond chat
One escape hatch, ai.fetch, reaches any endpoint your provider publishes. Image generation, transcription, speech, file uploads, batches, and anything shipped last week. Same key, no second setup, still nothing exposed to your app code.
A journal app illustrates entries with the same key that powers its summaries.
A ceiling you set
Every project has a daily AI spend limit, ten dollars unless you change it. You get an email at 80 percent. At the limit, AI calls pause with a clear error and resume at midnight UTC, and the rest of the app never stops.
A public endpoint gets hammered overnight and the damage stops at ten dollars.
Every call, priced and logged
Model, token counts, duration, and cost land in the platform ledger on every call, successful or not. One call to ai.usage gives you totals and breakdowns by model, by feature, and by end user.
You find out the auto-tagger, not the chat box, is most of the bill.
Meaning, not just matching
The same key computes embeddings through ai.embed, and the vectors sit alongside your tables. There is no separate vector service to sign up for. More on search.
The meeting archive finds the discussion you only half remember.
Whose key pays
A key can sit on your account and cover every project, live inside one project, or belong to each end user of a multi-tenant app. You choose which, and the platform resolves the right one per call. How scoping works.
Every teacher who copies the worksheet generator adds their own key.
The spec sheet, in plain terms.
ai.generateText({ model, prompt | messages }). The model is always explicit. Returns text, tool calls, finish reason, token usage, and the per-step trace.execute function plus maxSteps above 1 make the runtime drive the loop. Leave execute off and you get the tool calls back to run yourself.ai.fetch({ provider, path, body }) reaches any provider endpoint, including multipart uploads. ai.embed covers embeddings.Behaviour current as of August 2026. The spend cap is console-only on purpose, so an agent can never raise its own ceiling.
Say it like this.
You never name a model or write a prompt template. These are ordinary asks that turn into real calls, with the labels and the guardrails already attached.
Asked and answered.
Do I buy AI credits from Hatchable?
No, and there are none to buy. You bring your own key from Anthropic, OpenAI, or Google. Hatchable does not resell inference and adds no markup, so usage is billed by your provider at their price. Paste the key once and every project on your account can use it.
Which providers can my app use?
Three: Anthropic, OpenAI, and Google. One key from any of them is enough to start. Your code asks for a model family like sonnet or gpt or gemini, and the platform resolves that to whichever provider you have a key for.
What stops a runaway loop from emptying my provider account?
Every project has a daily AI spend ceiling, ten dollars by default, which the owner can change in the project console. You get an email at 80 percent. At the ceiling, AI calls pause with a clear error and resume at midnight UTC. The rest of the app keeps working the whole time.
Can I see what the AI is costing me?
Yes. Every call is logged with its model, token counts, duration, and priced cost. One call to ai.usage() returns totals plus breakdowns by model, by the feature label you set, and by end user, over the last day, week, month, or month to date.
Is this the same as the AI that builds my app?
No, they are two separate things. Your assistant builds and runs the project through MCP, on its own subscription. This page is about the finished app calling a model at runtime, on your provider key, while nobody is watching. Most apps end up doing both.
Can each of my users bring their own key?
Yes, if the app is built that way. A key can live on your account and be shared across your projects, sit inside one project, or belong to each end user of a multi-tenant app. The secrets page covers how the three scopes differ.
More detail lives in AI keys explained and the SDK reference.
One key. Every app you build.
Paste one provider key, describe the feature you want, and the app starts thinking on its own. Nothing to buy from us, and no gateway to wire up first.
New to all this? AI keys explained covers where a key lives and who gets the bill.