Skip to content
803 linesCodeBlameRaw
1import { ArrowUpRight } from "lucide-react";
2
3import { type FeaturePlan, type FreeTier, MICROS_PER_DOLLAR, type Price } from "@g1t/contracts";
4
5import type { Route } from "./+types/pricing";
6import { wholeDollars } from "../lib/billing";
7import { page } from "../lib/meta";
8import { TimeAgo } from "../components/ui";
9import { billing } from "../lib/services.server";
10
11export function meta(args: Route.MetaArgs) {
12 return page(args, {
13 title: "Pricing · g1t",
14 description:
15 "People chat free on every plan, and the forge is free. One plan, $20 a month per workspace with $10 of usage included. Agents pay the model's price plus a flat agent rate, from each agent's budget. No seats, ever.",
16 });
17}
18
19export async function loader() {
20 const [book, status] = await Promise.all([billing.prices().catch(() => null), billing.status().catch(() => null)]);
21 return { book, free: status?.free ?? false };
22}
23
24/** A price in dollars, with as many digits as it needs to say anything. */
25function money(micros: number): string {
26 const dollars = micros / MICROS_PER_DOLLAR;
27 if (dollars >= 1) return `$${dollars.toFixed(2)}`;
28 if (dollars >= 0.01) return `$${dollars.toFixed(3)}`;
29 return `$${dollars.toPrecision(2)}`;
30}
31
32/** Per second is easier to read per minute. */
33function perUnit(price: Price, micros: number): string {
34 return price.unit === "second" ? `${money(micros * 60)} a minute` : `${money(micros)} per ${price.unit}`;
35}
36
37function gigabytes(bytes: number): string {
38 return `${Math.round((bytes / 1e9) * 10) / 10} GB`;
39}
40
41function count(n: number): string {
42 return n.toLocaleString("en-US");
43}
44
45/** Price-book rows the table shows in rows of their own, or not at all. */
46const SHOWN_APART = new Set([
47 "app_month",
48 "agent_models",
49 "agent_tokens",
50 "agent_tokens_own",
51 "agent_token_weight_input",
52 "agent_token_weight_output",
53 "agent_token_weight_cache_read",
54 "agent_token_weight_cache_write",
55 "gateway_models",
56 "card_fee_percent",
57 "card_fee_fixed",
58]);
59
60/** How each kind of token counts toward the agent rate, from the price book: `input ×1, …`. */
61function tokenWeights(prices: { meter: string; costMicros: number }[]): string {
62 const weight = (kind: string) => {
63 const row = prices.find((p) => p.meter === `agent_token_weight_${kind}`);
64 return row ? Number((row.costMicros / 1_000_000).toFixed(3)) : 1;
65 };
66 return `input ×${weight("input")}, output ×${weight("output")}, cache reads ×${weight("cache_read")}, cache writes ×${weight("cache_write")}`;
67}
68
69/** What the page says when billing cannot be reached: the published defaults. */
70const DEFAULT_FREE: Required<FreeTier> = {
71 trialWorkspaceMicros: 5_000_000,
72 trialMonthlyPoolMicros: 100_000_000,
73 ossPoolMicros: 25_000_000,
74 ossRepoMicros: 2_000_000,
75 freePrivateStorageBytes: 1_000_000_000,
76 auditRetentionDays: 7,
77 planAuditRetentionDays: 90,
78 minChargeMicros: 5_000_000,
79 gitOperationsIncluded: 50_000,
80 paidStartCeilingMicros: 100_000_000,
81 overageForgiveCostMicros: 50_000_000,
82};
83
84const DEFAULT_PLAN: FeaturePlan = {
85 feature: "plan",
86 title: "g1t",
87 monthlyCents: 2000,
88 includes: [
89 "$10 of usage each month at cost plus 20%, used first",
90 "Everyone in the workspace at one price, never per person",
91 "Unlimited projects, previews and repositories",
92 "Agents, checks, workflows, the merge queue, deployments and semantic search",
93 "Usage past $10 is charged at cost plus 20%, up to your spend limit",
94 ],
95 overage: "Everything is metered from the first unit at what it costs g1t plus 20%. Unused included usage does not roll over.",
96};
97
98/** How each part of a workspace is charged: the plan's Pricing table (docs/WORKSPACE.md). */
99const WORKSPACE_CHARGES: { what: string; how: string; soon?: boolean }[] = [
100 {
101 what: "People chatting",
102 how: "Included on every plan, the free one too: channels, direct messages, threads, mentions and live delivery. No seats, and history is never cut off.",
103 },
104 { what: "Docs", how: "Included on every plan, like chat: pages, live editing and history.", soon: true },
105 {
106 what: "An agent replying in chat",
107 how: "The model provider's price, with no markup, plus the g1t agent rate on the tokens it used. Paid from the plan's included usage, then AI credit, and counted against that agent's budget.",
108 },
109 {
110 what: "An agent working on code",
111 how: "The same model price and agent rate, plus sandbox time at cost plus 20%.",
112 },
113 {
114 what: "An agent on your own provider",
115 how: "Your provider bills you for the model directly. g1t charges the agent rate for your own model key only.",
116 },
117 {
118 what: "Files in chat and Docs",
119 how: "The storage meter, at cost plus 20%, past what is free.",
120 soon: true,
121 },
122 { what: "An idle agent", how: "Nothing. An agent costs money only while it is answering or working." },
123];
124
125const FAQ: { q: string; a: string }[] = [
126 {
127 q: "Do people pay to use Chat?",
128 a: "No. Messages, channels, threads and live delivery are included on every plan, with no per-person price and no limit on history. A workspace on the plan can add as many people as it likes at the same price.",
129 },
130 {
131 q: "Who pays for an agent's reply?",
132 a: "The workspace the agent belongs to. Each reply is charged as the model's price plus the agent rate, and counts against that agent's monthly budget, whoever asked it.",
133 },
134 {
135 q: "What does an agent cost when nobody talks to it?",
136 a: "Nothing. Agents have no monthly fee. They are charged only for replies and work, so an agent you made and forgot costs nothing.",
137 },
138 {
139 q: "How do I stop an agent from spending too much?",
140 a: "Give it a monthly budget and a cap per task. At its budget it stops taking new work and says so in the channel. The workspace's spend limit and the per-run caps still apply above it.",
141 },
142 {
143 q: "Can agents use our own model provider?",
144 a: "Yes. Connect a provider in Integrations and limit an agent to it. The provider bills you for the model; g1t charges the agent rate for your own model key only.",
145 },
146 {
147 q: "Does adding the whole company cost more?",
148 a: "No. There are no seats. People who only chat, and ask agents questions, cost nothing until their questions use an agent; then the agent's reply is charged like any other.",
149 },
150 {
151 q: "Is Docs included?",
152 a: "Docs is coming soon. When it ships, pages, editing and history are included on every plan, like chat. Files are on the storage meter.",
153 },
154];
155
156/** The ways to reach g1t about an enterprise account. */
157const ENTERPRISE_MAIL = "mailto:hey@flagon.io?subject=Enterprise%20billing%20for%20g1t";
158
159const HOW = [
160 {
161 title: "Our cost, passed through",
162 body: "Every sandbox second, build and app request costs g1t money at Cloudflare. Each is metered and charged at that cost plus 20%, from the first second and the first request. Models are charged at the provider's price with no markup, plus a flat agent rate per million tokens for what g1t adds around them, from prepaid AI credit. Use a little, pay a little.",
163 },
164 {
165 title: "Prices follow costs, by themselves",
166 body: "Model runs are charged at what Cloudflare's AI Gateway priced each request at, so a provider's price change reaches you the same day. Every day, sandbox, build and app costs are checked against what Cloudflare billed g1t; when one moves, its price moves with it, and the change is listed below. The rest are Cloudflare's published prices, marked as such.",
167 },
168 {
169 title: "The 20% is the overhead",
170 body: "It pays for running g1t and for building and keeping up the features you use. The same 20% on everything but models, whose overhead is the agent rate, and nothing bundled in.",
171 },
172 {
173 title: "No seats, ever",
174 body: "Once a workspace is on the plan, add as many people and agents as you like. It pays one flat price for the plan, and for what it uses past what the plan includes.",
175 },
176 {
177 title: "Prices exclude tax",
178 body: "Every price here is before tax. Stripe adds sales tax, VAT or GST where it applies, worked out from the billing address, and shows it as its own line before you pay and on every receipt and invoice. A valid business tax ID is applied where the law says so.",
179 },
180 {
181 title: "Card fees are passed on, nothing more",
182 body: "Paying by card adds Stripe's card processing fee as its own line, shown before you pay, so the 20% is never spent on fees. A bank transfer or invoiced billing has no card fee.",
183 },
184];
185
186/** One row of the free-and-plan table. */
187type Row = { what: string; free: string; plan: string; note?: string };
188
189function rows(tier: Required<FreeTier>): Row[] {
190 return [
191 {
192 what: "Chat",
193 free: "Included, for the people already in the workspace",
194 plan: "Included, for unlimited members",
195 note: "Channels, direct messages, threads, mentions and live delivery. History is never cut off.",
196 },
197 {
198 what: "Docs (coming soon)",
199 free: "Included",
200 plan: "Included",
201 note: "Pages, live editing and history, once Docs ships.",
202 },
203 {
204 what: "Workspace agents",
205 free: "After a card check, from the trial",
206 plan: "From the plan's included usage, then AI credit, under each agent's budget",
207 note: "Replies and work are charged as model price plus the g1t agent rate. An idle agent costs nothing.",
208 },
209 {
210 what: "The forge",
211 free: "Free",
212 plan: "Included",
213 note: "Public and private repositories, issues, pull requests, reviews, protected branches, code owners, search and Explore.",
214 },
215 {
216 what: "Agents, checks, workflows, merge queue",
217 free: "After a card check: the trial, and the open-source pool for checks, workflows and the merge queue on public repositories",
218 plan: "From the plan's included usage, then at cost plus 20%",
219 },
220 {
221 what: "Projects and previews",
222 free: "Not available: deployments run on g1t's machines",
223 plan: "Unlimited, and never charged for. An app no one visits costs nothing.",
224 },
225 {
226 what: "Deployments",
227 free: "Not available",
228 plan: "Builds by the second, app requests, CPU time and custom domains, each from the first at cost plus 20%",
229 },
230 {
231 what: "Semantic search",
232 free: "After a card check, from the trial",
233 plan: "From the plan's included usage, then at cost plus 20%",
234 },
235 {
236 what: "Private storage",
237 free: `${gigabytes(tier.freePrivateStorageBytes)}, never charged. Past it, pushes to private repositories stop until you make room or start the plan.`,
238 plan: `${gigabytes(tier.freePrivateStorageBytes)} free, then at cost plus 20%. Pushes never stop.`,
239 note: "Public repositories are never charged for storage.",
240 },
241 {
242 what: "Git operations",
243 free: `${count(tier.gitOperationsIncluded)} a month, never charged. Past it, slowed to 60 an hour until the month turns.`,
244 plan: `${count(tier.gitOperationsIncluded)} a month free, then at cost plus 20%. Never slowed.`,
245 note: "Clones, fetches and pushes through g1t.",
246 },
247 {
248 what: "Actions cache",
249 free: "2 GiB an entry and 10 GiB a repository, never charged",
250 plan: "The same limits, with what it stores at cost plus 20%",
251 },
252 {
253 what: "Audit log",
254 free: `${tier.auditRetentionDays} days, with export`,
255 plan: `${tier.planAuditRetentionDays} days, with export`,
256 note: "Longer by arrangement. Older entries are deleted each day.",
257 },
258 {
259 what: "Secret scanning, push protection, vulnerability alerts, security updates",
260 free: "Included",
261 plan: "Included",
262 note: "Custom patterns, validity checks, code scanning, dependency review and the security overview on private repositories are the Security and quality activation. On public repositories they are free.",
263 },
264 { what: "Single sign-on", free: "On every plan, once it is built", plan: "On every plan, once it is built" },
265 {
266 what: "Members",
267 free: "Only the people already in it: a free workspace cannot add members, invite people or invite outside collaborators",
268 plan: "Unlimited, never per seat",
269 note: "Each person can own one free workspace. More workspaces need the plan.",
270 },
271 {
272 what: "Usage past what is included",
273 free: "Not possible: a free workspace never runs up a bill",
274 plan: "Charged at cost plus 20%, up to a spend limit you set. No quotas: only your limit stops anything.",
275 },
276 ];
277}
278
279export default function Pricing({ loaderData }: Route.ComponentProps) {
280 const { book, free } = loaderData;
281 const checked = book?.prices.map((p) => p.checkedAt).filter((at): at is string => !!at).sort().at(-1);
282 const given = Object.fromEntries(Object.entries(book?.free ?? {}).filter(([, value]) => value != null));
283 const tier: Required<FreeTier> = { ...DEFAULT_FREE, ...given };
284 const plan = book?.plans?.find((p) => p.feature === "plan") ?? DEFAULT_PLAN;
285 // The Security and quality activation, as the price book prices it.
286 const securityPlan = book?.plans?.find((p) => p.feature === "security") ?? null;
287 const price = plan.monthlyCents / 100;
288 const dollars = wholeDollars;
289 const agentRate = book?.prices.find((p) => p.meter === "agent_tokens");
290 const agentRateComing = book?.changes.find((c) => c.meter === "agent_tokens" && c.effectiveAt);
291 const agentRateLine =
292 agentRate && agentRate.priceMicros > 0
293 ? `${money(agentRate.priceMicros)} per million tokens`
294 : agentRateComing
295 ? `$0, and ${money(agentRateComing.newCostMicros)} per million tokens from ${agentRateComing.effectiveAt!.slice(0, 10)}`
296 : "as listed under Usage below";
297 return (
298 <main className="mx-auto max-w-4xl px-4 py-12">
299 <p className="text-sm font-medium text-accent">Pricing</p>
300 <h1 className="mt-2 text-3xl font-semibold tracking-tight sm:text-4xl">People chat free. What runs is priced at cost.</h1>
301 <p className="mt-3 max-w-2xl text-muted">
302 People chatting and the forge are free for everyone. Agents and the work that runs on g1t's machines are metered
303 at what they cost g1t, plus a flat agent rate for models and 20% for everything else. The numbers on this page are
304 the live price book g1t charges from. Prices exclude tax, which is added where it applies.
305 </p>
306 {free && (
307 <div className="mt-5 rounded-xl border border-accent/30 bg-accent/5 px-4 py-3 text-sm">
308 <span className="font-medium">Free while g1t is being built out.</span>{" "}
309 <span className="text-muted">Usage is recorded at these prices but not charged for now. The plan is charged.</span>
310 </div>
311 )}
312
313 <section className="mt-10 rounded-xl border border-accent/40 bg-surface p-6">
314 <div className="flex flex-wrap items-baseline justify-between gap-3">
315 <h2 className="text-xl font-semibold tracking-tight">{plan.title}</h2>
316 <p>
317 <span className="text-3xl font-semibold tabular-nums">${price}</span>{" "}
318 <span className="text-sm text-muted">a month per workspace</span>
319 <span className="block text-right text-xs text-faint">
320 {plan.cardFeeCents ? `+ $${(plan.cardFeeCents / 100).toFixed(2)} card processing fee, plus tax where it applies` : "Plus tax where it applies"}
321 </span>
322 </p>
323 </div>
324 <ul className="mt-4 space-y-1.5 text-sm text-muted">
325 {plan.includes.map((line) => (
326 <li key={line} className="flex gap-2">
327 <span aria-hidden className="text-accent">
328 ✓
329 </span>
330 {line}
331 </li>
332 ))}
333 </ul>
334 <p className="mt-3 text-xs text-faint">{plan.overage}</p>
335 <div className="mt-5 grid gap-5 border-t border-line pt-5 text-sm sm:grid-cols-2">
336 <div>
337 <p className="font-medium">Where the ${price} goes</p>
338 <p className="mt-1 text-muted">
339 $10 comes back to you as usage: agents, sandboxes, builds and deployments at cost plus 20%, used before
340 anything else. The other $10 pays for running g1t, the free forge for everyone, and the people building it.
341 </p>
342 </div>
343 <div>
344 <p className="font-medium">No quotas</p>
345 <p className="mt-1 text-muted">
346 No count of projects, previews, builds, requests or git operations ever stops a workspace on the plan. Past
347 the $10, usage is charged at cost plus 20%, and only your spend limit stops it. Unused included usage does
348 not roll over.
349 </p>
350 </div>
351 </div>
352 <p className="mt-5 text-sm text-muted">An owner starts the plan from the workspace's Billing page.</p>
353 </section>
354
355 {securityPlan && (
356 <section id="security" className="mt-6 rounded-xl border border-line bg-surface p-6">
357 <div className="flex flex-wrap items-baseline justify-between gap-3">
358 <h2 className="text-xl font-semibold tracking-tight">{securityPlan.title}</h2>
359 <p>
360 <span className="text-3xl font-semibold tabular-nums">${(securityPlan.monthlyCents / 100).toFixed(securityPlan.monthlyCents % 100 ? 2 : 0)}</span>{" "}
361 <span className="text-sm text-muted">a month per workspace</span>
362 <span className="block text-right text-xs text-faint">
363 {securityPlan.cardFeeCents
364 ? `+ $${(securityPlan.cardFeeCents / 100).toFixed(2)} card processing fee, plus tax where it applies`
365 : "Plus tax where it applies"}
366 </span>
367 </p>
368 </div>
369 <p className="mt-2 text-sm text-muted">
370 An activation, with or without the plan: the security suite's paid parts for a workspace's private repositories.
371 </p>
372 <ul className="mt-4 space-y-1.5 text-sm text-muted">
373 {securityPlan.includes.map((line) => (
374 <li key={line} className="flex gap-2">
375 <span aria-hidden className="text-accent">
376 ✓
377 </span>
378 {line}
379 </li>
380 ))}
381 </ul>
382 <p className="mt-3 text-xs text-faint">{securityPlan.overage}</p>
383 </section>
384 )}
385
386 <section id="workspace" className="mt-14">
387 <h2 className="text-xl font-semibold tracking-tight">Chat, Docs and agents</h2>
388 <p className="mt-1 max-w-3xl text-sm text-muted">
389 People talking costs g1t very little, so it is included. Agents use models, so they are charged for what they
390 use, to the agent that used it.
391 </p>
392 <div className="mt-4 overflow-hidden rounded-xl border border-line">
393 <dl className="divide-y divide-line text-sm">
394 {WORKSPACE_CHARGES.map((row) => (
395 <div key={row.what} className="grid gap-1 px-4 py-3 sm:grid-cols-[14rem_1fr] sm:gap-4">
396 <dt className="font-medium">
397 {row.what}
398 {row.soon && (
399 <span className="ml-2 inline-block rounded bg-raised px-1.5 py-0.5 text-xs font-normal whitespace-nowrap text-muted">Coming soon</span>
400 )}
401 </dt>
402 <dd className="text-muted">{row.how}</dd>
403 </div>
404 ))}
405 </dl>
406 </div>
407 <p className="mt-3 text-sm text-muted">
408 The agent rate today: {agentRateLine}. A chat reply is usually a few thousand tokens on a fast model, so most
409 replies cost a fraction of a cent. See{" "}
410 <a href="https://docs.g1t.sh/guides/agents/#what-an-agent-costs" className="text-accent hover:underline">
411 what an agent costs
412 </a>
413 .
414 </p>
415 </section>
416
417 <h2 className="mt-14 text-xl font-semibold tracking-tight">Free and the plan, side by side</h2>
418 <p className="mt-1 text-sm text-muted">
419 Secret scanning, push protection, vulnerability alerts and security updates are free everywhere, on every plan.
420 </p>
421 {/* On a phone, one row at a time with both answers under it; a table that wide would scroll. */}
422 <ul className="mt-4 divide-y divide-line rounded-xl border border-line text-sm sm:hidden">
423 {rows(tier).map((row) => (
424 <li key={row.what} className="px-4 py-3">
425 <p className="font-medium">{row.what}</p>
426 {row.note && <p className="text-xs text-faint">{row.note}</p>}
427 <dl className="mt-2 grid grid-cols-[4.5rem_1fr] gap-x-3 gap-y-1.5">
428 <dt className="text-xs leading-5 text-faint">Free</dt>
429 <dd className="text-muted">{row.free}</dd>
430 <dt className="text-xs leading-5 text-faint">{plan.title}</dt>
431 <dd className="text-muted">{row.plan}</dd>
432 </dl>
433 </li>
434 ))}
435 </ul>
436 <div className="mt-4 hidden overflow-x-auto rounded-xl border border-line sm:block">
437 <table className="w-full min-w-[36rem] text-left text-sm">
438 <thead className="border-b border-line text-xs text-muted">
439 <tr>
440 <th className="px-4 py-2.5 font-medium">
441 <span className="sr-only">What</span>
442 </th>
443 <th className="px-4 py-2.5 font-medium">Free</th>
444 <th className="px-4 py-2.5 font-medium">
445 {plan.title}, ${price} a month
446 </th>
447 </tr>
448 </thead>
449 <tbody className="divide-y divide-line">
450 {rows(tier).map((row) => (
451 <tr key={row.what} className="align-top">
452 <td className="px-4 py-3">
453 <p className="font-medium">{row.what}</p>
454 {row.note && <p className="text-xs text-faint">{row.note}</p>}
455 </td>
456 <td className="px-4 py-3 text-muted">{row.free}</td>
457 <td className="px-4 py-3 text-muted">{row.plan}</td>
458 </tr>
459 ))}
460 </tbody>
461 </table>
462 </div>
463 <p className="mt-3 text-sm text-muted">
464 Git operations cost g1t money too: Cloudflare charges g1t $0.15 per 1,000. {count(tier.gitOperationsIncluded)} a
465 month is far more than an active workspace uses; an agent run takes two to four.
466 </p>
467
468 <h2 className="mt-14 text-xl font-semibold tracking-tight">No card, no compute</h2>
469 <div className="mt-3 max-w-3xl space-y-3 text-sm text-muted">
470 <p>
471 Agents, checks, workflows, the merge queue, deployments and semantic search run on g1t's machines. They need
472 the plan, or a card check.
473 </p>
474 <p>
475 The reason: compute costs g1t real money from the first second, and free compute draws people who use it to
476 mine cryptocurrency. A card check is the smallest gate that stops that, with one trial per card.
477 </p>
478 <p>
479 A card check is never charged. Stripe saves and verifies the card, with 3-D Secure where your bank asks for it.
480 Nothing is charged until an owner starts the plan, and then the same card is used, without asking for it again.
481 The trial needs a credit or debit card; prepaid cards can still pay for the plan.
482 </p>
483 </div>
484
485 <div className="mt-5 grid gap-4 sm:grid-cols-2">
486 <section className="rounded-xl border border-line bg-surface p-5">
487 <h3 className="font-medium">The trial</h3>
488 <p className="mt-1.5 text-sm text-muted">
489 {dollars(tier.trialWorkspaceMicros)} of usage, once per workspace and once per card, after a card check with a credit or
490 debit card. It comes from a{" "}
491 {dollars(tier.trialMonthlyPoolMicros)} pool each month for everyone; when a month's pool is given out, new
492 trials wait until the 1st. The trial does not cover deployments and never turns into a charge. If the last
493 run on a trial goes past it, g1t covers the difference.
494 </p>
495 </section>
496 <section className="rounded-xl border border-line bg-surface p-5">
497 <h3 className="font-medium">The open-source pool</h3>
498 <p className="mt-1.5 text-sm text-muted">
499 Checks, workflows and the merge queue on public repositories, after a card check:{" "}
500 {dollars(tier.ossPoolMicros)} a month in all, up to {dollars(tier.ossRepoMicros)} a month per repository.
501 Agents do not run from the pool. When the pool or a repository's share is used up, the work waits for the
502 month to turn, or the workspace pays as usual.
503 </p>
504 </section>
505 </div>
506
507 <h2 className="mt-14 text-xl font-semibold tracking-tight">Limits, and how to raise them</h2>
508 <p className="mt-1 max-w-3xl text-sm text-muted">
509 g1t lets usage run ahead of payment only so far. Limits keep a mistake small, for you and for g1t.
510 </p>
511 <ul className="mt-4 grid gap-3 text-sm sm:grid-cols-2">
512 <li className="rounded-xl border border-line bg-surface p-4">
513 <p className="font-medium">{dollars(tier.paidStartCeilingMicros)} in the first month</p>
514 <p className="mt-1 text-muted">
515 A workspace on the plan can use up to {dollars(tier.paidStartCeilingMicros)} in its first month. After that,
516 the limit grows with payments that clear.
517 </p>
518 </li>
519 <li className="rounded-xl border border-line bg-surface p-4">
520 <p className="font-medium">Your own spend limit</p>
521 <p className="mt-1 text-muted">
522 Owners set a monthly spend limit anywhere up to the highest limit the workspace has had, with no approval.
523 Once, you can raise it yourself to twice that.
524 </p>
525 </li>
526 <li className="rounded-xl border border-line bg-surface p-4">
527 <p className="font-medium">Prepay to raise it now</p>
528 <p className="mt-1 text-muted">
529 Prepaying from $25 raises what you can use by the same amount, at once. From $1,000 you can also pay by bank
530 transfer.
531 </p>
532 </li>
533 <li className="rounded-xl border border-line bg-surface p-4">
534 <p className="font-medium">Raise my limit</p>
535 <p className="mt-1 text-muted">
536 Need more? Ask from Billing with the amount, why, and what you expect to spend. You get an answer within one
537 business day, in the app and by email.
538 </p>
539 </li>
540 </ul>
541
542 <h2 className="mt-14 text-xl font-semibold tracking-tight">When usage runs high</h2>
543 <ul className="mt-4 grid gap-3 text-sm sm:grid-cols-2">
544 <li className="rounded-xl border border-line bg-surface p-4">
545 <p className="font-medium">A spike pauses new work</p>
546 <p className="mt-1 text-muted">
547 When an hour's spend is five times your usual hour, and at least $5, new compute waits for an owner to choose
548 Keep going or Stop. Runs already going finish.
549 </p>
550 </li>
551 <li className="rounded-xl border border-line bg-surface p-4">
552 <p className="font-medium">Caps per run and per issue</p>
553 <p className="mt-1 text-muted">
554 One agent run stops at $2 and the agents on one issue at $10 in all, so a run stuck in a loop stops on its own.
555 Owners change both on Billing.
556 </p>
557 </li>
558 <li className="rounded-xl border border-line bg-surface p-4">
559 <p className="font-medium">Alerts at 50, 75, 90 and 100%</p>
560 <p className="mt-1 text-muted">
561 Of the plan's included usage, your spend limit and g1t's limit: in the app and by email.
562 </p>
563 </li>
564 <li className="rounded-xl border border-line bg-surface p-4">
565 <p className="font-medium">Spent more than you meant to? Tell us</p>
566 <p className="mt-1 text-muted">
567 Tell us from Billing what happened. Once in 12 months, g1t can credit back usage you did not mean, always
568 including its 20% on it. Larger credits, or a second one within 12 months, are reviewed by a person.
569 </p>
570 </li>
571 </ul>
572 <p className="mt-3 text-sm text-muted">
573 No card is charged less than {dollars(tier.minChargeMicros)} when a month closes, so a payment's fee is never most
574 of it. Smaller amounts carry over to the next invoice. Charges at a limit always go through.
575 </p>
576
577 <div className="mt-14 grid gap-4 sm:grid-cols-2">
578 {HOW.map((item) => (
579 <section key={item.title} className="rounded-xl border border-line bg-surface p-5">
580 <h2 className="font-medium">{item.title}</h2>
581 <p className="mt-1.5 text-sm text-muted">{item.body}</p>
582 </section>
583 ))}
584 </div>
585
586 <h2 className="mt-14 text-xl font-semibold tracking-tight">Usage</h2>
587 <p className="mt-1 text-sm text-muted">
588 {checked ? (
589 <>
590 Last checked against Cloudflare's bill <TimeAgo at={checked} />.
591 </>
592 ) : (
593 "Starting from Cloudflare's published prices; checked against its bill daily."
594 )}
595 </p>
596 <div className="mt-4 overflow-x-auto rounded-xl border border-line">
597 <table className="w-full text-left text-sm sm:min-w-[36rem]">
598 <thead className="border-b border-line text-xs text-muted">
599 <tr>
600 <th className="px-4 py-2.5 font-medium">What</th>
601 <th className="px-4 py-2.5 font-medium">Costs g1t</th>
602 {/* The markup is in what you pay; on a phone the column gives way. */}
603 <th className="hidden px-4 py-2.5 font-medium sm:table-cell">Markup</th>
604 <th className="px-4 py-2.5 font-medium">You pay</th>
605 </tr>
606 </thead>
607 <tbody className="divide-y divide-line">
608 <tr>
609 <td className="px-4 py-3">
610 <p className="font-medium">Agent models</p>
611 <p className="text-xs text-faint">g1t's hosted models for agent runs, the cheapest that can do each job, paid from AI credit</p>
612 </td>
613 <td className="px-4 py-3 text-muted">What the provider charges, per request</td>
614 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">{book?.modelMarginPercent ?? 0}%</td>
615 <td className="px-4 py-3 text-muted">{book?.modelMarginPercent ? `Cost + ${book.modelMarginPercent}%` : "The provider's price"}</td>
616 </tr>
617 {(() => {
618 const rate = book?.prices.find((p) => p.meter === "agent_tokens");
619 const gateway = book?.prices.find((p) => p.meter === "gateway_models");
620 const feePercent = book?.prices.find((p) => p.meter === "card_fee_percent");
621 const feeFixed = book?.prices.find((p) => p.meter === "card_fee_fixed");
622 const coming = book?.changes.find((c) => c.meter === "agent_tokens" && c.effectiveAt);
623 const ownRate = book?.prices.find((p) => p.meter === "agent_tokens_own");
624 const ownComing = book?.changes.find((c) => c.meter === "agent_tokens_own" && c.effectiveAt);
625 return (
626 <>
627 <tr>
628 <td className="px-4 py-3">
629 <p className="font-medium">g1t agent rate</p>
630 <p className="text-xs text-faint">Context, memory, routing and orchestration, on every token an agent run uses</p>
631 <p className="text-xs text-faint">Tokens count by kind: {tokenWeights(book?.prices ?? [])}</p>
632 </td>
633 <td className="px-4 py-3 text-muted">A flat rate</td>
634 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">—</td>
635 <td className="px-4 py-3 font-mono text-xs tabular-nums">
636 {rate && rate.priceMicros > 0 ? `${money(rate.priceMicros)} per million tokens` : coming ? `${money(coming.newCostMicros)} per million tokens from ${coming.effectiveAt!.slice(0, 10)}` : "$0.25 per million tokens"}
637 </td>
638 </tr>
639 <tr>
640 <td className="px-4 py-3">
641 <p className="font-medium">g1t agent rate, your own model key</p>
642 <p className="text-xs text-faint">The same, on runs that use your own provider; its models are billed by your provider, not g1t</p>
643 </td>
644 <td className="px-4 py-3 text-muted">A flat rate</td>
645 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">—</td>
646 <td className="px-4 py-3 font-mono text-xs tabular-nums">
647 {ownRate && ownRate.priceMicros > 0 ? `${money(ownRate.priceMicros)} per million tokens` : ownComing ? `${money(ownComing.newCostMicros)} per million tokens from ${ownComing.effectiveAt!.slice(0, 10)}` : "$0.25 per million tokens"}
648 </td>
649 </tr>
650 <tr>
651 <td className="px-4 py-3">
652 <p className="font-medium">
653 AI Gateway <span className="ml-1 rounded bg-accent/15 px-1.5 py-0.5 text-xs text-accent">Free during beta</span>
654 </p>
655 <p className="text-xs text-faint">Your own code calling Claude and open models through g1t, in Anthropic's or OpenAI's format, paid from AI credit; on your own providers, free</p>
656 </td>
657 <td className="px-4 py-3 text-muted">What the provider charges</td>
658 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">{gateway?.markupPercent ?? 0}%</td>
659 <td className="px-4 py-3 text-muted">{gateway?.markupPercent ? `Cost + ${gateway.markupPercent}%` : "The provider's price"}</td>
660 </tr>
661 {feePercent && feeFixed && (
662 <tr>
663 <td className="px-4 py-3">
664 <p className="font-medium">Card processing fee</p>
665 <p className="text-xs text-faint">
666 On every card payment, as its own line shown before you pay; never on bank transfers or invoiced billing
667 </p>
668 </td>
669 <td className="px-4 py-3 text-muted">Stripe's fee</td>
670 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">—</td>
671 <td className="px-4 py-3 font-mono text-xs tabular-nums">
672 {(feePercent.priceMicros / 10_000).toFixed(1)}% + {money(feeFixed.priceMicros)}
673 </td>
674 </tr>
675 )}
676 </>
677 );
678 })()}
679 <tr>
680 <td className="px-4 py-3">
681 <p className="font-medium">Projects, previews and apps</p>
682 <p className="text-xs text-faint">Having them. An app's requests and CPU time are charged below.</p>
683 </td>
684 <td className="px-4 py-3 text-muted">Next to nothing</td>
685 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">—</td>
686 <td className="px-4 py-3 text-muted">Not charged</td>
687 </tr>
688 {(book?.prices ?? []).filter((price) => !SHOWN_APART.has(price.meter)).map((price) => (
689 <tr key={price.meter}>
690 <td className="px-4 py-3">
691 <p className="font-medium">{price.title}</p>
692 <p className="text-xs text-faint">
693 {price.meter === "actions_cache" ? "On the plan only. A free workspace is never charged for it. " : ""}
694 {price.source === "cloudflare" ? "Measured from Cloudflare's bill" : "Cloudflare's published price"}
695 </p>
696 </td>
697 <td className="px-4 py-3 font-mono text-xs tabular-nums text-muted">{perUnit(price, price.costMicros)}</td>
698 <td className="hidden px-4 py-3 tabular-nums sm:table-cell">{price.markupPercent}%</td>
699 <td className="px-4 py-3 font-mono text-xs tabular-nums">{perUnit(price, price.priceMicros)}</td>
700 </tr>
701 ))}
702 </tbody>
703 </table>
704 </div>
705
706 <h2 className="mt-14 text-xl font-semibold tracking-tight">Enterprise</h2>
707 <p className="mt-1 text-sm text-muted">
708 For organizations with several workspaces: one invoice and one limit. The prices are the ones on this page.
709 </p>
710 <section className="mt-4 rounded-xl border border-line bg-surface p-5">
711 <ul className="grid gap-3 text-sm sm:grid-cols-2">
712 <li>
713 <p className="font-medium">Consolidated invoicing</p>
714 <p className="text-muted">One monthly invoice for every workspace, paid by card or bank transfer.</p>
715 </li>
716 <li>
717 <p className="font-medium">Custom terms</p>
718 <p className="text-muted">One limit across every workspace, invoice terms and a billing contact, set with you.</p>
719 </li>
720 <li>
721 <p className="font-medium">Security on every plan</p>
722 <p className="text-muted">
723 The audit log with export, {tier.planAuditRetentionDays} days or longer by arrangement, and secret push
724 protection, for every workspace.
725 </p>
726 </li>
727 <li>
728 <p className="font-medium">
729 Single sign-on <span className="ml-1 rounded bg-raised px-1.5 py-0.5 text-xs text-muted">Coming</span>
730 </p>
731 <p className="text-muted">Through your identity provider, on every plan once it is built. Not available yet.</p>
732 </li>
733 </ul>
734 <a
735 href={ENTERPRISE_MAIL}
736 className="mt-5 inline-flex items-center gap-1.5 rounded-md border border-line px-3 py-1.5 text-sm hover:border-line-strong"
737 >
738 Write to us about enterprise
739 <ArrowUpRight size={14} />
740 </a>
741 </section>
742
743 <h2 className="mt-14 text-xl font-semibold tracking-tight">Price changes</h2>
744 {book && book.changes.length > 0 ? (
745 <ul className="mt-4 divide-y divide-line rounded-xl border border-line">
746 {book.changes.map((change) => {
747 const title = book.prices.find((p) => p.meter === change.meter)?.title ?? change.meter;
748 // What you pay moved: the cost, the markup, or both.
749 const before = change.oldCostMicros * (100 + (change.oldMarkupPercent ?? change.markupPercent));
750 const after = change.newCostMicros * (100 + change.markupPercent);
751 const up = after > before;
752 const fresh = after === before || before === 0;
753 return (
754 <li key={`${change.meter}-${change.createdAt}`} className="px-4 py-3 text-sm">
755 <p>
756 <span className="font-medium">{title}</span>{" "}
757 {fresh ? (
758 <span className="text-muted">new</span>
759 ) : (
760 <span className={up ? "text-warn" : "text-accent"}>
761 {up ? "up" : "down"} {Math.abs((after / before - 1) * 100).toFixed(1)}%
762 </span>
763 )}
764 </p>
765 <p className="mt-0.5 text-xs text-faint">
766 {change.effectiveAt ? (
767 <>
768 {change.reason} · <span className="text-fg-soft">takes effect {change.effectiveAt.slice(0, 10)}</span>
769 </>
770 ) : (
771 <>
772 {change.reason} · <TimeAgo at={change.createdAt} />
773 </>
774 )}
775 </p>
776 </li>
777 );
778 })}
779 </ul>
780 ) : (
781 <p className="mt-2 text-sm text-muted">None yet. When a price moves, it is listed here with why.</p>
782 )}
783
784 <h2 id="faq" className="mt-14 text-xl font-semibold tracking-tight">Questions</h2>
785 <dl className="mt-4 divide-y divide-line rounded-xl border border-line">
786 {FAQ.map((item) => (
787 <div key={item.q} className="px-4 py-4 text-sm">
788 <dt className="font-medium">{item.q}</dt>
789 <dd className="mt-1.5 text-muted">{item.a}</dd>
790 </div>
791 ))}
792 </dl>
793
794 <a
795 href="https://docs.g1t.sh/guides/usage-and-billing/"
796 className="mt-12 inline-flex items-center gap-1.5 text-sm text-accent hover:underline"
797 >
798 How usage and billing work
799 <ArrowUpRight size={14} />
800 </a>
801 </main>
802 );
803}