Markdown Converter
Agent skill for markdown-converter
ChatKit Link is a web application that allows users to demo their ChatKit workflows by providing a workflow ID and OpenAI API key. Built with FastAPI backend and Vite + React frontend.
Sign in to like and favorite skills
ChatKit Link is a web application that allows users to demo their ChatKit workflows by providing a workflow ID and OpenAI API key. Built with FastAPI backend and Vite + React frontend.
?workflow=wf_abc123@openai/chatkit-react packagegetClientSecret methodRequest:
{ "workflow_id": "wf_abc123...", "api_key": "sk-proj-...", "user_id": "optional-uuid" }
Response:
{ "client_secret": "ek_...", ... }
Implementation Details:
/v1/chatkit/sessionsOpenAI-Beta: chatkit_beta=v1apiKey: User's OpenAI API key (localStorage)workflows: Array of {id, label} objects (localStorage)activeWorkflowId: Currently selected workflow (localStorage)sidebarCollapsed: Boolean for sidebar state (localStorage)clientSecret: Active ChatKit session secretloading: Loading state during session creationerror: Error messagesApp ├── Sidebar (expanded or collapsed) │ ├── API Key Section │ ├── Add Workflow Form │ └── Workflows List └── Main Content └── ChatKit Component or Placeholder
height: 100vhConfigured to allow ChatKit resources:
script-src: cdn.platform.openai.com, chatgpt.com, cdn.openai.com connect-src: chatgpt.com, sentinel.openai.com, *.oaiusercontent.com, api.openai.com, mixpanel, backend style-src: cdn.openai.com font-src: cdn.openai.com frame-src: cdn.platform.openai.com (required for ChatKit iframe) img-src: data:, blob:, https:
IMPORTANT: Use EITHER
getClientSecret OR domainKey, not both.
Current Implementation (Correct):
useChatKit({ api: { async getClientSecret(existing) { return clientSecret; }, }, // NO domainKey - incompatible with getClientSecret })
Why domainKey was removed:
domainKey + url is for custom backend implementations that proxy all ChatKit API callsgetClientSecret is for direct OpenAI API integration (our approach)InvalidFrameParamsError: Invalid input → at apiBackend (Web Service):
pip install -r requirements.txtuvicorn main:app --host 0.0.0.0 --port $PORTFrontend (Static Site):
cd .conductor/chicago && npm install && npm run build.conductor/chicago/distEnvironment Variables:
VITE_API_URL (defaults to backend.onrender.com)CHATKIT_API_BASE (defaults to api.openai.com)main (production, auto-deploys to Render)chatkit-demo-site (development work)Cause: CSP blocking frame-src Solution: Add
https://cdn.platform.openai.com to frame-src directive
Cause: Using
domainKey with getClientSecret
Solution: Remove domainKey from ChatKit config
Cause: Missing API key or inactive workflow state Solution: Ensure API key is entered and
loadWorkflow is called on click
Cause: localStorage not being updated Solution: Verify useEffect hooks save to localStorage on state changes
.conductor/chicago/ ├── index.html # Entry point, CSP, ChatKit CDN script ├── src/ │ ├── App.jsx # Main component with sidebar & ChatKit │ ├── App.css # All styling │ └── main.jsx # React entry ├── package.json # Dependencies ├── vite.config.js # Dev server config └── .gitignore # Excludes node_modules Backend: ├── main.py # FastAPI server ├── requirements.txt # Python dependencies └── .env.example # Environment template
chatkit_api_key: User's OpenAI API keychatkit_workflows: JSON array of {id, label}chatkit_active_workflow: Currently selected workflow IDchatkit_sidebar_collapsed: "true" or "false"