AI code generator: the four kinds, and when one is enough

An AI code generator turns a description into code in one pass. That single property, one pass, is what separates it from an agent and explains everything else: why it is cheap, why it is fast, and why it cannot tell you whether what it wrote works.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

An AI code generator produces code from a natural-language description or a formal spec in a single pass, without running it. There are four kinds: inline completion, chat to snippet, prompt to app builders, and deterministic scaffolding from a schema. A generator is enough whenever you can verify the output by reading it. Anything that has to pass a test needs an agent, which is a generator wrapped in a loop.

What you need to know
  • A generator produces code in one pass. It never runs what it wrote.
  • Four shapes: completion, chat, app builder, and schema scaffolding.
  • The oldest and most reliable generators are not AI at all.
  • Free is a real option: Copilot Free, v0 Free, Gemini CLI, Cursor Hobby.
  • The test: can it read the result of running its own output? If not, it is a generator.

What an AI code generator actually is

An AI code generator takes a description of what you want, in English or as a formal schema, and emits code. One request, one answer. It does not compile the result, run your tests, read the error, or try again. If the output is wrong, you find out, not the tool.

That is the whole definition, and it is worth being precise about because the market uses "code generator", "AI coding assistant", and "AI coding agent" interchangeably for products that behave very differently and cost between nothing and $200 a month.

The difference in one picture.
GENERATOR                        AGENT

you describe an outcome          you describe an outcome
  model emits code                 model reads your files
you read it                        model writes code
you run it                         model runs the tests
you fix it                         model reads the failure
                                   model tries again
                                 you review a diff

The four shapes

Every AI code generator is one of these.

ShapeYou give itYou get backExamples
Inline completionA cursor position and some contextThe next linesCopilot, Cursor Tab
Chat to snippetA question in proseA block you pasteChatGPT, Claude, Gemini
Prompt to appA description of a productA running project and a URLv0, Lovable, Bolt, Replit
Schema scaffoldingA spec or a data modelExactly correct code, every timeOpenAPI Generator, Prisma, protoc

1. Inline completion

The highest-volume form by a wide margin, and the one most people mean by "AI writes my code". It predicts the next few lines where your cursor is, and you accept or reject with a keystroke. It is the cheapest to run and the easiest to verify, because you are looking at it as it appears.

2. Chat to snippet

You ask a general assistant for a function, a regex, a config block, or a migration, and paste the result. Underrated for how much it gets used: an enormous amount of real code enters real repositories through a clipboard. The risk is also highest here, because the model has no view of your codebase at all and no way to know what conventions it is violating.

3. Prompt to app builders

Describe a product, get a working project with a UI, a database, authentication, and a deploy URL. These blur the line, because most of them now iterate on their own output, which makes them agents wearing a generator interface. Judge them on whether you get the code, and on what happens on the second change rather than the first.

4. Schema scaffolding, which is not AI

The oldest category and still the most reliable. openapi-generator from an OpenAPI document, a Prisma client from a schema, gRPC stubs from a .proto, rails generate, create-next-app. These are deterministic: the same input produces the same output, forever, and it is correct by construction rather than by review.

The landscape, priced

Checked against vendor pricing pages, August 2026.

ToolShapeFree tierPaid from
GitHub CopilotCompletion2,000 completions and 50 chat requests a month$10/mo Pro
CursorCompletion and agentHobby, limited$20/mo Pro
Gemini CLITerminal agent60 requests/min, 1,000/dayAPI key or Vertex
ChatGPTChat to snippetYes, limited$20/mo Plus
ClaudeChat to snippetYes, limited$20/mo Pro
v0Prompt to app$5 of credits, 7 messages a day$30/user/mo Plus
ReplitPrompt to appStarter, daily agent credits$25/mo Core
Lovable, BoltPrompt to appYes, credit-basedCredit tiers
OpenAPI Generator, PrismaSchema scaffoldingFree, open sourcen/a

Prompt-to-app builders price in credits rather than seats, which behaves differently from a subscription: the first version of an app is cheap and the twentieth revision of it is not. Budget for iteration, because that is where the credits go.

When a generator is enough

The rule is simple and it holds up: a generator is enough whenever you can verify the output by reading it. If reading it is not sufficient proof, you need something that can run it.

TaskGenerator is enoughWhy
A regex you will test with three examplesYesVerification is seconds
Boilerplate in a framework you knowYesYou will spot anything wrong
A one-file utility scriptYesSmall enough to read entirely
A UI component from a descriptionYesYou can see whether it looks right
Learning an unfamiliar APIYesYou wanted the shape, not the code
A SQL migrationCarefulReadable, but the blast radius is large
A change that must pass an existing testNoNothing in the loop runs the test
A refactor across twelve filesNoNothing holds the whole change
Anything in an unfamiliar codebaseNoIt cannot read what it is not shown
A bug you cannot yet reproduceNoReproduction is the work

