> ## Documentation Index
> Fetch the complete documentation index at: https://docs.together.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Choosing a deployment option

> Deploy your model with serverless, dedicated endpoints, or dedicated containers.

export const CostCrossoverDiagram = () => {
  const CSS = `
  .learn-diagram .cross { display: grid; gap: var(--space-sm); }
  .learn-diagram .cross__svg { width: 100%; height: auto; display: block; }
  .learn-diagram .cross__line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
  .learn-diagram .cross__grid { stroke: var(--color-rule-soft); stroke-width: 1; }
  .learn-diagram .cross__axis { stroke: var(--color-rule); stroke-width: 1; }
  .learn-diagram .cross__tick { font-family: var(--font-mono); font-size: 11px; fill: var(--color-ink-mute); }
  .learn-diagram .cross__label {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--color-ink-soft);
    letter-spacing: 0.06em;
  }
  .learn-diagram .cross__region {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    fill: var(--color-ink-faint);
  }
  .learn-diagram .cross__verdict {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2xs) var(--space-md);
    background: var(--tg-orange-soft);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-sm);
  }
  .learn-diagram .cross__verdict-main {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--tg-orange-dark);
    letter-spacing: -0.02em;
  }
  .learn-diagram .cross__verdict-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--tg-orange-dark);
    font-variant-numeric: tabular-nums;
  }
  `;
  const W = 640;
  const H = 384;
  const PAD_L = 66;
  const PAD_R = 96;
  const PAD_T = 30;
  const PAD_B = 78;
  const L = PAD_L;
  const R = W - PAD_R;
  const T = PAD_T;
  const B = H - PAD_B;
  const X_MAX = 400;
  const money = v => v >= 100 ? "$" + Math.round(v) : "$" + v.toFixed(2);
  const [vol, setVol] = useState(100);
  const [svRate, setSvRate] = useState(0.3);
  const [ddRate, setDdRate] = useState(3.0);
  const dedicatedDay = ddRate * 24;
  const yMax = Math.max(svRate * X_MAX, dedicatedDay) * 1.12;
  const px = v => L + v / X_MAX * (R - L);
  const py = c => B - c / yMax * (B - T);
  const xTicks = [0, 1, 2, 3, 4].map(i => ({
    v: X_MAX / 4 * i,
    x: px(X_MAX / 4 * i)
  }));
  const yTicks = [0, 1, 2, 3].map(i => ({
    v: yMax / 3 * i,
    y: py(yMax / 3 * i)
  }));
  const xCross = dedicatedDay / svRate;
  const crossInRange = xCross > 0 && xCross < X_MAX;
  const crossX = crossInRange ? px(xCross) : null;
  const svCost = svRate * vol;
  const curX = px(vol);
  const serverlessCheaper = svCost <= dedicatedDay;
  const savings = Math.abs(svCost - dedicatedDay);
  return <DiagramFrame eyebrow="Deployment economics" title="Where serverless stops being the cheaper option" caption="Serverless is priced per token, so its cost is a straight line through the origin. A dedicated endpoint is priced per GPU-hour, so it is flat: you pay for the GPU whether you use it or not. The two cross at the volume where a reserved GPU starts to pay for itself." css={CSS} controls={<>
          <Slider label="daily volume" value={vol} display={vol + "M"} min={1} max={400} onChange={setVol} />
          <Slider label="serverless rate" value={Math.round(svRate * 100)} display={"$" + svRate.toFixed(2) + "/M"} min={5} max={200} step={5} onChange={v => setSvRate(v / 100)} />
          <Slider label="dedicated rate" value={Math.round(ddRate * 100)} display={"$" + ddRate.toFixed(2) + "/hr"} min={50} max={1000} step={10} onChange={v => setDdRate(v / 100)} />
        </>}>
      <div className="cross">
        <svg className="cross__svg" viewBox={"0 0 " + W + " " + H} role="img" aria-label="cost per day versus daily token volume for serverless and dedicated deployments">
          {crossInRange && <>
              <rect x={L} y={T} width={crossX - L} height={B - T} fill="#E5F3FF" opacity="0.6" />
              <rect x={crossX} y={T} width={R - crossX} height={B - T} fill="#FDE3F6" opacity="0.55" />
              <text className="cross__region" x={(L + crossX) / 2} y={T + 14} textAnchor="middle">
                serverless cheaper
              </text>
              <text className="cross__region" x={(crossX + R) / 2} y={T + 14} textAnchor="middle">
                dedicated cheaper
              </text>
            </>}

          {yTicks.map((t, i) => <line key={"g" + i} className="cross__grid" x1={L} y1={t.y} x2={R} y2={t.y} />)}
          {yTicks.map((t, i) => <text key={"yl" + i} className="cross__tick" x={L - 10} y={t.y + 4} textAnchor="end">
              {money(t.v)}
            </text>)}
          <line className="cross__axis" x1={L} y1={B} x2={R} y2={B} />
          <line className="cross__axis" x1={L} y1={T} x2={L} y2={B} />
          {xTicks.map((t, i) => <text key={"xl" + i} className="cross__tick" x={t.x} y={B + 20} textAnchor="middle">
              {t.v}M
            </text>)}
          <text className="cross__label" x={(L + R) / 2} y={H - 12} textAnchor="middle">
            million tokens per day
          </text>
          <text className="cross__label" x={L - 10} y={T - 12} textAnchor="start">
            cost per day
          </text>

          {}
          <line className="cross__line" stroke="#EF2CC1" x1={L} y1={py(dedicatedDay)} x2={R} y2={py(dedicatedDay)} />
          <text className="cross__label" x={R + 8} y={py(dedicatedDay) + 4} fill="#EF2CC1">
            dedicated
          </text>

          {}
          <line className="cross__line" stroke="#3D99F5" x1={px(0)} y1={py(0)} x2={px(X_MAX)} y2={py(svRate * X_MAX)} />
          <text className="cross__label" x={R + 8} y={Math.max(py(svRate * X_MAX) + 4, T + 10)} fill="#3D99F5">
            serverless
          </text>

          {crossInRange && <>
              <line className="cross__axis" x1={crossX} y1={py(dedicatedDay)} x2={crossX} y2={B} stroke="#FC4C02" strokeDasharray="3,3" />
              <circle cx={crossX} cy={py(dedicatedDay)} r="5.5" fill="#FC4C02" stroke="#fff" strokeWidth="2" />
              <text className="cross__label" x={crossX + (crossX > (L + R) / 2 ? -10 : 10)} y={Math.max(py(dedicatedDay) - 12, T + 28)} textAnchor={crossX > (L + R) / 2 ? "end" : "start"} fill="#972E02">
                crossover {Math.round(xCross)}M / day
              </text>
            </>}

          {}
          <line className="cross__axis" x1={curX} y1={T} x2={curX} y2={B} strokeDasharray="2,4" />
          <circle cx={curX} cy={py(svCost)} r="4.5" fill="#3D99F5" stroke="#fff" strokeWidth="1.5" />
          <circle cx={curX} cy={py(dedicatedDay)} r="4.5" fill="#EF2CC1" stroke="#fff" strokeWidth="1.5" />
          <text className="cross__tick" x={curX} y={B + 36} textAnchor="middle">
            you: {vol}M
          </text>
        </svg>

        <div className="cross__verdict">
          <span className="cross__verdict-main">
            {serverlessCheaper ? "Serverless is cheaper" : "Dedicated is cheaper"} at {vol}M tokens/day
          </span>
          <span className="cross__verdict-sub">
            serverless {money(svCost)}/day · dedicated {money(dedicatedDay)}/day · saves{" "}
            {money(savings)}/day
          </span>
        </div>

        <div className="stats">
          <span>
            crossover:{" "}
            <strong>
              {crossInRange ? Math.round(xCross) + "M tok/day" : xCross >= X_MAX ? "beyond 400M" : "n/a"}
            </strong>
          </span>
          <span>
            dedicated: <strong>{money(dedicatedDay)}</strong> per day (1 GPU, 24 h)
          </span>
          <span>
            break-even utilisation: <strong>{Math.round(vol / Math.max(xCross, 1) * 100)}%</strong>
          </span>
        </div>

        <Legend items={[{
    color: "#3D99F5",
    label: "serverless: rate × volume"
  }, {
    color: "#EF2CC1",
    label: "dedicated: flat GPU-hour rate"
  }, {
    color: "#FC4C02",
    label: "crossover point"
  }]} />
      </div>
    </DiagramFrame>;
};

