Getting Started

Cachely takes about 5 minutes to set up. Create a project, connect your CMS, install the Cachely SDK, and start serving cached content from your edge domain.


1. Create an account

Sign up at accounts.cachely.io/sign-up. You can start with the free plan — no credit card required.


2. Create your project

After signing in, go to your dashboard and create a new project.

You'll need to provide:

FieldDescription
SlugA URL-friendly name for your project (e.g. my-project). This becomes your edge domain: my-project.cachely.io
CMSSelect your CMS type — Prismic, Contentful, Sanity, Shopify, Cloudinary, Imgix, Storyblok, or Generic Origin
Repository nameFor Prismic: your repository name (e.g. my-repo)
Space IDFor Contentful: your space ID
Project IDFor Sanity: your project ID (e.g. z5k7abcd)
Store domainFor Shopify: your store domain (e.g. your-store.myshopify.com)
Cloud nameFor Cloudinary: your cloud name (e.g. my-cloud)
Imgix domainFor Imgix: your source domain (e.g. my-source.imgix.net)
Storyblok space IDFor Storyblok: your numeric space ID
Origin URLFor Generic Origin: full HTTPS origin URL
Website domainThe domain of your frontend (used for Referer headers and origin requests when needed)

Once created, your edge domain is live:

https://your-project.cachely.io

3. Install the Cachely SDK

The recommended path is the Cachely SDK — a small, framework-agnostic package that rewrites your CMS API and asset URLs through your project's edge domain.

npm install @cachely-io/sdk

You can also configure the asset proxy without the SDK by rewriting URLs manually in your CMS responses, but the SDK is the simplest path for most apps.


4. Configure the SDK

Drop the SDK into the same place where you create your CMS client today.

Contentful

import { createCachelyFetch } from '@cachely-io/sdk'
import { createClient } from 'contentful'

const cachelyFetch = createCachelyFetch({
  tenant: 'your-project',                    // your Cachely project slug
  provider: 'contentful',
  providerConfig: { spaceId: 'your-space-id' },
})

const client = createClient({
  space: 'your-space-id',
  accessToken: '',                           // injected server-side by the proxy
  adapter: cachelyFetch,
})

Prismic

import { createCachelyFetch } from '@cachely-io/sdk'
import * as prismic from '@prismicio/client'

const cachelyFetch = createCachelyFetch({
  tenant: 'your-project',
  provider: 'prismic',
})

const client = prismic.createClient('your-repo', {
  fetch: cachelyFetch,
})

Sanity, Storyblok, Shopify, Cloudinary, Imgix, or any other CMS

Use createGenericProvider to plug any CMS into the SDK:

import { createGenericProvider, createCachelyFetch } from '@cachely-io/sdk'

const storyblok = createGenericProvider({
  id: 'storyblok',
  apiHosts: ['api.storyblok.com'],
  assetHosts: ['a.storyblok.com'],
})

const cachelyFetch = createCachelyFetch({
  tenant: 'your-project',
  provider: storyblok,
})

After this, the SDK transparently rewrites both API and asset URLs so your CMS traffic flows through https://your-project.cachely.io.


5. Choose what to proxy

Both API and asset proxying are enabled by default. Toggle either off if you only want one:

// Asset proxy only — API requests go directly to your CMS
const cachelyFetch = createCachelyFetch({
  tenant: 'your-project',
  provider: 'contentful',
  enableApiProxy: false,
})

// API proxy only — asset URLs are not rewritten
const cachelyFetch = createCachelyFetch({
  tenant: 'your-project',
  provider: 'contentful',
  enableAssetProxy: false,
})

If you want server-side token injection, edge caching of API responses, and proxy-ready asset URLs in JSON, leave both on. If you just want media caching and no other changes, set enableApiProxy: false.


6. Deploy

Once deployed, your full setup runs through one edge domain. With the API proxy enabled, read-only CMS requests flow through https://your-project.cachely.io/~api/..., and parsed API responses already contain proxy-ready asset URLs.

Verify it's working

If you enabled the API proxy, test one GET request through https://your-project.cachely.io/~api/... and check the response headers:

  • X-Cache: HIT, MISS, or BYPASS
  • X-Parsed: true when URL rewriting is enabled
  • proxy URLs in the JSON body instead of raw CMS asset origins

Then inspect any image element or asset URL in the app. It should point to your-project.cachely.io instead of the raw CMS CDN.


Next steps

Need help understanding this?Ask Cachely Copilot about features, setup, or integrations.
Ask Copilot →