Loading...
Loading...
Public API theme management (X-API-KEY). List, get, generate, and apply themes. Types follow PublicThemeController (/api/v2/themes).
npx skill4agent add compilet-dev/agent-skill-layerproof themes/api/v2/themesX-API-KEYPublicThemeController// --- List Themes (GET) ---
// Query: offset?: number (default 0), limit?: number (default 20), search?: string
type PublicThemeListResponse = {
data: PublicThemeResponse[];
total: number;
offset: number;
limit: number;
};
// --- Get Theme By ID (GET) ---
type PublicThemeResponse = {
id: string;
name: string;
description: string | null;
visibility: string;
preview_url: string;
created_at: string; // ISO 8601
updated_at: string; // ISO 8601
};
// --- Generate Theme (POST) — PublicGenerateThemeRequest / PublicGenerateThemeResponse ---
type PublicGenerateThemeRequest = {
/** Theme generation prompt (required, max 5000 characters) */
prompt: string;
/** Optional THEME project ID; if omitted, a project is created automatically */
project_id?: string;
};
type PublicGenerateThemeResponse = {
activity_id: string; // UUID – poll GET /api/v2/jobs/{activityId}
theme_id: string; // UUID
};
// --- Apply Theme (POST) — PublicApplyThemeRequest / PublicApplyThemeResponse ---
type PublicApplyThemeRequest = {
slide_deck_id: string; // UUID
theme_id: string; // UUID
/** If true, triggers batch image regeneration; poll activity_id when set */
regenerate_slides?: boolean; // default false
};
type PublicApplyThemeResponse = {
theme_id: string;
theme_name: string;
slide_deck_id: string;
applied: boolean;
activity_id: string | null; // set when regenerate_slides is true – poll GET /api/v2/jobs/{activityId}
};offsetlimitsearchPublicThemeListResponsecurl "$LAYERPROOF_BASE_URL/api/v2/themes?offset=0&limit=20" \
-H "X-API-KEY: $LAYERPROOF_API_KEY"PublicThemeResponsecurl "$LAYERPROOF_BASE_URL/api/v2/themes/<theme_id>" \
-H "X-API-KEY: $LAYERPROOF_API_KEY"PublicGenerateThemeRequestPublicGenerateThemeResponsepromptproject_idGET /api/v2/jobs/{activityId}curl -X POST "$LAYERPROOF_BASE_URL/api/v2/themes/generate" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $LAYERPROOF_API_KEY" \
-d '{"prompt":"Clean, minimal style with SF Pro"}'project_idcurl -X POST "$LAYERPROOF_BASE_URL/api/v2/themes/generate" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $LAYERPROOF_API_KEY" \
-d '{"prompt":"Clean, minimal style","project_id":"<theme_project_uuid>"}'PublicApplyThemeRequestPublicApplyThemeResponseregenerate_slidesGET /api/v2/jobs/{activityId}curl -X POST "$LAYERPROOF_BASE_URL/api/v2/themes/apply" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $LAYERPROOF_API_KEY" \
-d '{"slide_deck_id":"<slide_deck_uuid>","theme_id":"<theme_uuid>"}'curl -X POST "$LAYERPROOF_BASE_URL/api/v2/themes/apply" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $LAYERPROOF_API_KEY" \
-d '{"slide_deck_id":"<slide_deck_uuid>","theme_id":"<theme_uuid>","regenerate_slides":true}'| User intent | Endpoint | Method |
|---|---|---|
| List/browse themes, search themes | | GET |
| Get one theme by ID | | GET |
| Create a new theme from a prompt | | POST |
| Apply a theme to a slide deck | | POST |
X-API-KEY: $LAYERPROOF_API_KEYLAYERPROOF_BASE_URLLAYERPROOF_API_KEYcurloffsetlimitsearch-X POST-H "Content-Type: application/json"-d '...'activity_idtheme_idtheme_idGET $LAYERPROOF_BASE_URL/api/v2/jobs/<activity_id>statusDONECANCELEDregenerate_slides: trueactivity_idGET .../api/v2/jobs/<activity_id>preview_urlPOST /api/v2/themes/generate{"prompt":"minimal dark mode"}curl -X POST "$LAYERPROOF_BASE_URL/api/v2/themes/generate" -H "Content-Type: application/json" -H "X-API-KEY: $LAYERPROOF_API_KEY" -d '{"prompt":"minimal dark mode"}'activity_id/api/v2/jobs/{activityId}theme_id/api/v2/themeslimitoffsetsearch/api/v2/themes/generate{"prompt":"corporate blue"}activity_idtheme_idGET /api/v2/jobs/{activity_id}failure_reasontheme_id.../slide-deck/.../settings{"theme_id":"<theme_id>"}regenerate_slides: trueactivity_id.../settings{"theme_id":"<theme_id>"}slide_deck.theme