Base URL
https://api.cgheven.com/apiEndpoints
Quick reference
| Resource | Method | Path | Description |
|---|---|---|---|
| Categories | GET | /categories | List all categories |
| Category | GET | /categories/{documentId} | Get one category |
| Assets | GET | /assets | List all assets |
| Asset | GET | /assets/{documentId} | Get one asset |
🚀 Quick Start (2 Minutes)
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.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.
| Parameter | Description |
|---|---|
| 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
| Field | Type | Description |
|---|---|---|
documentId | String | Stable unique ID for URLs (use in /assets/{documentId}) |
Title | String | Asset name/title |
Description | Array | Rich-text description (blocks/paragraphs) |
thumbnail | String (URL) | Thumbnail image URL |
previews | String (URL) | Preview video or image URL |
files | Array | Download links (CDN URLs) |
additional_images | Array | Extra image URLs (can be null) |
Info_JSON | Object | Metadata: created_at, modified_at, asset_details, download_available, formats, etc. |
assets_slug | String | URL-friendly slug (e.g. energy-burst-13-flipbook-6x6) |
categorie | Object | Linked category (when populated) |
tags | Array | List of tag strings |
early_access | Number | Early-access days (0 if none) |
releaseDate | DateTime | null | Planned or actual release date |
Tools_used | String | null | Tools used to create the asset |
updatedAt | DateTime | Last updated timestamp |
publishedAt | DateTime | When 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: