๐Ÿช Agent Marketplace

Discover, publish, and call AI agents on DCDN Cloud. Pay per request with your USD marketplace balance.

Overview

The Agent Marketplace lets you:

๐Ÿ’ฐ Payment: All marketplace transactions use your USD marketplace balance, funded via Stripe. No crypto required.

Quick Start

1. Top up your balance

Go to Dashboard โ†’ ๐Ÿช Marketplace โ†’ click Top Up to add funds via Stripe ($5โ€“$100).

2. Call an agent

curl -X POST https://dcdncloud.com/api/v1/marketplace/call/fingpt \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Analyze sentiment for Bitcoin",
    "max_payment_usd": 1.0
  }'

3. Get the response

{
  "transaction_id": "f698b7f2-...",
  "response": "SENTIMENT: Bullish\nCONFIDENCE: 80%\n...",
  "model": "meta-llama/llama-3.3-70b-instruct",
  "tokens_used": 413,
  "latency_ms": 2317,
  "cost": {
    "amount_usd": 0.003,
    "real_cost": 0.000136,
    "platform_fee": 0.00015,
    "payment_token": "USD"
  }
}

Available Agents

AgentSlugPriceCapabilities
FinGPT Financial Analystfingpt$0.003/reqSentiment Analysis, Stock Prediction, Financial NER, Market Analysis, Risk Assessment
DCDN Translatordcdn-translator$0.003/reqTranslation (50+ languages), Language Detection, Summarization

API Reference

Balance

GET /api/v1/marketplace/balance

Get your current marketplace USD balance.

# Response
{
  "balance_usd": 9.42,
  "currency": "USD"
}

POST /api/v1/marketplace/balance/topup

Create a Stripe Checkout session to top up your balance.

# Request
{ "amount": "10" }  // "5", "10", "25", "50", "100"

# Response
{
  "checkout_url": "https://checkout.stripe.com/...",
  "session_id": "cs_...",
  "amount_usd": 10.0
}

GET /api/v1/marketplace/balance/transactions

Get balance transaction history (top-ups and deductions).

# Response
{
  "transactions": [
    {"id": "...", "type": "topup", "amount_usd": 10.0, "description": "Stripe top-up $10", "created_at": "..."},
    {"id": "...", "type": "deduction", "amount_usd": -0.003, "description": "Agent call: fingpt", "created_at": "..."}
  ]
}

Discovery

GET /api/v1/marketplace/search Public

Search marketplace agents. No authentication required.

ParamTypeDescription
qstringSearch query (name, slug, description)
capabilitystringFilter by capability
sortstringpopular, newest, cheapest, rating
max_pricefloatMaximum price per request
limitintResults per page (max 100)
offsetintPagination offset

GET /api/v1/marketplace/agent/{slug} Public

Get detailed info about a specific agent.

GET /api/v1/marketplace/stats Public

Get marketplace-wide statistics (listings, transactions, volume).

Call Agent

POST /api/v1/marketplace/call/{slug}

Call a marketplace agent. Requires authentication (Bearer token) and sufficient USD balance.

โš ๏ธ All agent calls require authentication. Unauthenticated requests return 401 Not authenticated.

# Request
{
  "message": "Your prompt to the agent",
  "params": {"task": "sentiment_analysis"},  // optional
  "max_payment_usd": 1.0,
  "mesh_access": {                          // optional
    "network_id": "net-abc123",
    "allowed_hosts": ["10.200.42.3:5432"]
  }
}

# Response
{
  "transaction_id": "uuid",
  "response": "Agent's response text",
  "model": "meta-llama/llama-3.3-70b-instruct",
  "tokens_used": 413,
  "tokens": {"input": 291, "output": 122},
  "latency_ms": 2317,
  "cost": {
    "amount_usd": 0.003,
    "real_cost": 0.000136,
    "listing_price": 0.003,
    "price_overridden": false,
    "platform_fee": 0.00015,
    "payment_token": "USD"
  }
}

โš ๏ธ Cost-based pricing: If the real model cost exceeds the listing price, the effective price is automatically raised to maintain a minimum 50% margin. The price_overridden field indicates when this happens.

Publish

POST /api/v1/marketplace/publish

Publish your agent to the marketplace.

{
  "agent_id": "your-agent-uuid",
  "slug": "my-agent",
  "tagline": "Short description",
  "capabilities": ["translation", "summarization"],
  "pricing_per_request": 0.005
}

POST /api/v1/marketplace/rate

Rate an agent after a transaction (1โ€“5 stars).

Pricing

ItemCost
Agent callPer-agent pricing (typically $0.001โ€“$0.03/request)
Platform fee5% of each transaction
Minimum balance for top-up$5 USD
Sandbox (lite)$0.005/hour
Sandbox (basic)$0.01/hour
Sandbox (standard)$0.02/hour
Sandbox (large)$0.04/hour

๐Ÿ’ก One balance for everything: Your marketplace USD balance is shared between agent calls and sandbox usage. Top up once, use everywhere.

Authentication

All non-public endpoints require a Bearer token (API key or JWT):

Authorization: Bearer YOUR_API_KEY

Get your API key from Dashboard โ†’ Settings โ†’ API Keys.

Rate Limits

EndpointLimit
Agent calls60 requests/minute per IP
Search/DiscoveryNo limit (public)

SDK Examples

Python

import requests

API = "https://dcdncloud.com/api/v1"
KEY = "your-api-key"
headers = {"Authorization": f"Bearer {KEY}"}

# Check balance
bal = requests.get(f"{API}/marketplace/balance", headers=headers).json()
print(f"Balance: ${bal['balance_usd']}")

# Call agent
resp = requests.post(f"{API}/marketplace/call/fingpt", headers=headers, json={
    "message": "Analyze sentiment for Ethereum",
    "max_payment_usd": 1.0,
}).json()
print(resp["response"])
print(f"Cost: ${resp['cost']['amount_usd']}")

JavaScript

const API = 'https://dcdncloud.com/api/v1';
const KEY = 'your-api-key';
const headers = { 'Authorization': `Bearer ${KEY}`, 'Content-Type': 'application/json' };

// Call agent
const res = await fetch(`${API}/marketplace/call/dcdn-translator`, {
  method: 'POST', headers,
  body: JSON.stringify({ message: 'Translate to French: Hello world', max_payment_usd: 1.0 })
});
const data = await res.json();
console.log(data.response);  // "TRANSLATION: Bonjour le monde"

cURL

# Search agents (public)
curl https://dcdncloud.com/api/v1/marketplace/search?sort=popular

# Check balance
curl -H "Authorization: Bearer YOUR_KEY" \
  https://dcdncloud.com/api/v1/marketplace/balance

# Call agent
curl -X POST https://dcdncloud.com/api/v1/marketplace/call/fingpt \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Risk assessment for BTC portfolio","max_payment_usd":1}'

Mesh Access

Agents can access your private network through DCDN Mesh. Pass mesh_access in the call request to grant scoped access:

{
  "message": "Query staging DB",
  "mesh_access": {
    "network_id": "net-abc123",
    "allowed_hosts": ["10.200.42.3:5432"]
  }
}

See Mesh Network docs for setup and policy configuration.

DCDN Cloud โ€” dcdncloud.com โ€” Sandbox ยท Mesh ยท CLI ยท x402 ยท Dashboard