Product

Typed APIs

A typed client for every model. Run one command and your content model becomes a typed client, with no manual definitions to maintain.

0

Command to generate typed code

0+

Field types, mapped to real TypeScript

0%

Types matching what’s modeled in the Dashboard

0

Interfaces reading the same schema — SDK, REST, webhooks

Generated, not hand-written

Autocomplete for every field you define

Add a field in the Dashboard, then run `cairn typegen` — by hand, in CI, or as a predev script — and it shows up typed in your client. No manual type definitions to maintain, and no drift between what your schema says and what your editor autocompletes.

  • One command pulls your whole schema into types
  • Invalid queries fail at compile time, not runtime
  • Works with the TypeScript client you already use
fetch.ts
const post = await cairn.posts.findOne({
  where: { slug: 'hello-world' },
  select: ['title', 'author', 'body'],
})

post.titel // ✕ Type error: did you mean 'title'?

Query your way

REST or the typed client — same schema, same shapes

Prefer raw REST calls or the generated TypeScript client — both read from the same models, with the same field names, the same pagination, and the same error shapes. Pick whichever fits the part of your stack you're building.

  • REST endpoints generated for every model
  • Consistent pagination and error shapes throughout
  • Nothing to keep in sync by hand
terminal
$ curl https://api.cairn.dev/v1/posts/hello-world
{ "title": "Hello World", "author": { "name": "..." } }

Every way to connect

Pick the interface that fits your stack

TypeScript SDK

A fully typed client generated on demand from your schema, via `cairn typegen`.

REST

Predictable REST endpoints for every model, ready for any HTTP client.

Webhooks

Fire events to downstream systems the moment content changes.

Start querying your content

Every model you define ships with a typed client, ready to import.