export const Legend = ({items}) => <ul className="legend">
    {items.map((it, i) => <li className="legend__item" key={i}>
        <span className="legend__sw" style={it.style || ({
  background: it.color
})} />
        {it.label}
      </li>)}
  </ul>;

export const Slider = ({label, value, display, min, max, step = 1, onChange}) => <label className="slider-group">
    <span className="slider-group__label">
      {label}
      <span className="slider-group__value">{display === undefined ? value : display}</span>
    </span>
    <input type="range" min={min} max={max} step={step} value={value} onChange={e => onChange(parseFloat(e.target.value))} />
  </label>;

export const DiagramFrame = ({eyebrow, title, caption, css, controls, readout, children}) => {
  const BASE_CSS = `
.learn-diagram {
  /* ── Together AI brand palette ── */
  --tg-orange: #FC4C02;
  --tg-orange-dark: #972E02;
  --tg-orange-soft: #FEE8DF;
  --tg-orange-tint: #FFDCCD;
  --tg-pink: #EF2CC1;
  --tg-pink-soft: #FDE3F6;
  --tg-purple: #A373ED;
  --tg-purple-mid: #CAAEF5;
  --tg-purple-soft: #EDE4FC;
  --tg-blue: #3D99F5;
  --tg-blue-mid: #A3D1FF;
  --tg-blue-soft: #E5F3FF;
  --tg-slate: #5E86AE;
  --tg-slate-soft: #EEF3F6;
  --tg-navy: #010120;

  /* ── Surfaces ── */
  --color-paper:   #FFFFFF;
  --color-paper-2: #F7F8FA;
  --color-paper-3: #F0F1F4;
  --color-paper-4: #E2E4E9;
  /* ── Ink ── */
  --color-ink:       #090909;
  --color-ink-soft:  #414B58;
  --color-ink-mute:  #626B84;
  --color-ink-faint: #98A0B3;
  /* ── Lines ── */
  --color-rule:        #C4C9D4;
  --color-rule-soft:   #E2E4E9;
  --color-rule-strong: #98A0B3;
  /* ── Accent ── */
  --color-accent:      var(--tg-orange);
  --color-accent-soft: var(--tg-orange-soft);
  --color-empty:       #F0F1F4;

  /* ── Type ── */
  --font-display: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'The Future', 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'The Future Mono', ui-monospace, 'SFMono-Regular', 'Courier New', monospace;

  /* ── Spacing (4px base) ── */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs:  12px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;

  /* ── Radius ── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;
  --focus-ring: 0 0 0 3px rgba(252, 76, 2, 0.35);

  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  margin: 24px 0;
}
.learn-diagram, .learn-diagram * { box-sizing: border-box; }

/* ============ SHELL ============ */
.learn-diagram .diagram {
  margin: 0;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: 0 1px 2px rgba(9, 9, 9, 0.04), 0 2px 10px rgba(9, 9, 9, 0.03);
}
.learn-diagram .diagram__head { margin-bottom: var(--space-md); }
.learn-diagram .diagram__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tg-orange);
  margin-bottom: 6px;
}
.learn-diagram .diagram__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin: 0;
}
.learn-diagram .diagram__caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-ink-mute);
  margin: 6px 0 0;
  max-width: 68ch;
}
.learn-diagram .diagram__controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  align-items: center;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-rule-soft);
}
.learn-diagram .diagram__readout {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-mute);
  margin-left: auto;
}
.learn-diagram .diagram__readout strong {
  color: var(--tg-orange);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============ BUTTONS ============ */
.learn-diagram .btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-paper);
  color: var(--color-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
}
.learn-diagram .btn:hover:not([disabled]) { background: var(--color-paper-3); }
.learn-diagram .btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.learn-diagram .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.learn-diagram .btn--accent {
  background: var(--tg-orange);
  border-color: var(--tg-orange);
  color: #fff;
}
.learn-diagram .btn--accent:hover:not([disabled]) {
  background: var(--tg-orange-dark);
  border-color: var(--tg-orange-dark);
}
.learn-diagram .btn--on {
  background: var(--tg-orange-soft);
  border-color: var(--tg-orange);
  color: var(--tg-orange-dark);
}
.learn-diagram .btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2xs); flex: 0 0 auto; }

/* ============ SLIDERS ============ */
.learn-diagram .slider-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  flex: 1 1 190px;
}
.learn-diagram .slider-group__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-mute);
  display: flex;
  justify-content: space-between;
  gap: var(--space-2xs);
}
.learn-diagram .slider-group__value {
  color: var(--tg-orange);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}
.learn-diagram input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--color-rule);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 8px 0 2px;
}
.learn-diagram input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--tg-orange);
  border-radius: 50%;
  border: 2px solid var(--color-paper);
  box-shadow: 0 1px 3px rgba(9, 9, 9, 0.18);
}
.learn-diagram input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--tg-orange);
  border-radius: 50%;
  border: 2px solid var(--color-paper);
}
.learn-diagram input[type="range"]:focus-visible { box-shadow: var(--focus-ring); }

/* ============ PANELS · STATS · LEGEND ============ */
.learn-diagram .panel {
  background: var(--color-paper-2);
  border: 1px solid var(--color-rule-soft);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}
.learn-diagram .panel__head {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-mute);
  margin-bottom: var(--space-2xs);
}
.learn-diagram .stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-ink-mute);
}
.learn-diagram .stats strong {
  color: var(--tg-orange);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.learn-diagram .legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-md);
  list-style: none;
  margin: var(--space-sm) 0 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-ink-soft);
}
.learn-diagram .legend__item { display: flex; align-items: center; gap: 6px; }
.learn-diagram .legend__sw {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex: none;
  display: inline-block;
}
.learn-diagram .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-paper-3);
  color: var(--color-ink-soft);
  white-space: nowrap;
}
.learn-diagram .tag--accent { background: var(--tg-orange-soft); color: var(--tg-orange-dark); }
.learn-diagram .tag--muted { background: transparent; border: 1px dashed var(--color-rule); color: var(--color-ink-faint); }
.learn-diagram .note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-ink-mute);
}
.learn-diagram code, .learn-diagram .mono { font-family: var(--font-mono); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .learn-diagram *, .learn-diagram *::before, .learn-diagram *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
`;
  return <div className="learn-diagram">
    <style>{BASE_CSS}</style>
    {css ? <style>{css}</style> : null}
    <figure className="diagram">
      {(eyebrow || title || caption) && <div className="diagram__head">
          {eyebrow && <div className="diagram__eyebrow">{eyebrow}</div>}
          {title && <h3 className="diagram__title">{title}</h3>}
          {caption && <p className="diagram__caption">{caption}</p>}
        </div>}
      <div className="diagram__inner">{children}</div>
      {(controls || readout) && <div className="diagram__controls">
          {controls}
          {readout && <span className="diagram__readout">{readout}</span>}
        </div>}
    </figure>
  </div>;
};

