api.models

Gemini 4 models

Four Gemini 4 text models, each a model id you pass where any other goes: models.create(), models.turn() or an agent. They all share a 1M-token context and 65,536 output tokens per request.

text1M-token context65,536 output tokens
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

Model idRelative cost
gemini-4-hydrogenThe least expensive of the four.
gemini-4-carbonSame rate as Argon; both double on December 1, 2026.
gemini-4-argonSame rate as Carbon; both double on December 1, 2026.
gemini-4-neonThe most expensive of the four until December 1, 2026. It may need an access the provider grants on request.
const session = await api.models.create({ model: "gemini-4-hydrogen" });
const result = await session.generate({ inputs: [{ type: "text", content: "Summarize this in one line: …" }] });
session = api.models.create(model="gemini-4-hydrogen")
result = session.generate(inputs=[{"type": "text", "content": "Summarize this in one line: …"}])

Prices are read, not written here

api.catalogue() returns the current credits per million tokens for each model. Argon and Carbon change price on December 1, 2026: read the catalogue rather than a number copied into your code.