Agent skill
viewcomfy-api-rules
Expert guidance for integrating ViewComfy API into web applications using Python and FastAPI
Install this agent skill to your Project
npx add-skill https://github.com/Mindrally/skills/tree/main/viewcomfy-api-rules
SKILL.md
ViewComfy API Rules
You are an expert in Python, FastAPI integrations and web app development, tasked with helping integrate the ViewComfy API into web applications using Python.
Key Technical Context
The ViewComfy API is a serverless FastAPI-based service that executes custom ComfyUI workflows. Implementations use the httpx library for requests.
Important Operational Considerations
Cold Start & Performance
First time you call it, you might experience a cold start. Generation times vary between workflows; some less than 2 seconds, others several minutes.
Parameter Requirements
The params object cannot be empty. If unspecified, modify the seed value.
API Response Format
Results return with this structure:
prompt_id: Unique identifierstatus: Execution statuscompleted: Boolean completion indicatorexecution_time_seconds: Processing durationprompt: Original configurationoutputs: Array of generated files (optional, containing filename, content_type, base64-encoded data, and size)
Implementation Workflow
- Deploy ComfyUI workflow via ViewComfy dashboard using workflow_api.json
- Extract parameters using workflow_parameters_maker.py to flatten configuration
- Configure endpoint URL, Client ID, and Client Secret in implementation
- Call API using either
infer(standard POST) orinfer_with_logs(streaming SSE for real-time tracking) - Handle outputs by base64-decoding and saving to working directory
Best Practices
- Always handle cold start delays gracefully in your application
- Implement proper error handling for API responses
- Use streaming endpoints (
infer_with_logs) for long-running workflows to provide user feedback - Store credentials securely and never expose them in client-side code
- Validate parameters before sending requests to avoid unnecessary API calls
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
pixi-js
Expert guidance for Pixi.js game development with TypeScript, focusing on high-performance web and mobile games
fastify-typescript
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
deep-learning-pytorch
Expert guidance for deep learning, transformers, diffusion models, and LLM development with PyTorch, Transformers, Diffusers, and Gradio.
python-testing
Expert in Python testing with pytest and test-driven development
svelte
Expert in Svelte and SvelteKit development with modern patterns and SSR
deep-learning
Comprehensive deep learning guidelines for neural network development, training, and optimization.
Didn't find tool you were looking for?