**TL;DR:** There are three ways to run a model in production on Together AI.

* **[Serverless](/docs/serverless/models):** Pay per token to use shared infrastructure, with instant startups and no setup.
* **[Dedicated endpoints](/docs/dedicated-endpoints/overview):** Reserve GPUs for yourself, get predictable performance, pay by the GPU-hour whether you're using the GPU or not.
* **[Dedicated containers](/docs/dedicated-container-inference):** Bring your own inference logic on top of reserved GPUs.

The right choice for a workload depends on your volume, your latency budget, and how much control you need over the inference stack.

## Serverless

Serverless is the default starting point for most workloads. Together AI runs a big shared pool of GPUs hosting popular models, and when you make a serverless request, it gets routed to whichever GPU has capacity. You pay per token of input and output, usually quoted in dollars per million tokens.

Pros:

* **No idle cost:** No requests, no charges. A weekend with zero traffic costs you nothing.
* **Instant start:** No cold-starts, no wait time while the model loads. Send a request and get tokens back immediately.
* **No capacity planning:** Togther automatically handles batching, autoscaling, and load balancing. You just call the API.

Cons:

* **Latency variance:** When the shared pool is busy, your TTFT goes up. At peak times you might see two to three times the average TTFT. This rarely matters for batch jobs but it matters a lot for interactive UIs.
* **Limited model selection:** You can only use models the platform currently has provisioned on its shared pool. Custom fine-tunes, prior model generations, or niche model offerings typically do not have enough demand for providers to warrant offering them on the platform.
* **Less control over throughput:** If you suddenly need to send ten times your usual traffic, the platform might apply [rate limits](/docs/serverless/rate-limits) to keep the shared pool stable and fairly share the capacity with all other users.

