Browse, inspect, and export design styles with tokens, recipes, and AI rules.
GET /api/stylesList all available design styles with metadata and API links. GET /api/styles/[slug]Get full details for a single style including tokens, recipes, philosophy, AI rules, components, and accessibility score. GET /api/styles/[slug]/tokensGet design tokens (colors, spacing, typography, etc.) for a style. GET /api/styles/[slug]/recipesGet component recipes (implementation patterns) for a style. GET /api/styles/[slug]/versionsGet version history and changelog for a style. Optionally request a specific version snapshot. GET /api/styles/[slug]/claude-rulesExport style as Claude AI rules (CLAUDE.md format). Returns text/markdown. GET /api/styles/[slug]/cursorrulesExport style as Cursor AI rules (.cursorrules format). Returns text/plain. GET /api/styles/[slug]/skill-packExport style as a skill pack bundle (Markdown). Returns text/markdown. GET /api/styles/[slug]/mdExport style as a Markdown document for LLM consumption (llms.txt compatible). Manage user favorite styles. All endpoints require authentication.
GET /api/favoritesAuth Get the authenticated user's favorite style slugs. POST /api/favoritesAuth Add a style to favorites. Idempotent (duplicate adds are ignored). DELETE /api/favoritesAuth Remove a style from favorites. POST /api/favorites/mergeAuth Bulk merge local favorites into the server. Useful after login to sync localStorage favorites. Access the authenticated user's activity: comments, ratings, and submissions.
GET /api/profile/commentsAuth Get the authenticated user's comments (most recent 50). GET /api/profile/ratingsAuth Get the authenticated user's ratings (most recent 50). GET /api/profile/submissionsAuth Get the authenticated user's style submissions (most recent 50). Submit new community styles and manage the review pipeline.
POST /api/submitSubmit a new style for community review. GET /api/admin/submissionsAdmin List all submissions with their review status. Requires admin access. GET /api/admin/submissions/[id]Get details of a specific submission. PATCH /api/admin/submissions/[id]Update a submission (e.g. edit fields before review). POST /api/admin/submissions/[id]/reviewSubmit a review decision for a submission. Usage statistics, top styles, and combination data.
GET /api/analyticsGet usage analytics. Supports ?top=N for top styles, ?combinations=true for popular pairings. GET /api/admin/analyticsDashboard analytics with time-range filtering. Search the knowledge base, get recommendations, and explore domains and tech stacks.
GET /api/knowledge/searchUnified search across all knowledge domains. GET /api/knowledge/recommendGet style recommendations based on project context. GET /api/knowledge/domainsList all available knowledge domains. GET /api/knowledge/stacksList supported tech stacks with guidelines. GET /api/knowledge/smartSmart suggestions: compare styles, suggest by priorities, or context-aware recommendations. Run extract -> analyze -> match -> migrate -> generate -> export pipelines. Rate-limited. Pipeline endpoints include telemetry headers: x-stylekit-duration-ms, x-stylekit-status, and x-stylekit-error-code (on errors).
POST /api/pipeline/runStart a new pipeline run and execute all six stages. Common error codes: ORIGIN_NOT_ALLOWED, RATE_LIMITED, PAYLOAD_TOO_LARGE, INVALID_JSON, INVALID_REQUEST, PIPELINE_EXECUTION_FAILED. GET /api/pipeline/run/[id]Get the status and details of a pipeline run. Common error codes: RUN_NOT_FOUND, PIPELINE_RUN_FETCH_FAILED. POST /api/pipeline/run/[id]/retryRetry a failed pipeline run from a specific stage. Common error codes: ORIGIN_NOT_ALLOWED, RATE_LIMITED, PAYLOAD_TOO_LARGE, INVALID_JSON, INVALID_STAGE, RUN_NOT_FOUND, RUN_NOT_FAILED, INVALID_STAGE_ORDER, PIPELINE_RETRY_FAILED. GET /api/pipeline/run/[id]/downloadDownload exported pipeline artifacts as a zip archive. Common error codes: RUN_NOT_FOUND, EXPORT_NOT_FOUND, PIPELINE_DOWNLOAD_FAILED. Admin-only endpoints for audit logs and system management.
GET /api/admin/auditAdmin Query admin audit log events. Supports filtering and CSV export. Admin access required. GET /api/admin/generatorAdmin Query generator API telemetry, including daily trend summary and CSV export. Admin access required. OAuth authentication flows. These endpoints handle browser redirects, not direct API calls.
GET /api/auth/callbackGitHub OAuth callback. Exchanges the authorization code for a session. Called by the OAuth provider after user authorization. GET /api/auth/linuxdoInitiate Linux DO OAuth flow. Redirects the user to the Linux DO authorization page. GET /api/auth/linuxdo/callbackLinux DO OAuth callback. Exchanges the code for a session and creates/updates the user. Archetypes, design system generation, and UI planning.
GET /api/archetypesList all style archetypes. GET /api/archetypes/[id]Get a specific archetype by ID. POST /api/generate/design-systemGenerate a complete design system from product context and style preferences. Common error codes: ORIGIN_NOT_ALLOWED, RATE_LIMITED, INVALID_JSON, INVALID_REQUEST, STYLE_NOT_FOUND, GENERATION_FAILED. Response headers include x-stylekit-duration-ms, x-stylekit-status, and x-stylekit-error-code (on errors). GET /api/ui-plan/schemaGet the JSON schema for UI plan validation. POST /api/ui-plan/validateValidate a UI plan against the schema.