API Doc-CometAPI
HomeDashBoardModel Marketplace
HomeDashBoardModel Marketplace
Discord_Support
  1. 🧩 Integration Guides
  • How to Use CometAPI?
  • šŸš€ Overview
    • Quick Start
    • Important Guidelines
    • Release Notes
    • Quickly request CometAPI via ApiDog
    • Models
  • šŸ’¬ Text Models
    • Chat Completions
    • 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 API Quick Start
      • 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-generation(seedream)
      • bytedance-Image Editing (seededit)
    • 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
      • self-developed
        • Veo3 Async Generation
        • Veo3 Retrive
    • 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
      • TTS
      • Avatar
      • Lip-Sync
      • [Counterpart] Creating Tasks
      • Video Effects
      • Text to Audio
      • Video to Audio
      • Image Generation
      • Multi-Image to Image
      • Image Expansion
      • Image Recognize
      • Virtual Try-On
      • Individual queries
      • Omni Video
      • Omni Query
    • 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
    • openai-format
  • šŸ”Š Audio Models
    • Realtime
    • Create speech
    • Create transcription
    • Create translation
  • 🧩 Integration Guides
    • OpenClaw
    • CodeX
    • 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
    • Retry Logic Documentation for CometAPI and OpenAI Official API
    • Runway Best Practices
    • Gemini CLI Installation and Usage Guide
    • Codex Usage Guide
    • CometAPI Account Balance Query API Usage Instructions
    • Midjourney Best Practices
    • Claude Code Installation and Usage Guide
  • šŸ’³ Pricing & Billing
    • About Pricing
  • šŸ¤šŸ¼ Support
    • Help Center
    • Interface Stability
    • Privacy policy
    • Terms of service
    • Common Misconceptions
    • Confusion about use
HomeDashBoardModel Marketplace
HomeDashBoardModel Marketplace
Discord_Support
  1. 🧩 Integration Guides

OpenClaw

Configure OpenClaw with CometAPI#

Use CometAPI as the model provider for OpenClaw — 500+ models in one API, up to 20% off.

Prerequisites#

Node.js >= 22 (recommend installing via nvm)
CometAPI API Key
image.png
image.png

1. Install OpenClaw#

2. Configure Providers#

CometAPI supports three API formats. Add one or more to ~/.openclaw/openclaw.json:
ProviderAPI FormatBase URL
cometapi-openaiopenai-completionshttps://api.cometapi.com/v1
cometapi-claudeanthropic-messageshttps://api.cometapi.com
cometapi-googlegoogle-generative-aihttps://api.cometapi.com/v1beta
{
  "models": {
    "mode": "merge",
    "providers": {
      "cometapi-openai": {
        "baseUrl": "https://api.cometapi.com/v1",
        "apiKey": "<YOUR_COMETAPI_KEY>",
        "api": "openai-completions",
        "models": [{ "id": "gpt-5.2", "name": "GPT-5.2" }]
      },
      "cometapi-claude": {
        "baseUrl": "https://api.cometapi.com",
        "apiKey": "<YOUR_COMETAPI_KEY>",
        "api": "anthropic-messages",
        "models": [{ "id": "claude-opus-4-6", "name": "Claude Opus 4.6" }]
      },
      "cometapi-google": {
        "baseUrl": "https://api.cometapi.com/v1beta",
        "apiKey": "<YOUR_COMETAPI_KEY>",
        "api": "google-generative-ai",
        "models": [{ "id": "gemini-3-pro-preview", "name": "Gemini 3 Pro" }]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "cometapi-claude/claude-opus-4-6" }
    }
  },
  "auth": {
    "profiles": {
      "cometapi-openai:default": { "provider": "cometapi-openai", "mode": "api_key" },
      "cometapi-claude:default": { "provider": "cometapi-claude", "mode": "api_key" },
      "cometapi-google:default": { "provider": "cometapi-google", "mode": "api_key" }
    }
  }
}
Replace <YOUR_COMETAPI_KEY> with your API Key. All three providers use the same key.
You can add any model from the CometAPI Models Page to the corresponding provider.

3. Configure Auth Profiles#

āš ļø Required! OpenClaw reads API keys from this file, not from openclaw.json. Skipping this causes HTTP 401 errors.
Create ~/.openclaw/agents/main/agent/auth-profiles.json:
{
  "version": 1,
  "profiles": {
    "cometapi-openai:default": {
      "type": "api_key",
      "provider": "cometapi-openai",
      "key": "<YOUR_COMETAPI_KEY>"
    },
    "cometapi-claude:default": {
      "type": "api_key",
      "provider": "cometapi-claude",
      "key": "<YOUR_COMETAPI_KEY>"
    },
    "cometapi-google:default": {
      "type": "api_key",
      "provider": "cometapi-google",
      "key": "<YOUR_COMETAPI_KEY>"
    }
  },
  "lastGood": {
    "cometapi-openai": "cometapi-openai:default",
    "cometapi-claude": "cometapi-claude:default",
    "cometapi-google": "cometapi-google:default"
  }
}
Restart the gateway:

4. Verify#

All models should show Auth = yes:
Model                                        Auth
cometapi-openai/gpt-5.2                      yes
cometapi-claude/claude-opus-4-6              yes
cometapi-google/gemini-3-pro-preview         yes
image.png

5. Switch Models#

Modified atĀ 2026-02-10 03:24:17
Previous
Create translation
Next
CodeX
Built with