Serverless is a great starting point for prototypes, demos, internal tools, and any workloads where you can tolerate high performance variability. See [serverless models](/docs/serverless/models) for the list of available models and per-token pricing.

## Dedicated endpoints

A dedicated endpoint is a copy of a model running on GPUs reserved for you. You pay by the GPU-hour regardless of how many tokens you actually use. At high volume, dedicated hardware can be cheaper than serverless. At low volume, you're paying a flat cost for a GPU that's mostly idle.

Pros:

* **Predictable latency:** You'll never be impacted by other users' traffic. Your TTFT is whatever the model plus your prompt size produces, every single time.
* **Higher sustained throughput:** If you are pushing many tokens per second, dedicated capacity often delivers better total throughput than waiting in a shared queue.
* **Custom weights:** If you have fine-tuned a model, this is usually where you'd host it.
* **Pinned model version:** The platform will never swap out your model or deprecate older models.
* **Optimizations you can opt into:** Things like speculative decoding (a small draft model that proposes ahead while the big model verifies), quantization, prompt caching, and aggressive batching are easier to enable when the endpoint is yours.

Cons:

* **Flat cost when idle:** If your traffic drops to zero, you're still paying for the GPU unless your endpoint supports autoscaling to zero.
* **Capacity planning:** You pick the hardware, so if you pick the wrong size/amount, you'll either waste money on idle GPUs, or experience slowdowns when traffic gets too high.
* **Cold start times:** Bringing an endpoint online from zero takes minutes, not milliseconds. Plan your deploy schedules accordingly.

