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:
| Field | Description |
|---|---|
| Slug | A URL-friendly name for your project (e.g. my-project). This becomes your edge domain: my-project.cachely.io |
| CMS | Select your CMS type — Prismic, Contentful, Sanity, Shopify, Cloudinary, Imgix, Storyblok, or Generic Origin |
| Repository name | For Prismic: your repository name (e.g. my-repo) |
| Space ID | For Contentful: your space ID |
| Project ID | For Sanity: your project ID (e.g. z5k7abcd) |
| Store domain | For Shopify: your store domain (e.g. your-store.myshopify.com) |
| Cloud name | For Cloudinary: your cloud name (e.g. my-cloud) |
| Imgix domain | For Imgix: your source domain (e.g. my-source.imgix.net) |
| Storyblok space ID | For Storyblok: your numeric space ID |
| Origin URL | For Generic Origin: full HTTPS origin URL |
| Website domain | The 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, orBYPASSX-Parsed: truewhen 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
- Cachely SDK reference — Full API:
createCachelyFetch,createCachelyUrlRewriter, providers, types - API Proxy Overview — Understand when to use asset proxy vs API proxy
- Configuring API Proxy — Set up
/~api, caching, and token injection - How It Works — Understand the full request flow
- Prismic Integration — Deep dive into Prismic-specific setup
- Contentful Integration — Deep dive into Contentful-specific setup
- Sanity Integration — Deep dive into Sanity-specific setup
- Shopify Integration — Deep dive into Shopify-specific setup
- Cloudinary Integration — Deep dive into Cloudinary-specific setup
- Imgix Integration — Deep dive into Imgix-specific setup
- Storyblok Integration — Deep dive into Storyblok-specific setup
- Admin API — Reference for tenant, API proxy, and cache endpoints
- Limits & Usage — Learn about bandwidth tracking