Loading...
Loading...
Publish, discover, and buy digital artifacts on publish.new with x402 micropayments
npx skill4agent add publish-new/cli publish-newpublishnpm install -g @publish-new/clinpx @publish-new/cli listpublish new --price=1.50 --author=0xYOUR_WALLET --content="# My Article" --title="My Article" --json
publish new --price=5.00 --author=0xYOUR_WALLET --file=./report.pdf --title="Premium Report" --json
echo "# Hello" | publish new --price=0.50 --author=0xYOUR_WALLET --content=- --json--dry-runpublish new --price=1 --author=0xWALLET --content="# Test" --title="Test" --dry-run --json--forcepublish new --price=1 --author=0xWALLET --content="# Test" --title="Test" --force --jsonpublish list --json
publish list --search="machine learning" --limit=10 --jsonpublish get my-article-a1b2c3d4 --jsonpublish price my-article-a1b2c3d4 --jsonexport PRIVATE_KEY=0xYOUR_PRIVATE_KEY
publish buy my-article-a1b2c3d4 --chain=base --json
publish buy my-article-a1b2c3d4 --chain=base --output=./downloaded.pdf--dry-runpublish buy my-article-a1b2c3d4 --dry-run --jsonpublish newpublish buy| Flag | Description |
|---|---|
| Machine-readable JSON output |
| Suppress human-friendly messages |
| Override API base URL (default: https://publish.new) |
https://publish.newmultipart/form-data| Field | Required | Description |
|---|---|---|
| yes | USDC price (e.g. |
| yes | Ethereum address to receive payments ( |
| one of content/file | Markdown text |
| one of content/file | File upload (max 100MB) |
| no | Artifact title (used to generate URL slug) |
| no | Short description |
curl -X POST https://publish.new/api/artifact \
-F 'title=My Article' \
-F 'description=A short summary' \
-F 'content=# Hello World\n\nThis is my article.' \
-F 'price=1.50' \
-F 'walletAddress=0xYOUR_WALLET_ADDRESS'curl -X POST https://publish.new/api/artifact \
-F 'title=Premium Report' \
-F 'file=@./report.pdf' \
-F 'price=5.00' \
-F 'walletAddress=0xYOUR_WALLET_ADDRESS'{
"id": "uuid",
"slug": "my-article-a1b2c3d4",
"title": "My Article",
"description": "A short summary",
"content_type": "markdown",
"price": "1.500000",
"wallet_address": "0x...",
"attachment_id": null,
"created_at": "2026-03-25T00:00:00.000Z",
"updated_at": "2026-03-25T00:00:00.000Z",
"published_at": "2026-03-25T00:00:00.000Z"
}https://publish.new/<slug>| Param | Default | Description |
|---|---|---|
| 1 | Page number |
| 20 | Results per page (max 100) |
| — | Search title and description |
curl 'https://publish.new/api/artifact?limit=10&search=machine+learning'{
"artifacts": [
{
"id": "uuid",
"slug": "my-article-a1b2c3d4",
"title": "My Article",
"description": "A short summary",
"content_type": "markdown",
"price": "1.500000",
"wallet_address": "0x...",
"attachment_id": null,
"published_at": "2026-03-25T00:00:00.000Z",
"created_at": "2026-03-25T00:00:00.000Z",
"updated_at": "2026-03-25T00:00:00.000Z"
}
],
"page": 1,
"limit": 10
}curl https://publish.new/api/artifact/my-article-a1b2c3d4{
"id": "uuid",
"slug": "my-article-a1b2c3d4",
"title": "My Article",
"description": "A short summary",
"content_type": "markdown",
"price": "1.500000",
"wallet_address": "0x...",
"attachment_id": null,
"attachment": null,
"published_at": "2026-03-25T00:00:00.000Z",
"created_at": "2026-03-25T00:00:00.000Z",
"updated_at": "2026-03-25T00:00:00.000Z"
}curl https://publish.new/api/artifact/my-article-a1b2c3d4/price{
"price": 1.5
}402 Payment Requiredcurl https://publish.new/api/artifact/my-article-a1b2c3d4/content?chain=base| Param | Default | Description |
|---|---|---|
| base | |
| USDC | ERC-20 contract address |
Content-Type: text/markdownContent-Disposition: attachment; filename="original-name.pdf"{
"error": "Description of what went wrong"
}| Status | Meaning |
|---|---|
| 400 | Invalid input (missing fields, bad format) |
| 402 | Payment required (content endpoint) |
| 404 | Artifact not found |
| 500 | Server error |
walletAddress0xpriceslug[a-z0-9-]+| Chain | Currency | Contract address |
|---|---|---|
| tempo | USDC | |
| base | USDC | |
| base | DAI | |
| mainnet | USDC | |
| mainnet | DAI | |
| mainnet | USDT | |
publish new \
--price=2.00 \
--author=0xAGENT_WALLET \
--file=./analysis.pdf \
--title="Q1 Market Analysis" \
--description="Comprehensive Q1 2026 market analysis" \
--jsoncurl -X POST https://publish.new/api/artifact \
-F 'title=Q1 Market Analysis' \
-F 'description=Comprehensive Q1 2026 market analysis' \
-F 'file=@./analysis.pdf' \
-F 'price=2.00' \
-F 'walletAddress=0xAGENT_WALLET'RESULTS=$(publish list --search="dataset" --limit=5 --json)
SLUG=$(echo "$RESULTS" | jq -r '.artifacts[0].slug')
publish price "$SLUG" --json
export PRIVATE_KEY=0xAGENT_KEY
publish buy "$SLUG" --chain=base --output=./dataset.csv# Search for artifacts
curl -s 'https://publish.new/api/artifact?search=dataset&limit=5' | jq '.artifacts[0].slug'
# Check price
curl -s https://publish.new/api/artifact/SLUG/price | jq '.price'
# Buy requires an x402-compatible client (mppx) for automatic paymentcurl -X POST https://publish.new/api/artifact \
-F 'title=Daily Market Brief' \
-F 'content=# Market Brief\n\nToday the market moved significantly...' \
-F 'price=0.50' \
-F 'walletAddress=0xAGENT_WALLET'# Check if artifact already exists
EXISTING=$(curl -s 'https://publish.new/api/artifact?search=My+Title&limit=5')
# Parse results and check for matching title + price + wallet_address
# If found, use the existing slug instead of creating a duplicate# Probe content endpoint without payment
STATUS=$(curl -s -o /dev/null -w '%{http_code}' https://publish.new/api/artifact/SLUG/content)
# If 200, content is already unlocked — no payment needed
# If 402, proceed with x402 payment