See [Dedicated endpoints](/docs/dedicated-endpoints/overview) for deployment instructions on Together AI, and [Endpoint settings](/docs/dedicated-endpoints/settings) for details on hardware, autoscaling, and prompt caching.

## Dedicated containers

Dedicated containers go one level deeper. You package the inference logic yourself: your own Docker image, your own inference code and APIs, your own pre- and post-processing. The platform runs your container on dedicated GPUs.

Pros:

* **Full control:** You own the inference code, the Docker image, the inference logic, and the API.
* **Customization:** You can add your own pre- and post-processing, custom batching, custom streaming, mixed workloads, or a model that takes inputs the standard API cannot represent.

Cons:

* **Operational complexity:** You're responsible for the entire inference stack, from the code to the hardware. You'll need to manage your own scaling, monitoring, and logging.
* **Cost:** You're responsible for the cost of the hardware, the container, and the inference code. It's more expensive than serverless, but it's also more flexible and gives you the most control over the inference stack.

## The cost crossover

When it comes to cost, serverless generally beats paying for dedicated hardware until you reach a point when you're keeping your dedicated GPUs busy most of the time. The exact crossover depends on your model size, your input-output token mix, cache hit rate, and the GPU you are paying for, but the shape of the curve is always the same:

<CostCrossoverDiagram />

