casset/docs
FeaturesOpen app
docs indexreference
00Overview01Thesis02Architecture03System reality04Roadmap05Investor brief06Technical brief07Full tech HTML08Casset Apps09Headless API10Playback11Audio pipeline12Commerce13Base anchoring14Hook system15Music video16Theming17Creator guide18Glossary
Headless APIDeployed · unsupported
QuickstartExamplesAPI ReferenceSDK
Advanced
React adapterStarter detailsError handlingRetries & timeoutsUse casesRequest IDs & safe loggingAPI versioningLocal sandboxLocal webhooksAvailability & limitationsFAQChangelogDesign principles
Headless API · Quickstart

Build your first Casset-powered artist page.

Download the React starter, run it against exact local mocks, and see public Artist and Catalog data in minutes.

No Casset account or API key is required. The starter opens in mocked mode and includes the exact alpha SDK source it needs.

1. Download and run the starter

curl -LO https://casset.fm/downloads/casset-api/casset-headless-react-v0.2.0-alpha.0.zip
unzip casset-headless-react-v0.2.0-alpha.0.zip
cd casset-headless-react
pnpm install
pnpm test
pnpm dev

The app opens in mocked mode. No Casset account, API key, or live route is required. Use the built-in states to exercise ready, empty, permission, entitlement, invalid credential, rate limit, unavailable, and integration outcomes.

2. Make the first TypeScript read

The built-in SDK mock uses aurora-fields. It returns the same strict public response shapes without making a network request.

import { createCassetClient, createCassetMockTransport } from "@casset/apps"

const casset = createCassetClient({
  baseUrl: "http://127.0.0.1:3000",
  transport: createCassetMockTransport({ state: "ready" }),
})

const artist = await casset.getArtist("aurora-fields", {
  requestId: "quickstart-artist-001",
})

console.log(artist.artist.displayName)

Handles use the exact grammar [a-z0-9_-], with 3–30 characters. The client rejects a malformed handle before making a request.

3. Render with React

import { CassetClientProvider, useCassetArtist } from "@casset/react"

function ArtistName() {
  const artist = useCassetArtist("aurora-fields")

  if (artist.status === "loading" || artist.status === "idle") return <p>Loading…</p>
  if (artist.status === "error") return <p>Artist unavailable.</p>
  return <h1>{artist.data.artist.displayName}</h1>
}

export function App() {
  return (
    <CassetClientProvider client={casset}>
      <ArtistName />
    </CassetClientProvider>
  )
}

Current availability

The two public v1 GET routes are deployed and require no credential, but they are not supported for production use. Requests may intentionally fail closed with 503 ResourceUnavailable. No uptime, availability, or production-use commitment is offered. Mocked mode is the reliable default.

How this alpha is packaged

@casset/apps and @casset/react are repository-local and are not published to npm. The generated ZIP vendors the exact package source used by Casset.

4. Call the locally served source route

curl --include \
  --header "Accept: application/json" \
  --header "X-Request-Id: quickstart-curl-001" \
  http://127.0.0.1:3000/api/v1/artists/connor

Public v1 reads do not use a credential. This request requires a local Casset server with a published public artist. It tests your local route, not the availability of the deployed alpha route.

5. Need authorization or webhook rehearsal?

Continue with the local sandbox when you need credential issuance, revocation, and sanitized request inspection. Use the separate local webhooks guidefor signing, retries, replay, and duplicate suppression.

Server-side only

Sandbox credentials are optional, loopback-only, and revealed once. Never put one in a VITE_*, NEXT_PUBLIC_*, browser bundle, or log. Production developer credentials remain unavailable.

Next

  • Try the no-network documentation fixture.
  • Inspect the exact endpoint contracts.
  • Configure timeouts, retries, and request IDs.
  • Handle every typed error.
© Casset 2026
Trust & PrivacyTerms