chaingpt
Build with the ChainGPT Web3 AI developer platform. Full API/SDK reference and project scaffolding for: Web3 AI Chatbot & LLM, AI NFT Generator, Smart Contract Generator, Smart Contract Auditor, AI Crypto News, AgenticOS Twitter agents, and Solidity LLM. Use when building blockchain apps, Web3 chatbots, NFT tools, smart contract tools, crypto news feeds, AI agents, or integrating any ChainGPT API. Triggers: chaingpt, web3 ai, nft generator, smart contract audit, crypto news api, agenticos, solidity llm, cgpt, blockchain ai, token analytics.
git clone --depth 1 https://github.com/internet-court/internet-court-skill /tmp/chaingpt && cp -r /tmp/chaingpt/vendored/chaingpt/chaingpt ~/.claude/skills/chaingptSKILL.md
# ChainGPT Developer Skill
You are an expert at building with the ChainGPT Web3 AI platform. When a developer asks you to integrate any ChainGPT product, you know the exact endpoints, SDK methods, parameters, pricing, and best practices.
## Platform Overview
ChainGPT provides AI infrastructure for Web3 via APIs, SDKs, and whitelabel SaaS. All API products share:
- **Base URL:** `https://api.chaingpt.org`
- **Auth:** `Authorization: Bearer <API_KEY>` header
- **Rate Limit:** 200 requests/minute per key
- **Credits:** 1 CGPTc = $0.01 USD (never expire). Purchase at https://app.chaingpt.org/addcredits
- **API Dashboard:** https://app.chaingpt.org/apidashboard
- **SDKs:** JavaScript/TypeScript (Node.js) + Python for all products
### Getting an API Key
1. Visit https://app.chaingpt.org — connect a crypto wallet to sign up
2. Navigate to API Keys → "Create New Secret Key"
3. Store the key securely (env var or secret manager — shown only once)
4. Ensure sufficient credits (crypto, $CGPT token, or credit card)
5. 15% bonus when paying with $CGPT or via monthly auto-top-up
## Products at a Glance
| Product | NPM Package | Model ID / Endpoint | Cost per Request |
|---------|-------------|-------------------|-----------------|
| Web3 AI Chatbot & LLM | `@chaingpt/generalchat` | `general_assistant` via `POST /chat/stream` | 0.5 credits (+0.5 w/ history) |
| AI NFT Generator | `@chaingpt/nft` | `POST /nft/generate-image` + 5 more | 1-14.25 credits (model/upscale) |
| Smart Contract Generator | `@chaingpt/smartcontractgenerator` | `smart_contract_generator` via `POST /chat/stream` | 1 credit (+1 w/ history) |
| Smart Contract Auditor | `@chaingpt/smartcontractauditor` | `smart_contract_auditor` via `POST /chat/stream` | 1 credit (+1 w/ history) |
| AI Crypto News | `@chaingpt/ainews` | `GET /news` | 1 credit per 10 records |
| AgenticOS | Open-source (GitHub) | Self-hosted | 1 credit per generated tweet |
| Solidity LLM | Open-source (HuggingFace) | Local inference | Free (self-hosted) |
Python: `pip install chaingpt` (unified package for all products)
## Quick Starts
### 1. Web3 AI Chatbot & LLM
The LLM is fine-tuned for crypto/blockchain with live on-chain data, Nansen Smart Money, token analytics, and 33+ chain support.
**JavaScript:**
```javascript
import { GeneralChat } from '@chaingpt/generalchat';
const chat = new GeneralChat({ apiKey: process.env.CHAINGPT_API_KEY });
// Buffered response
const res = await chat.createChatBlob({
question: 'What is the current ETH price and market sentiment?',
chatHistory: 'off'
});
console.log(res.data.bot);
// Streaming response
const stream = await chat.createChatStream({
question: 'Analyze the top DeFi protocols by TVL',
chatHistory: 'on',
sdkUniqueId: 'session-123'
});
stream.on('data', chunk => process.stdout.write(chunk.toString()));
```
**Python:**
```python
from chaingpt.client import ChainGPTClient
from chaingpt.models import LLMChatRequestModel
from chaingpt.types import ChatHistoryMode
async with ChainGPTClient(api_key=API_KEY) as client:
res = await client.llm.chat(LLMChatRequestModel(
question="Explain yield farming strategies",
chatHistory=ChatHistoryMode.OFF
))
print(res.data.bot)
```
**REST (single endpoint for all chat-based products):**
```bash
curl -X POST "https://api.chaingpt.org/chat/stream" \
-H "Authorization: Bearer $CHAINGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"general_assistant","question":"How do Ethereum smart contracts work?","chatHistory":"off"}'
```
> For full parameter reference (context injection, custom tones, blockchain enums, chat history retrieval), read `reference/llm-chatbot.md`.
### 2. AI NFT Generator
Generate images from text prompts, mint as NFTs across 22+ chains. Four models: VeloGen (fast), NebulaForge XL (detailed), VisionaryForge (general), Dale3 (DALL-E 3).
**JavaScript:**
```javascript
import { Nft } from '@chaingpt/nft';
const nft = new Nft({ apiKey: process.env.CHAINGPT_API_KEY });
// Generate image
const img = await nft.generateImage({
prompt: 'A cyberpunk dragon guarding a blockchain vault',
model: 'nebula_forge_xl', height: 1024, width: 1024, steps: 25, enhance: '1x'
});
// Generate + mint NFT
const gen = await nft.generateNft({
prompt: 'Cosmic whale swimming through DeFi protocols',
model: 'velogen', height: 512, width: 512, steps: 3,
walletAddress: '0xYOUR_WALLET', chainId: 56, amount: 1
});
const mint = await nft.mintNft({
collectionId: gen.data.collectionId,
name: 'Cosmic Whale #1', description: 'AI-generated NFT', symbol: 'WHALE', ids: [1]
});
```
> For all endpoints (generate-image, generate-multiple-images, queue, progress, mint, enhancePrompt, get-chains, abi), models, styles, chain IDs, and pricing, read `reference/nft-generator.md`.
### 3. Smart Contract Generator
Natural language to production Solidity. Powered by ChainGPT's Solidity LLM.
**JavaScript:**
```javascript
import { SmartContractGenerator } from '@chaingpt/smartcontractgenerator';
const gen = new SmartContractGenerator({ apiKey: process.env.CHAINGPT_API_KEY });
const res = await gen.createSmartContractBlob({
question: 'Create an ERC-20 token called "MyToken" with symbol "MTK", 1 billion supply, 2% burn on transfer, and owner-only minting',
chatHistory: 'off'
});
console.log(res.data.bot); // Full Solidity contract
```
> Full reference: `reference/smart-contract-generator.md`
### 4. Smart Contract Auditor
AI-powered vulnerability detection, scoring (0-100%), and remediation recommendations.
**JavaScript:**
```javascript
import { SmartContractAuditor } from '@chaingpt/smartcontractauditor';
const auditor = new SmartContractAuditor({ apiKey: process.env.CHAINGPT_API_KEY });
const res = await auditor.auditSmartContractBlob({
question: `Audit this contract:\n\n${contractSourceCode}`,
chatHistory: 'off'
});
console.log(res.data.bot); // Detailed audit report
```
> Full reference: `reference/smart-contract-auditor.mdEntry point for Internet Court — the trust layer for agent-to-agent commerce. Use whenever an agent needs to transact with another agent or a paid service, or a user mentions agent payments, paid APIs (HTTP 402/x402), wallet custody or trust concerns, spending mandates, delegated permissions (ERC-7710/7715), escrow, agent identity or reputation (ERC-8004), negotiation between agents (A2A), agent jobs (ERC-8183), machine payments (MPP, AP2), supervision of agent behavior, revocation, verification, or dispute resolution (GenLayer) — even if they never say "Internet Court". Routes to the vendored protocol skills and connector skills in this package.
Connect GenLayer Intelligent Contract decisions to ERC-7710-style delegated authority. Use when an agent needs to design the interface, message schema, relayer/bridge path, EVM revocation controller, constraint updates, proof/finality assumptions, and failure handling that turn a GenLayer agent-performance review into ERC-7710 revocation or policy changes.
Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.
Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.
0G Compute Network guide for decentralized AI inference, fine-tuning, and GPU services. Covers chatbots, image generation, speech-to-text, SDK integration (0g-serving-broker), processResponse API, broker.inference methods, CLI commands (0g-compute-cli), and account management. Use this skill for any 0G compute, 0G AI, or decentralized GPU question.
Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.
Use this skill when the user asks to log in or out with a wallet session, fetch a wallet sign-in challenge, verify an externally signed challenge, or troubleshoot AltLLM Portal wallet login for the local altllm CLI. Do NOT use for API key management, billing history, or payment links.
Use this skill when the user asks to inspect AltLLM Portal balance, redeem a promo code, review billing transactions, or view usage analytics by period, model, or API key using the local altllm CLI. Do NOT use for API key lifecycle management or payment-link execution.