For a back-of-the-envelope calculation, suppose a dedicated H100 at around \$3 per hour costs \$72 per day. With serverless at \$1 per 1M tokens, the crossover sits at roughly 72M tokens per day, or \~3M tokens per hour sustained. Below that volume, serverless is more cost-effective. Above it, dedicated hardware becomes cheaper. On newer hardware (H200, B200) the per-hour rate goes up but so does the per-GPU throughput, so the token-volume crossover stays roughly similar. Your numbers will differ based on the actual rates and the GPU type.

## Rent, lease, or build

It helps to think of this decision the same way you'd think about office space:

You can **co-work**, paying by the desk-hour. You walk in when you need a desk, walk out when you don't, and share the kitchen with strangers. Co-working is cheap when you barely use it, but it's first-come, first-served, and on busy days you compete with everyone else for space. This is the **serverless** model.

You can **rent an office**, paying a flat monthly rent. The space is yours, nobody else uses your desk, and you don't have to share the space with anyone else even on busy days. Renting is more expensive when your utilization is low, but it gives you predictability and reliability that co-working cannot. This is the **dedicated endpoint** model.

You can **build out the floor yourself**: the space is yours, the layout is yours, the wiring is yours. You get the most control of any option and you take on the most operational ownership. This is the **dedicated container** model.

You pick between these based on how much you use the space, how predictable that usage is, and how custom your workflow needs to be. All three are ways to draw on GPU capacity, and you can employ a mixture. For example, you might run a dedicated endpoint that scales up for peak-hour traffic, with an overflow spilling onto serverless when the endpoint runs out of capacity.

## Defaults that work

Some reasonable defaults for common use cases:

* **Prototype, demo, or internal tool:** Use serverless, almost always. The latency variance will not matter for tens or hundreds of calls a day, and you're spared all the provisioning work.
* **Customer-facing chat with a strict TTFT requirement:** Try serverless first and measure the tail latency. If P95 is fine, stick with that. If it's not, switch the latency-sensitive paths to a dedicated endpoint.
* **High-volume batch jobs:** Use dedicated. Above a certain throughput, you're paying for one GPU's worth of tokens anyway, and paying flat is cheaper than paying per token.
* **Fine-tuned model:** Dedicated endpoint, or dedicated container if your platform does not support serverless for custom models.
* **Custom model with a non-standard pipeline:** Dedicated container.

<Info>
  You don't have to pick one option and stick with it across your entire stack. Many teams run serverless for everything they can, and a small dedicated endpoint for the parts that need it. A mixed approach often works out to be cheaper than going all-in on either side.
</Info>

## Next steps

<CardGroup cols={3}>
  <Card title="Quantization" icon="zoom-in" href="/learn/quantization">
    The other major lever on inference cost.
  </Card>

  <Card title="Inference metrics: TTFT & TPS" icon="dashboard" href="/learn/ttft-and-tps">
    The latency numbers you'll be comparing across options.
  </Card>

  <Card title="Fine-tune vs. prompt" icon="git-branch" href="/learn/finetune-vs-prompt">
    What determines whether you'll need dedicated hardware at all.
  </Card>
</CardGroup>
