The error 'failed to parse JSON value' revealed that despite curl examples
using -F flags, OpenAI's video API actually expects JSON POST requests.
- Changed back to JSON format using _request() method
- Simplified code by removing multipart/form-data handling
- Kept debug logging for troubleshooting
- Updated documentation to remove multipart/form-data mention
This should resolve the 400 Bad Request error.
- Added detailed debug output showing URL, model, prompt, and parameters
- Improved error handling to show full API response in error messages
- Fixed form data handling to preserve integer types properly
- Added empty string check before adding parameters
This will help diagnose the 400 Bad Request error
BREAKING FIX: Corrected to match official OpenAI API documentation
- Changed endpoint to /v1/videos (was incorrectly /v1/videos/generations)
- Changed from JSON POST to multipart/form-data POST (OpenAI requirement)
- Fixed image-to-video parameter: 'image' (was incorrectly 'input_reference')
- Updated API client to use requests 'files' parameter for form fields
- Removed incorrect Content-Type header to allow proper boundary setting
Reference: https://platform.openai.com/docs/api-reference/videos/create
- Fixed video generation parameters to match OpenAI's API format
- Convert resolution + aspect_ratio to 'size' parameter (e.g., '1920x1080')
- Convert duration to 'seconds' string format (e.g., '5s')
- Filter out fps parameter for OpenAI (not supported)
- Use 'input_reference' instead of 'image_url' for image-to-video
- Added SaveVideoNode to download and save videos locally
- Supports timestamp placeholders in filenames
- Auto-creates output directories
- Shows file size after download
- Updated QUICKSTART guide with video generation examples
- Updated API client documentation with correct parameter formats
- Full OpenAI-compatible API integration for ComfyUI
- Support for Text, Image, Video, and Speech generation
- Works with OpenAI, Venice.ai, OpenRouter, Together.ai, Ollama, and any OpenAI-compatible API
- Modern comfy_api.latest node format
- 10 nodes: 4 basic + 4 advanced + 2 utility
- Complete documentation and examples
- Model discovery and caching system
- Server routes for API management