1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"repo": "bowtiedbluefin/comfyui-ai-customurl", "files": {"QUICKSTART.md": {"e0eeff8552a86343c294dcded0aafa68363cea3d": {"t": 1785674476.1952982, "n": 7800, "h": "8d6a7d7e2e563b3c", "c": "# 🚀 Quick Start Guide - AI CustomURL\n\n## Simple 3-Step Process\n\n### 1️⃣ Find Your API Details\n\nVisit your API provider's documentation to get:\n- **Base URL** (the API endpoint)\n- **API Key** (your authentication token)\n- **Model Name** (which model you want to use)\n\n### 2️⃣ Enter in ComfyUI Node\n\nAdd a generation node and fill in these three fields:\n- `base_url`: Your API's base URL\n- `api_key`: Your API key\n- `model`: The model name\n\n### 3️⃣ Execute!\n\nEnter your prompt and run the workflow!\n\n---\n\n## 📚 Common API Configurations\n\n### OpenAI\n```\nbase_url: https://api.openai.com/v1\napi_key: sk-proj-...\nmodels:\n - Text: gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo\n - Image: dall-e-3, dall-e-2\n - Video: sora-1.0, sora-turbo (if you have access)\n - Speech: tts-1, tts-1-hd\n```\n\n### Venice.ai\n```\nbase_url: https://api.venice.ai/api/v1\napi_key: <your_venice_key>\nmodels:\n - Text: llama-3.3-70b, llama-3.1-405b, qwen-2.5-72b\n - Image: flux-dev, flux-pro, stable-diffusion-3.5\n - Speech: tts-kokoro\n```\n\n### OpenRouter\n```\nbase_url: https://openrouter.ai/api/v1\napi_key: sk-or-v1-...\nmodels:\n - Text: openai/gpt-4o, anthropic/claude-3.5-sonnet, meta-llama/llama-3.1-405b\n (Check https://openrouter.ai/models for full list)\n```\n\n### Together.ai\n```\nbase_url: https://api.together.xyz/v1\napi_key: <your_together_key>\nmodels:\n - Text: meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo\n - Image: black-forest-labs/FLUX.1-schnell\n (Check https://docs.together.ai/docs/inference-models for list)\n```\n\n### Local Ollama\n```\nbase_url: http://localhost:11434/v1\napi_key: not-needed (or leave blank)\nmodels:\n - Whatever you've pulled: llama3, mistral, codellama, etc.\n (Run: ollama list to see your models)\n```\n\n---\n\n## 🎯 Example: Text Generation with OpenAI\n\n1. Add \"Generate Text (AI CustomURL)\" node\n2. Fill in:\n ```\n base_url: https://api.openai.com/v1\n api_key: sk-proj-YOUR_KEY_HERE\n model: gpt-4o-mini\n prompt: Write me a haiku about coding\n system_prompt: You are a helpful assistant.\n temperature: 0.7\n max_tokens: 1024\n ```\n3. Execute → Get your generated text!\n\n## 🎯 Example: Image Generation with Venice\n\n1. Add \"Generate Image (AI CustomURL)\" node\n2. Fill in:\n ```\n base_url: https://api.venice.ai/api/v1\n api_key: YOUR_VENICE_KEY\n model: flux-dev\n prompt: A futuristic city at sunset\n size: 1024x1024\n ```\n3. Execute → Get your generated image!\n\n## 🎯 Example: Video Generation with OpenAI\n\n1. Add \"Generate Video (AI CustomURL)\" node\n2. Fill in:\n ```\n base_url: https://api.openai.com/v1\n api_key: sk-proj-YOUR_KEY_HERE\n model: sora-2\n prompt: A cat playing with a ball of yarn\n resolution: 1080p\n aspect_ratio: 16:9\n duration: 4\n fps: 24\n auto_poll: true\n poll_interval: 5\n max_wait_time: 1200\n ```\n3. Execute → The node will automatically wait until video is ready!\n\n**Auto-Polling Feature** (enabled by default):\n- `auto_poll: true` → Node automatically checks video status every X seconds\n- `poll_interval: 5` → Check every 5 seconds (default)\n- `max_wait_time: 1200` → Give up after 20 minutes (default)\n- You'll see status updates in the console\n- Once completed, `video_url` output contains the download link\n- `video_id` output contains the generation ID (for manual retrieval if needed)\n\n**Outputs:**\n- `video_url` → Direct link to download video (when completed)\n- `video_id` → OpenAI's video generation ID\n- `api_key` → Passes your API key to download/preview nodes\n- `response_json` → Full API response for debugging\n\n**Note**: The node automatically converts parameters to OpenAI's format:\n- `resolution` + `aspect_ratio` → `size` (OpenAI only supports 4 sizes):\n - `16:9` → `\"1280x720\"` (landscape)\n - `9:16` → `\"720x1280\"` (portrait)\n - `21:9` or `4:3` → `\"1792x1024\"` (wide landscape)\n - `1:1` → `\"1280x720\"` (defaults to landscape)\n- `duration` → `seconds` as string (\"4\", \"8\", or \"12\" only)\n - OpenAI only supports 4, 8, or 12 second videos\n - Will round to nearest valid value\n- `fps` is filtered out (not supported by OpenAI)\n- For image-to-video, connect an image input → `image` parameter\n\n### 🔄 Understanding Video Generation Workflow\n\n**With Auto-Polling (Default - Recommended):**\n1. Run \"Generate Video\" node with `auto_poll: true`\n2. Node automatically waits and checks status every 5 seconds\n3. Watch the console for progress updates\n4. When completed, `video_url` output has the download link\n5. Connect `video_url` directly to \"Save Video from URL\" or preview nodes!\n\n**Console Output Example:**\n```\n[INFO] Video generation started. ID: video_abc123\n[INFO] Initial status: queued\n[INFO] Auto-polling enabled. Will check every 5s (max 1200s)\n[INFO] Waiting 5s before checking status...\n[INFO] Status check (5s elapsed): processing\n[INFO] Waiting 5s before checking status...\n[INFO] Status check (10s elapsed): completed\n[SUCCESS] Video completed after 10s!\n[SUCCESS] Video URL: https://...\n```\n\n**Manual Polling (If Auto-Poll Disabled):**\nIf you set `auto_poll: false`, use the \"Retrieve Video Status\" node:\n1. Add \"Retrieve Video Status (AI CustomURL)\" node\n2. Connect `video_id` output from Generate node → `video_id` input\n3. Run it to check status\n4. When status = \"completed\", use the `video_url` output\n\n### 🎬 Preview & Save Video\n\n**Complete Workflow:**\n\n```\n ┌─→ video_url ──→ [Preview Video]\n │ api_key (see in UI!)\n[Generate Video] ─────────────┤\n(auto-polls) │\n └─→ video_url ──→ [Save Video from URL]\n api_key (saved to disk!)\n```\n\n**Setup:**\n\n1. **Add \"Generate Video (AI CustomURL)\" node**\n - Configure your prompt, model, etc.\n - `auto_poll: true` (default)\n\n2. **Add \"Preview Video (AI CustomURL)\" node**\n - Connect `video_url` → `video_url`\n - Connect `api_key` → `api_key`\n - Video will show in ComfyUI UI!\n\n3. **Add \"Save Video from URL\" node**\n - Connect `video_url` → `video_url`\n - Connect `api_key` → `api_key` (optional field)\n - Set `filename: my_video_{timestamp}`\n - Set `output_folder: output/videos`\n\n4. **Run the workflow!**\n - Video generates automatically\n - Preview appears in UI\n - Video saves to disk\n - All automatic! 🎉\n\n**Notes:**\n- The `api_key` connection enables authenticated downloads for OpenAI\n- The `{timestamp}` placeholder adds unique timestamps to filenames\n- `output/videos` folder will be created automatically if it doesn't exist\n\n## 🎯 Example: Using Advanced Parameters\n\n1. Add \"Text Advanced Parameters\" node\n2. Set your custom parameters:\n ```\n top_p: 0.9\n frequency_penalty: 0.5\n seed: 12345\n ```\n3. Connect `params_json` output → `advanced_params_json` input on your Text Generation node\n4. The parameters will be merged into the API call!\n\n---\n\n## 💡 Tips\n\n### Finding Model Names\n\n**OpenAI:**\n- Docs: https://platform.openai.com/docs/models\n- List: `curl https://api.openai.com/v1/models -H \"Authorization: Bearer YOUR_KEY\"`\n\n**Venice.ai:**\n- Docs: https://docs.venice.ai/\n- Dashboard: https://venice.ai/models\n\n**OpenRouter:**\n- Models: https://openrouter.ai/models\n\n**Together.ai:**\n- Models: https://docs.together.ai/docs/inference-models\n\n**Ollama:**\n- Run: `ollama list` in terminal\n\n### Using Environment Variables\n\nInstead of entering API keys in nodes, set environment variables:\n\n```bash\n# Linux/Mac - add to ~/.bashrc\nexport OPENAI_API_KEY=\"sk-...\"\nexport VENICE_API_KEY=\"...\"\n\n# Then use in node:\napi_key: ${OPENAI_API_KEY} # (if ComfyUI supports env var expansion)\n```\n\n### Testing Different APIs\n\nKeep the same workflow but just change:\n- `base_url`\n- `api_key` \n- `model`\n\nEverything else stays the same!\n\n---\n\n## ✅ That's It!\n\nNo complex setup, no model caching, no JavaScript - just **enter your API details and go**! 🚀\n\n"}}, "config.example.json": {"e0eeff8552a86343c294dcded0aafa68363cea3d": {"t": 1785674486.7859232, "n": 1434, "h": "7562a36eb2b1306a", "c": "{\n \"profiles\": {\n \"openai\": {\n \"base_url\": \"https://api.openai.com/v1\",\n \"api_key\": \"sk-YOUR_OPENAI_API_KEY_HERE\",\n \"enabled\": true,\n \"description\": \"Official OpenAI API\",\n \"default_models\": {\n \"text\": \"gpt-4o\",\n \"image\": \"dall-e-3\",\n \"video\": \"sora-1.0\",\n \"speech\": \"tts-1\"\n }\n },\n \"venice\": {\n \"base_url\": \"https://api.venice.ai/api/v1\",\n \"api_key\": \"YOUR_VENICE_API_KEY_HERE\",\n \"enabled\": true,\n \"description\": \"Venice.ai - Privacy-focused AI\",\n \"default_models\": {\n \"text\": \"llama-3.3-70b\",\n \"image\": \"flux-dev\",\n \"speech\": \"tts-kokoro\"\n }\n },\n \"openrouter\": {\n \"base_url\": \"https://openrouter.ai/api/v1\",\n \"api_key\": \"YOUR_OPENROUTER_API_KEY_HERE\",\n \"enabled\": false,\n \"description\": \"OpenRouter - Multi-provider gateway\"\n },\n \"local_ollama\": {\n \"base_url\": \"http://localhost:11434/v1\",\n \"api_key\": \"not-needed\",\n \"enabled\": false,\n \"description\": \"Local Ollama instance\"\n },\n \"together\": {\n \"base_url\": \"https://api.together.xyz/v1\",\n \"api_key\": \"YOUR_TOGETHER_API_KEY_HERE\",\n \"enabled\": false,\n \"description\": \"Together.ai\"\n }\n },\n \"settings\": {\n \"cache_models\": true,\n \"cache_duration_minutes\": 60,\n \"request_timeout_seconds\": 120,\n \"max_retries\": 3,\n \"retry_delay_seconds\": 2,\n \"debug_mode\": false\n }\n}\n\n"}}}} |