Loading...
Loading...
Deploy projects to CreateOS infrastructure via the MPP Gateway. Use when the user wants to deploy code, ship an app, or deploy to CreateOS. No auth session or OAuth required — uses HTTP 402 payment flow only.
npx skill4agent add nodeops-app/skills createos-deployimport { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
const privateKey = generatePrivateKey();
const account = privateKeyToAccount(privateKey);
// Save privateKey securelynpm install viemPOST /agent/deployX-Use-Existing-Credits: truepay_toamount_tokenpayment_chainsupported_chainsGET /agent/balance/:address?chain=..."Your walletdoesn't have enough funds to deploy. Please add {amount_usd} {token} on {chain} to address0x...."0x...Show all supported chains so the user can pick one to fund.
pay_totxHashPOST /agent/deployX-Payment-Tx: txHashGET /agent/deploy/:projectId/:deploymentId/statusX-Use-Existing-Credits: trueGET /agent/balance/0xYourWallet?chain=arbitrum{
"address": "0x...",
"chain": "arbitrum",
"balances": [
{ "token": "usdc", "symbol": "USDC", "balance": "18.000000", "decimals": 6 }
]
}GET /agent/chains{
"chains": [
{ "chain": "arbitrum", "chain_id": 42161, "tokens": ["usdc", "usdt"] },
{ "chain": "base", "chain_id": 8453, "tokens": ["usdc", "usdt"] }
]
}{wallet}:{timestamp}:{nonce}X-Wallet-Address: 0xYourWallet
X-Signature: 0xSignedMessage
X-Timestamp: 1711500000000
X-Nonce: unique-uuidGET /agent/projects{
"wallet": "0x5B6C...",
"count": 2,
"projects": [
{
"id": "uuid",
"name": "demo-1234567890",
"displayName": "Demo App",
"status": "active",
"url": "https://demo-1234567890.nodeops.network",
"createdAt": "2026-04-07T10:00:00.000Z"
}
]
}urlnullactivebuildingdeployingpendingqueuedpromotingdeletingfailedDELETE /agent/projects/{projectId}{ "projectId": "uuid", "status": "deleted" }403POST /agent/deploy
Content-Type: application/json
{
"uniqueName": "my-app",
"displayName": "My App",
"upload": { "type": "files", "files": [{ "path": "index.js", "content": "base64..." }] }
}402{
"error": "Payment required",
"amount_usd": 0.5,
"amount_token": "500000",
"current_credit_balance_usd": 0,
"active_projects": 0,
"pay_to": "0x7EA5...",
"payment_chain": "arbitrum",
"token": "usdc",
"decimals": 6,
"supported_chains": [...]
}402{
"error": "Payment required",
"warning": "You have 2 active project(s) sharing credits. Paying extends total runtime. To deploy using existing credits (will reduce other projects' runtime), retry with header X-Use-Existing-Credits: true",
"amount_usd": 0.5,
"current_credit_balance_usd": 1.20,
"active_projects": 2,
"pay_to": "0x7EA5...",
...
}import { createWalletClient, createPublicClient, http } from "viem";
import { arbitrum } from "viem/chains";
const txHash = await walletClient.writeContract({
address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on arbitrum
abi: [
{
name: "transfer",
type: "function",
stateMutability: "nonpayable",
inputs: [
{ name: "to", type: "address" },
{ name: "value", type: "uint256" },
],
outputs: [{ name: "", type: "bool" }],
},
],
functionName: "transfer",
args: [quote.pay_to, BigInt(quote.amount_token)],
});
await publicClient.waitForTransactionReceipt({ hash: txHash });POST /agent/deploy
X-Payment-Tx: 0xTransactionHash
X-Payment-Chain: arbitrum
X-Payment-Token: usdc200{ "projectId": "uuid", "deploymentId": "uuid", "status": "deploying" }GET /agent/deploy/{projectId}/{deploymentId}/status{ "status": "deploying" }{ "status": "ready", "endpoint": "https://..." }{ "status": "failed", "reason": "..." }{ "type": "files", "files": [{ "path": "...", "content": "base64" }] }{ "type": "zip", "data": "base64-zip", "filename": "code.zip" }node_modules/dist/build/.next/.env.env.*.git/.DS_Store__pycache__/venv/.venv/| Code | Meaning |
|---|---|
| 400 | Invalid body |
| 401 | Bad signature / expired / nonce reused |
| 402 | Payment required or verification failed |
| 403 | Wrong wallet on status endpoint |
| 409 | Tx hash already used |
| 429 | Rate limited (30/min) |