Base URL
https://api.cgheven.com/api
Endpoints
Quick reference
ResourceMethodPathDescription
CategoriesGET/categoriesList all categories
CategoryGET/categories/{documentId}Get one category
AssetsGET/assetsList all assets
AssetGET/assets/{documentId}Get one asset

🚀 Quick Start (2 Minutes)

Step 1 — Get an API Token
Subscribe on Patreon to get API access, then retrieve your personal token from your Dashboard.
Step 2 — Make Your First Request
Use this command to fetch your first assets. Replace YOUR_API_TOKEN with your actual token. A successful response returns JSON containing asset metadata and download links.
curl https://api.cgheven.com/api/assets -H "Authorization: Bearer YOUR_API_TOKEN"
Step 3 — Download an Asset
CDN links are in the files array of each asset. Files are hosted on CGHEVEN’s CDN. Use the API for automation and metadata; use the CDN URLs to download files.
curl -O https://cdn.cgheven.com/file/...
Step 4 — Common Errors
What each status code means.
401
Unauthorized

Missing or invalid token

404
Not Found

Invalid endpoint or ID

429
Rate Limited

Too many requests

500
Server Error

Strapi internal error

Step 5 — Next Steps
Continue with advanced features such as pagination, filtering, and integration examples below.

Explore these sections:

Authentication

Authorization header
Add this HTTP header to every request. Replace YOUR_API_TOKEN with your token.
Authorization: Bearer YOUR_API_TOKEN

Subscribe on Patreon to get API access, then copy your token from your Dashboard.

Missing or invalid token
Response when the token is omitted or invalid (e.g. 403)
{
  "error": "Forbidden",
  "message": "Invalid authorization header"
}
Example: authenticated request (cURL)
Replace API_TOKEN_HERE with your token. The -g flag allows square brackets in the URL.
curl "https://api.cgheven.com/api/assets?pagination[pageSize]=5" -g -H "Authorization: Bearer API_TOKEN_HERE"
Valid response example
Successful response (200) when using a valid token. data is an array of assets; meta.pagination describes the result set.
{
  "data": [
    {
      "id": 2240,
      "documentId": "uy27y27dx1ib1mew049uig21",
      "Title": "Energy Burst 13 - Flipbook 6×6",
      "thumbnail": "https://api.cgheven.com/uploads/...",
      "files": ["https://cdn.cgheven.com/file/...", "..."],
      "previews": "https://cdn.cgheven.com/file/...",
      "is_patreon_locked": false,
      "assets_slug": "energy-burst-13-flipbook-6x6",
      "createdAt": "2025-11-03T20:39:27.095Z",
      "updatedAt": "2025-11-04T20:33:29.831Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 5,
      "pageCount": 127,
      "total": 633
    }
  }
}

Pagination

Applies to list endpoints only: /assets and /categories. Default is 25 items per page.

Query parameters
Add these to the URL when calling list endpoints.
ParameterDescription
pagination[page]Page number (1-based)
pagination[pageSize]Items per page (default 25)
Response: meta.pagination
Every list response includes this in meta.
"meta": {
  "pagination": {
    "page": 1,
    "pageSize": 25,
    "pageCount": 26,
    "total": 633
  }
}
Example request
Fetch the first 5 assets (replace API_TOKEN_HERE with your token).
curl "https://api.cgheven.com/api/assets?pagination[page]=1&pagination[pageSize]=5" -g -H "Authorization: Bearer API_TOKEN_HERE"
Fetch all pages (JavaScript)
Loop until you have all items using meta.pagination.total.
let page = 1, pageSize = 100, all = [];
while (true) {
  const res = await fetch(
    `https://api.cgheven.com/api/assets?pagination[page]=${page}&pagination[pageSize]=${pageSize}`,
    { headers: { Authorization: "Bearer YOUR_TOKEN" } }
  );
  const json = await res.json();
  all = all.concat(json.data);
  if (page * pageSize >= json.meta.pagination.total) break;
  page++;
}

Common Asset Fields

Understanding the data structure

FieldTypeDescription
documentIdStringStable unique ID for URLs (use in /assets/{documentId})
TitleStringAsset name/title
DescriptionArrayRich-text description (blocks/paragraphs)
thumbnailString (URL)Thumbnail image URL
previewsString (URL)Preview video or image URL
filesArrayDownload links (CDN URLs)
additional_imagesArrayExtra image URLs (can be null)
Info_JSONObjectMetadata: created_at, modified_at, asset_details, download_available, formats, etc.
assets_slugStringURL-friendly slug (e.g. energy-burst-13-flipbook-6x6)
categorieObjectLinked category (when populated)
tagsArrayList of tag strings
early_accessNumberEarly-access days (0 if none)
releaseDateDateTime | nullPlanned or actual release date
Tools_usedString | nullTools used to create the asset
updatedAtDateTimeLast updated timestamp
publishedAtDateTimeWhen the asset was published

Code Examples

Quick start in different environments

JavaScript (Browser)
fetch('https://api.cgheven.com/api/assets?populate=*', {
  headers: { 
    Authorization: 'Bearer YOUR_API_TOKEN' 
  }
})
.then(res => res.json())
.then(data => console.log(data));
Node.js (Axios)
import axios from "axios";

const API_URL = "https://api.cgheven.com/api/assets";
const TOKEN = "YOUR_API_TOKEN";

axios.get(API_URL, {
  headers: { 
    Authorization: `Bearer ${TOKEN}` 
  }
})
.then(res => console.log(res.data))
.catch(err => console.error(err));

Error Handling

Common HTTP status codes and their meanings

401
Unauthorized

Missing or invalid token

404
Not Found

Invalid endpoint or ID

429
Rate Limited

Too many requests

500
Server Error

Strapi internal error

Performance Tips & Best Practices
  • Use pagination[pageSize] wisely (100 recommended)
  • Avoid fetching all collections at once in production
  • Use fields[] to request only specific attributes
  • Cache API responses (e.g., in localStorage or your database)

Need help? Contact support: