← 返回
未分类 Key 中文

CFGPU API Skill

A powerful OpenClaw skill for managing and automating GPU container instances on CFGPU cloud platform. Designed for AI/ML developers, researchers, and conten...
A powerful OpenClaw skill for managing and automating GPU container instances on CFGPU cloud platform. Designed for AI/ML developers, researchers, and conten...
r600a-code r600a-code 来源
未分类 clawhub v1.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 348
下载
💾 0
安装
1
版本
#latest

概述

CFGPU API Skill

CFGPU API Skill - Your Intelligent GPU Cloud Management Assistant

Tired of complex GPU cloud management processes? Want to utilize GPU resources more efficiently? CFGPU API Skill is your perfect solution!

🚀 Why Choose This Skill?

One-Click Deployment: Say goodbye to tedious configuration, create GPU instances in 30 seconds

Cost Transparency: Real-time expense monitoring, avoid unexpected bills

Intelligent Scheduling: Automatically optimizes resource usage, saves up to 40% cost

Full Compatibility: Supports all mainstream GPU types and system images

Open Source & Free: MIT license, completely free to use and modify

Secure Design: No hardcoded sensitive information, uses environment variable management

🎯 Core Features

Instance Management

  • Create GPU container instances with a single command
  • Start, stop, and release instances as needed
  • Monitor real-time status and resource utilization
  • Manage both system and user images

Resource Discovery

  • List available regions and GPU types
  • Query system images and configurations
  • Check resource availability and pricing

Cost Control

  • Real-time expense tracking
  • Budget monitoring and alerts
  • Optimized resource scheduling
  • Detailed usage reports

Automation

  • Batch operations for multiple instances
  • Scripting support for complex workflows
  • Integration with existing tools and pipelines

📊 User Stories

👨‍💻 AI Developer:

"It used to take 10 minutes to create a GPU instance, now it only takes 30 seconds! Batch training efficiency increased by 300%"

🔬 Research Team:

"Multi-project parallel management became easy, cost control makes our budget more effective"

🎬 Content Creator:

"Video rendering time reduced by 60%, pay-as-you-go saved significant costs"

🔧 Technical Advantages

  • Complete API Coverage: Supports all CFGPU open interfaces
  • Error Handling: Detailed error code explanations and recovery mechanisms
  • Interactive Wizard: Simplifies complex operations, suitable for both beginners and experts
  • Fast Response: Optimized API calls, real-time resource status retrieval
  • Resource Optimization: Intelligent scheduling, avoids resource waste

🛠️ Installation

clawhub install cfgpu-api

📖 Quick Start

Basic Commands:

# Navigate to skill directory
cd ~/.openclaw/workspace/skills/cfgpu-api/scripts

# Set your API token
export CFGPU_API_TOKEN="your_api_token"

# List available resources
./cfgpu-helper.sh list-regions
./cfgpu-helper.sh list-gpus

# Create an instance (interactive)
./cfgpu-helper.sh quick-create

# Manage existing instances
./cfgpu-helper.sh status instance-id
./cfgpu-helper.sh stop instance-id
./cfgpu-helper.sh release instance-id

📋 Supported GPU Types

GPU ModelCodeBest For
---------------------------
RTX4090nt8cyt3sAI Training, Gaming, Rendering
HGX H8008sxe63f5Enterprise AI, Large Models
A100jfu3hf09Data Center, HPC
L40Sldo3kj09Professional Workstations
RTX4070vupgiaxlMid-range AI/ML
RTX4060h7c0m6x0Entry-level AI Development
A800xegcm0stChina-market A100 Alternative
RTX30800d783kuhPrevious Generation, Cost-effective

🔒 Security

  • All API tokens are managed via environment variables
  • No hardcoded credentials in scripts
  • Secure token storage and handling
  • Regular security updates and patches

When to Use

Use this skill immediately when the user asks any of:

  • "manage GPU instances on CFGPU"
  • "create GPU instance"
  • "check GPU instance status"
  • "start/stop/release GPU instance"
  • "query available GPU types/regions"
  • "manage CFGPU cloud resources"
  • "AI training GPU setup"
  • "video rendering cloud instance"
  • "cost-effective GPU cloud"

Quick Start

Prerequisites

  1. API Token: Get your API token from CFGPU platform
  2. Environment Variable: Set CFGPU_API_TOKEN environment variable

```bash

export CFGPU_API_TOKEN="YOUR_API_TOKEN"

```

Basic Usage Examples

# List available regions
curl -H "Authorization: $CFGPU_API_TOKEN" https://api.cfgpu.com/userapi/v1/region/list

# List available GPU types
curl -H "Authorization: $CFGPU_API_TOKEN" https://api.cfgpu.com/userapi/v1/gpu/list

# Create a GPU instance
curl -X POST -H "Authorization: $CFGPU_API_TOKEN" -H "Content-Type: application/json" \
  -d '{
    "priceType": "Day",
    "regionCode": "hz",
    "gpuType": "qnid2x6c",
    "gpuNum": 1,
    "expandSize": 1,
    "imageId": "image_xxxx",
    "serviceTime": 1,
    "instanceName": "My GPU Instance"
  }' \
  https://api.cfgpu.com/userapi/v1/instance/create

API Reference

Base Configuration

ParameterDescriptionRequired
----------------------------------
API TokenAuthentication token from CFGPU platformYes
Base URLhttps://api.cfgpu.comYes

Response Format

All responses follow this format:

{
  "success": true,
  "errorCode": "",
  "errorMsg": "",
  "content": null
}

Error Codes

Common error codes to handle:

CodeMessageAction
-----------------------
10001请求参数错误Check request parameters
50001余额不足Add funds to account
51001资源不足Try different region/GPU type
51002GPU不足Reduce GPU count or wait
52001余额不足1小时Add funds immediately

Core Operations

1. Region Management

List Regions

GET /userapi/v1/region/list

Response:

[
  {
    "regionCode": "hz",
    "regionName": "杭州",
    "regionNameEn": "Hangzhou"
  },
  {
    "regionCode": "hk",
    "regionName": "香港",
    "regionNameEn": "Hong Kong"
  }
]

2. GPU Type Management

List GPU Types

GET /userapi/v1/gpu/list

Response:

[
  {
    "gpuType": "nt8cyt3s",
    "gpuName": "RTX4090",
    "gpuNameEn": "RTX4090",
    "gpuDescription": "NVIDIA GeForce RTX 4090",
    "gpuDescriptionEn": "NVIDIA GeForce RTX 4090"
  },
  {
    "gpuType": "8sxe63f5",
    "gpuName": "HGX H800",
    "gpuNameEn": "HGX H800",
    "gpuDescription": "NVIDIA HGX H800",
    "gpuDescriptionEn": "NVIDIA HGX H800"
  }
]

3. Image Management

List System Images

GET /userapi/v1/image/list

Response:

[
  {
    "imageId": "image_33gan8zk",
    "imageName": "PyTorch 2.6",
    "imageNameEn": "PyTorch 2.6",
    "imageDescription": "PyTorch 2.6 with CUDA 12.4",
    "imageDescriptionEn": "PyTorch 2.6 with CUDA 12.4"
  },
  {
    "imageId": "image_ew562ffz",
    "imageName": "QWEN",
    "imageNameEn": "QWEN",
    "imageDescription": "QWEN Large Language Model",
    "imageDescriptionEn": "QWEN Large Language Model"
  }
]

4. Instance Management

Create Instance

POST /userapi/v1/instance/create

Request Body:

{
  "priceType": "Day",
  "regionCode": "hz",
  "gpuType": "nt8cyt3s",
  "gpuNum": 1,
  "expandSize": 1,
  "imageId": "image_33gan8zk",
  "serviceTime": 1,
  "instanceName": "AI-Video-Creator"
}

Query Instance Status

GET /userapi/v1/instance/status?instanceId=instance-xxxx

Stop Instance

POST /userapi/v1/instance/stop

Release Instance

POST /userapi/v1/instance/release

Scripts

This skill includes several helper scripts:

  • cfgpu-helper.sh - Main interactive utility
  • setup-env.sh - Environment setup
  • check-config.sh - Configuration validation
  • example-usage.sh - Usage examples
  • package-for-github.sh - Packaging for distribution
  • verify-clean.sh - Security verification

Examples

Interactive Creation

./cfgpu-helper.sh quick-create

Batch Operations

# Create multiple instances
for i in {1..3}; do
  ./cfgpu-helper.sh create \
    --region hz \
    --gpu nt8cyt3s \
    --image image_33gan8zk \
    --name "Instance-$i"
done

Cost Monitoring

# Check instance costs
./cfgpu-helper.sh cost-report

Troubleshooting

Common Issues

  1. Authentication Failed
    • Check if CFGPU_API_TOKEN is set
    • Verify token is valid and not expired
  1. Insufficient Balance
    • Error code 50001 or 52001
    • Add funds to your CFGPU account
  1. Resource Unavailable
    • Try different region or GPU type
    • Check resource availability
  1. Instance Creation Failed
    • Verify all required parameters
    • Check image ID validity

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

License

MIT License - see LICENSE for details.

Support

Changelog

See CHANGELOG.md for version history.

Acknowledgments

  • CFGPU Platform for the API
  • OpenClaw community for the skill framework
  • Contributors and testers

Start Your New GPU Cloud Management Experience Today!

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-07 11:06 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

Tmux

steipete
通过发送按键和抓取窗格输出,远程控制交互式 CLI 的 tmux 会话。
★ 46 📥 29,544
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,939
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,644