When you need an agent instead

An agent is a generator wrapped in a loop with tools. It reads files, writes changes, runs commands, reads the output, and decides what to do next. That single addition is what lets it finish a task rather than produce a first draft.

GeneratorAgent
Reads your filesOnly what you pasteYes, on its own
Runs your testsNoYes
Fixes its own mistakesNoYes, within a session
Multi-file changesYou assemble themNative
Cost per taskLow, one passHigh, context re-sent every turn
What you reviewA snippetA diff
Works unattendedNoYes

The cost row is the one people are surprised by. A generator sends your context once. An agent re-sends the accumulated conversation on every turn so it can decide what to do next, so cost grows closer to the square of the turn count than to a straight line. Caching flattens the curve substantially but does not change its shape. That is why generators are priced per seat and agents are priced in usage windows and credit pools.

Read this before you ship generated code

Generated code fails in a narrower and more predictable set of ways than human code. Checking for exactly these takes a couple of minutes and catches nearly all of it.

  1. Do the imports exist? Models invent package names that sound right. The invented names are repeatable, which means someone can register them, so an unfamiliar dependency in generated code deserves a look at the registry before you install it.
  2. Are the versions current? Generated code reflects the ecosystem the model was trained on, which routinely means a deprecated API or an option that was removed two releases ago.
  3. Where does it fail? Happy paths are the strength of this category. Error handling, empty inputs, and timeouts are consistently the weakness.
  4. Any credentials in it? Placeholder keys, connection strings, and example tokens get pasted along with everything else.
  5. Does it match the codebase, or a generic one? A generator that cannot read your repository writes idiomatic code for nobody in particular. That is how a second logging pattern and a third HTTP client get in.
  6. Is anything licensed? Large generated blocks can closely resemble training material. It matters more the larger and more distinctive the block is.

Picking one

If you areStart withCost
Learning to codeA chat assistant, and read every lineFree
Writing code you already know how to writeInline completionFree, then $10
Building a prototype to show someoneA prompt-to-app builderFree tier, then credits
Working in an existing codebaseAn agent, not a generator$20
Generating a client from a specThe deterministic generatorFree
Deciding whether any of this suits youGemini CLI, free tierFree

The honest order is: try the free tiers first, because they are genuinely capable and there are several; add a paid completion tool if you spend your day typing; and only reach for a paid agent when you find yourself describing whole tasks rather than lines. Buying the agent first is the most common way to pay $20 a month for something used like a chatbot.

Questions people ask

A tool that turns a description, in prose or as a formal schema, into code in a single pass. It does not run the result, so verification is your job. That is what separates it from an AI coding agent, which runs a loop and can check its own work.

Several are genuinely free as of August 2026. GitHub Copilot Free gives 2,000 completions and 50 chat requests a month, Gemini CLI gives 60 requests a minute and 1,000 a day on a personal Google account, and v0 gives $5 of credits with 7 messages a day. Cursor and the chat assistants have limited free tiers too.

The loop. A generator emits code once. An agent reads your files, runs commands, reads the output, and iterates until it thinks it is done. Ask whether the tool can observe the result of running its own output; if it cannot, it is a generator.

It is as safe as your review. The predictable failures are hallucinated dependencies, outdated API versions, missing error handling, pasted credentials, and code that ignores your codebase conventions. Checking those five takes minutes and catches most of it.

Prompt-to-app builders such as v0, Lovable, Bolt, and Replit will produce a running project with a UI, a database, and a deploy URL. They are strongest on the first version. Judge them on the second and third change, and on whether you get the code to take elsewhere.

To ship, yes. Generation moves the work from writing to specifying and reviewing, and the binding constraint becomes how much code you can review carefully. Unreviewed generated code is a liability rather than an asset.

Because every turn re-sends the accumulated context so the model can decide what to do next. Cost grows closer to the square of the turn count than to a straight line. A generator sends its context once, which is why it is priced per seat and agents are priced in usage windows and credit pools.

No, if a spec exists. Generate it from the OpenAPI document or the .proto file with the deterministic tool. That output is correct by construction and regenerates cleanly when the API changes, where a model-written client is a snapshot that drifts from the spec in silence.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. GitHub Copilot plans
  2. Cursor pricing
  3. v0 pricing credits and message limits
  4. Replit pricing agent credit tiers
  5. Gemini CLI on GitHub
Try it

Past snippets,
into agents.

Continuum runs every terminal agent you use from one workbench, with a quota gauge per subscription and one spend view.

free app · your subscriptions · local-first