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

# Choose your integration

> Widgets, Web SDK, or Server SDK — a one-page decision, with the questions that actually separate them.

The three surfaces are not tiers of the same thing. They answer different questions about
**who owns the user's account and the invest UI**, and that is what should decide it — not
how much code you feel like writing.

## Start with one question

**Do your users invest as Cesto users, or as your users?**

> [card] As Cesto users
>
> They sign in to Cesto (email, Google, or a Solana wallet), and Cesto holds the wallet
> and the position. Your product supplies the audience and the entry point.
> → [Widgets](https://docs.cesto.co/widgets/overview.md) or the [Web SDK](https://docs.cesto.co/web-sdk/overview.md).

> [card] As your users
>
> They never see Cesto. Your product holds the accounts and the wallets — Cesto-managed
> or your own — and you build the whole experience.
> → [Server SDK](https://docs.cesto.co/sdk/overview.md).

If the answer is "as Cesto users", the follow-up is just **where the invest happens**: on
`app.cesto.co` in a new tab (Widgets), or in a dialog on your own page with events you can
act on (Web SDK).

## Decision table

| If this is you | Use | Why |
| - | - | - |
| A newsletter, blog post, or marketing page that should *show* a basket | [Widgets](https://docs.cesto.co/widgets/overview.md) | One iframe, no key, no JavaScript |
| A landing page with an "Invest" CTA that must not send visitors away | [Web SDK](https://docs.cesto.co/web-sdk/overview.md) | In-page dialog, themed to your site, `onSuccess` fires on your page |
| A React app that wants a themed CTA and invest state in your own UI | [Web SDK → React](https://docs.cesto.co/web-sdk/react.md) | `<CestoInvestButton>`, `useCestoInvest()` |
| A CMS, Webflow, or no-code page where you can only add HTML | [Web SDK → Script tag](https://docs.cesto.co/web-sdk/script-tag.md) | One `<script>` plus `data-cesto-invest` attributes |
| Your users already have accounts and you want them to never leave your app | [Server SDK](https://docs.cesto.co/sdk/overview.md) | You own the UI end to end |
| Your users hold EVM (Base) funds and no Solana wallet | [Server SDK → Managed wallets](https://docs.cesto.co/sdk/managed-wallets.md) + [Bridging](https://docs.cesto.co/sdk/bridging.md) | Cesto provisions the Solana wallet and signs; CCTP moves the USDC |
| Your users connect Phantom or Solflare themselves | [Server SDK → split flow](https://docs.cesto.co/sdk/open-position.md) | Self-custody: the browser wallet signs, Cesto never holds a key |
| You only need to read basket data in the browser | [Server SDK → browser client](https://docs.cesto.co/sdk/browser-client.md) | `@cesto/sdk/client`, public reads, no key at all |

## What each surface costs you

> [tab] Widgets
>
> **You write:** an `<iframe>` tag.
>
> **You get:** a live, themeable basket card — banner, chart, allocation, Invest CTA.
>
> **You give up:** the invest itself happens on `app.cesto.co` in a new tab, and you get
> no events back. Content and the invest destination are fixed; only styling is yours.
>
> → [Overview](https://docs.cesto.co/widgets/overview.md) · [Usage](https://docs.cesto.co/widgets/usage.md) · [Playground](https://docs.cesto.co/widgets/playground.md)

> [tab] Web SDK
>
> **You write:** a button, plus a publishable key. In React, a provider and a component.
>
> **You get:** the whole invest flow — sign-in, funding, invest, close — in a dialog on
> your page, themed with your tokens, with `onSuccess` / `onScheduled` / `onError` /
> `onPositionClosed` callbacks you can wire to your own analytics and UI.
>
> **You give up:** the flow's screens are Cesto's. You register the origins you embed
> from, and the user still authenticates with Cesto inside the dialog.
>
> → [Overview](https://docs.cesto.co/web-sdk/overview.md) · [Quickstart](https://docs.cesto.co/web-sdk/quickstart.md) · [Playground](https://docs.cesto.co/web-sdk/playground.md)

> [tab] Server SDK
>
> **You write:** your product. Screens, state, error handling, and wallet plumbing (or
> let Cesto manage the wallets).
>
> **You get:** everything — products, positions, holdings, fees, managed wallets,
> open / close / rebalance, and CCTP bridging, all typed.
>
> **You give up:** nothing on the API side, but it is a real integration: a secret key
> on a server you run, and an execution lifecycle to poll and surface.
>
> → [Overview](https://docs.cesto.co/sdk/overview.md) · [Integration models](https://docs.cesto.co/sdk/integration-models.md)

## Keys, in one line each

* **Widgets** — no key. Any origin can embed them.
* **Web SDK** — a publishable `cesto_pk_…`, safe in your client bundle, valid only on the
  origins registered for it.
* **Server SDK** — a secret `cesto_sk_…`, server-side only, read- or write-scoped.

Details, and how to request each: [API keys](https://docs.cesto.co/developers/api-keys.md).

## Still not sure?

Pick the smallest surface that answers your question today. Moving from a widget to the
Web SDK is a script tag; moving from the Web SDK to the Server SDK is a new integration
but not a migration — positions opened either way are the same positions, readable through
[`positions.list`](https://docs.cesto.co/sdk/positions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.