API Doc-CometAPI
English
  • English
  • Русский
HomeDashBoardModel Marketplace
HomeDashBoardModel Marketplace
Discord_Support
English
  • English
  • Русский
  1. 🧩 Integration Guides
  • How to Use CometAPI?
  • 🚀 Overview
    • Quick Start
    • Important Guidelines
    • Release Notes
    • Quickly request CometAPI via ApiDog
    • Models
  • 💬 Text Models
    • Chat
    • Responses
    • Anthropic Messages
    • Gemini Generating Content
    • Embeddings
  • 🖼️ Image Models
    • OpenAI
      • gpt-4o-image generates image
      • Images
      • Image Editing (gpt-image-1)
    • Gemini
      • Guide to calling gemini-3-pro-image (Nano Banana)
      • Gemini generates image
    • Midjourney
      • Midjourney Quick Start: Complete Image Generation Workflow in One Go
      • Task Fetching API
        • List by Condition
        • Fetch Single Task (most recommended)
      • Imagine
      • Submit Video
      • Submit Editor
      • Action (UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      • Blend (image -> image)
      • Describe (image -> text)
      • Modal (Area Redesign & Zoom)
    • Replicate(image)
      • Create Predictions - General
      • replicate query
    • seededit/seedream
      • bytedance-Image Editing (seededit)
      • bytedance-image-generation(seedream)
    • bria
      • Generate Image
      • Generate Vector Graphics - Base (Beta)
      • Image Editing
      • Query Status
    • Flux(images)
      • flux generate image
      • flux query
    • Hunyuan3D
  • 📺 Video Models
    • sora-2
      • official
        • Create video
        • Remix video
        • Retrieve video
        • Retrieve video content
      • self-developed
        • Create video
        • Retrieve video
    • veo3
      • veo3-chat format
      • Submit video generation task
      • Query video generation status
    • kling (video)
      • callback_url
      • Multimodal Video Editing
        • Initialize Video for Editing
        • Add Video Selection
        • Delete Video Selection
        • Clear Video Selection
        • Preview Selected Video Area
        • Create Task
      • Text to Video
      • Image to Video
      • Multi-Image To Video
      • Video Extension
      • Avatar
      • Lip-Sync
      • Video Effects
      • Text to Audio
      • Video to Audio
      • TTS
      • Image Generation
      • Multi-Image to Image
      • Image Expansion
      • Image Recognize
      • Virtual Try-On
      • [Counterpart] Creating Tasks
      • lip sync
      • Individual queries
    • runway(video)
      • official format
        • runway images raw video
        • Generate a video from a video
        • Generate an image from text
        • Upscale a video
        • Control a character
        • runway to get task details
      • Reverse Format
        • generate(text)
        • generate(Reference images)
        • Video to Video Style Redraw
        • Act-one Expression Migration
        • feed-get task
    • bytedance
      • bytedance-video
      • bytedance-video get
    • MiniMax Conch(video)
      • MiniMax Conch Official Documentation
      • MiniMax Conch Generation
      • MiniMax Conch Query
      • MiniMax Conch Download
  • 🎵 Music Models
    • Suno
      • Setting suno Version
      • Suno API Scenario Application Guide
      • Generate lyrics
      • Generate music clip
      • Upload clip
      • Submit concatenation
      • Full Track Audio Separation
      • Single Track Audio Separation
      • Create New Persona
      • add style tags
      • Single task query
      • Generate mp4 mv video
      • Timing: lyrics, audio timeline
      • Get wav format file
      • Get midi
      • Batch query tasks
  • 🔊 Audio Models
    • Realtime
    • Create speech
    • Create transcription
    • Create translation
  • 🧩 Integration Guides
    • LiteLLM
    • Dify
    • Make
    • n8n
    • Lobe-Chat
    • COZE
    • Zapier
    • Activepieces
    • LlamaIndex
    • Continue
    • FlowiseAI
    • Chatbox
    • CherryStudio
    • AnythingLLM
    • LangChain
    • BuildShip
    • gptme
    • Immersive Translation
    • Cline
    • Eudic Translation
    • ChatHub
    • OpenAI Translator
    • ChatAll Translation
    • Pot Translation
    • Zotero
    • NEXT CHAT (ChatGPT Next Web)
    • Obsidian's Text Generator Plugin
    • librechat
    • utools-ChatGPT Friend
    • avante.nvim
    • Open WebUI
    • GPT Academic Optimization (gpt_academic)
    • OpenManus
    • IntelliJ Translation Plugin
    • FastGPT
    • n8n Local Deployment
  • ⚠️ Errors
    • Error Codes & Handling
  • 📝 Code Examples
    • Text-to-Image Generation
    • Image-to-image generation URL upload
    • Regular Post Text Conversation
    • OpenAI Official Library Usage Example
    • Streamed Output
    • Json Fixed Format Output Code Display
    • Embedding code example
    • o1-preview Model Code Example
    • LangChain Usage Example (Successful Test Date: 2024-11-25)
    • Openai dall-e-3 & flux series drawing model
    • gpt, claude, gemini multimodal network image parsing example
    • Multimodal PDF File Parsing Examples for GPT, Claude, and Gemini
    • Code example
  • 🏄🏼‍♀️ Best Practices
    • Midjourney Best Practices
    • Retry Logic Documentation for CometAPI and OpenAI Official API
    • Runway Best Practices
    • Claude Code Installation and Usage Guide
    • Gemini CLI Installation and Usage Guide
    • Codex Usage Guide
    • CometAPI Account Balance Query API Usage Instructions
  • 💳 Pricing & Billing
    • About Pricing
  • 🤝🏼 Support
    • Help Center
    • Interface Stability
    • Privacy policy
    • Terms of service
    • Common Misconceptions
    • Confusion about use
  1. 🧩 Integration Guides

n8n Local Deployment

Applicability and prerequisites
OS: Linux (Ubuntu/Debian/CentOS, etc.) or macOS
Suggested resources: 2 GB+ RAM, 10 GB+ free disk space
Shell access and the ability to reach the public npm registry
Local-only deployment
n8n 1.x requires Node.js 18.x or 20.x (LTS recommended)

Preparation
• Log in to cometapi. Click "ADD API key" in the API keys to get your token key: sk-xxxxx;
image.png
image.png
image.png

Configuration#

1.Install Node.js (recommended: nvm)#

If you see “n8n: command not found” later, restart the terminal or ensure the nvm-managed npm global bin path is on your PATH.

2. Install and start n8n (local)#

Start in the foreground:
Default URL: http://localhost:5678/
If the port is in use:
Optional: keep it running in the background (still local):
img_v3_02pg_4ee26a34-6f3f-42e3-8488-16620a6915eg.jpg
img_v3_02pg_4bc9813b-0c8f-4c3a-86f2-e2593880b03g.jpg

3. First access and sign in#

Open http://localhost:5678/ in your browser.
On first run, follow the wizard to create the Owner account (email + password) and sign in.
img_v3_02pg_aedb2f02-74fa-4c4e-86b5-918dd369936g.jpg

4. Install the CometAPI community node#

Go to Settings (bottom-left) > Community nodes
Click “Install a community node”
In “npm Package Name”, enter: @cometapi-dev/n8n-nodes-cometapi
Check the risk acknowledgment box
Click “Install”
After installation, you can search for “CometAPI” in the node panel.
img_v3_02pg_6aa918d4-a970-4a17-b359-1897b5fdaceg.jpg
img_v3_02pg_26c9d839-fe84-41f5-b069-b9e27f4c657g.jpg
If you don’t see the community nodes section:
Make sure you are logged in as the Owner
Check Settings > Security to ensure community node installation is allowed

5. Create a workflow and configure the API#

API Configuration
Click “+ New” at the top to create a new workflow.
Click the “+” on the right side of the canvas and search for “CometAPI” to add the node.
You can also search “CometAPI” from the left node list and drag it onto the canvas.
img_v3_02ph_850e35de-7a29-42e2-b981-959ecf6c1cag.jpg
img_v3_02ph_00ee7d25-441f-4e96-80dd-fdda7db4557g.jpg
Full steps
1.
Add a trigger node: search for “Manual Trigger” or “When clicking ‘Execute workflow’”.
2.
Add the “CometAPI” node and connect the trigger to it.
3.
Configure credentials (first time only):
In the CometAPI node, under “Credential to connect with”, choose “Create new”.
Paste the token you created in the CometAPI console into “CometAPI Key”.
Save. The Base URL defaults to https://api.cometapi.com and typically needs no change.
img_v3_02ph_508234ee-0c46-4517-a95c-6efdac3f941g.jpg
4.
Configure model and messages:
Model: enter a supported model, e.g., gpt-4o or gpt-4o-mini.
Messages:
Role: User, Content: e.g., “Hello”
Optional Role: System, Content: e.g., “You are a useful assistant”
Optional parameters (as needed):
Maximum Number of Tokens (e.g., 4096)
Sampling Temperature (e.g., 0.7)
Top P, Presence/Frequency Penalty
Stream (enable/disable streaming)
5.
Test execution:
Select the CometAPI node and click “Execute step”, or click “Execute workflow” at the bottom.
The OUTPUT panel on the right should show a JSON response (including choices, usage, etc.).
img_v3_02ph_c9254337-93e7-479d-b434-8c77624b144g.jpg

6. Troubleshooting#

node-gyp/native build errors
Install build tools (build-essential/make/g++/python3) as shown in step 1.
npm global permission errors (EACCES)
Use nvm for a user-level Node.js install (no sudo needed).
Port conflicts (cannot open http://localhost:5678/)
Set a different port via N8N_PORT before starting.
Community nodes section or install button not available
Log in as Owner; check Settings > Security for community node settings.
Corporate network/proxy causes npm install failures
Configure a proxy if needed: npm config set proxy http://user:pass@host:port
CometAPI request returns 401/403
Verify your API Key and model access permissions.
Empty responses or token limits
Increase Maximum Number of Tokens; adjust Temperature/Top P as needed.
n8n stops after closing the terminal
Use pm2 to run n8n in the background (still local).

You have now installed n8n locally on Linux via npm, installed and configured the CometAPI community node, and can run workflows that call models such as gpt-4o to receive responses.
Modified at 2025-08-26 04:52:16
Previous
FastGPT
Next
Error Codes & Handling
Built with