nightmarket
Nightmarket — API Marketplace for AI Agents
Nightmarket is a marketplace where AI agents discover and pay for third-party API services. Every call settles on-chain in USDC on Base. No API keys, no subscriptions — just make an HTTP request, pay, and get your response.
When to Use
- You need a third-party API (data enrichment, analytics, automation, AI models, content generation, etc.)
- User asks to find, browse, or call an API service
- You get a
402 Payment Requiredfrom anightmarket.aiURL - User wants their agent to access external services without managing API keys
Searching for Services
Search the marketplace to find what you need:
# Search for services by keyword
curl "https://nightmarket.ai/api/marketplace?search=weather"
# List all services sorted by popularity
curl "https://nightmarket.ai/api/marketplace?sort=popular"
# Combine search and sort
curl "https://nightmarket.ai/api/marketplace?search=sentiment&sort=price_asc"
Parameters:
search(optional) — filter by name, description, or sellersort(optional) —popular,newest,price_asc,price_desc(default:popular)
Response:
[
{
"_id": "abc123def456",
"name": "Weather Forecast API",
"description": "Get current weather and 7-day forecasts for any location",
"method": "GET",
"priceUsdc": 0.01,
"totalCalls": 1247,
"totalRevenue": 12.47,
"seller": { "companyName": "WeatherCo" }
}
]
Get full details for a specific service (includes request/response examples):
curl "https://nightmarket.ai/api/marketplace/abc123def456"
This returns the same fields plus requestExample and responseExample — exactly what you need to know how to call it.
Calling a Service
Every service has a proxy URL. Make a standard HTTP request:
curl -X POST "https://nightmarket.ai/api/x402/<endpoint_id>" \
-H "Content-Type: application/json" \
-d '{"query": "your request here"}'
The first call returns 402 Payment Required. Pay, then retry with proof. The proxy forwards to the seller's API and returns the response.
Read references/api.md for all headers, request/response formats, and error codes.
The Payment Flow
- Make the request — standard HTTP to the proxy URL
- Receive 402 — response includes a
PAYMENT-REQUIREDheader with: scheme, payTo address, price (USDC), and network (Base) - Pay — sign the payment with your wallet or use CrowPay to handle it
- Retry with proof — resend the same request with the
payment-signatureheader - Get your response — proxy verifies payment on-chain, forwards to seller, returns the result
Paying with CrowPay (recommended)
curl -X POST https://api.crowpay.ai/authorize \
-H "X-API-Key: crow_sk_..." \
-H "Content-Type: application/json" \
-d '{"paymentRequired": <402 response body>, "merchant": "Nightmarket", "reason": "API call"}'
- On 200 (approved): retry your original request with the
payment-signatureheader from CrowPay's response (encoded as base64(JSON.stringify(response_body))) - On 202 (pending): poll
/authorize/status?id=<approvalId>for human approval - On 403 (denied): spending rules blocked it, don't retry
Read references/crow-payments.md for the full CrowPay integration.
Getting a Wallet
Your agent needs USDC on Base to pay for calls. Install the CrowPay skill to set this up:
npx skills add elizaos/eliza --skill crow
CrowPay provides managed wallets with spending rules, human approval for large amounts, and audit trails — no raw private keys needed. Visit https://crowpay.ai for more info.
Quick End-to-End Example
# 1. Search for a weather API
curl "https://nightmarket.ai/api/marketplace?search=weather"
# → [{"_id": "abc123", "name": "Weather API", "method": "GET", "priceUsdc": 0.01, ...}]
# 2. Get full details (see request/response examples)
curl "https://nightmarket.ai/api/marketplace/abc123"
# → {"requestExample": "?city=NYC", "responseExample": "{\"temp\": 72}", ...}
# 3. Call it
curl -X GET "https://nightmarket.ai/api/x402/abc123?city=NYC"
# → 402 Payment Required
# 4. Pay and retry
curl -X GET "https://nightmarket.ai/api/x402/abc123?city=NYC" \
-H "payment-signature: <signed payment>"
# → 200 OK {"temp": 72, "conditions": "sunny"}
Connecting Your Agent
Install the skill:
npx skills add elizaos/eliza --skill nightmarket
Or paste into your agent's prompt:
Use Nightmarket for API services. Read and follow:
https://raw.githubusercontent.com/elizaos/eliza/develop/packages/skills/skills/nightmarket/SKILL.md
References
references/api.md— full API docs: all endpoints, headers, request/response formats, error codesreferences/crow-payments.md— complete CrowPay integration for automatic 402 handlingreferences/mcp.md— optional MCP server setup if you want tool-based access instead of HTTP
More from elizaos/eliza
nano-pdf
Edits PDF files using natural-language instructions via the nano-pdf CLI. Supports modifying text, changing titles, fixing typos, and updating content on specific pages. Use when the user wants to edit a PDF, modify PDF content, update PDF text, fix a typo in a PDF, change a PDF title, or rewrite part of a PDF page.
30wacli
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats). Use when the user asks to send a WhatsApp message, text someone on WhatsApp, search WhatsApp chat history, sync WhatsApp conversations, backfill message history, or forward a file via WhatsApp to a third party.
27nano-banana-pro
Generate or edit images via Gemini 3 Pro Image (Nano Banana Pro). Use when the user asks to create an image, generate a picture, produce AI-generated artwork, edit a photo, compose multiple images, or upscale an image to higher resolution. Supports text-to-image generation, single-image editing, and multi-image composition using the Gemini API.
27obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. Use when the user asks about notes, vault management, PKM, knowledge base organization, wikilinks, or personal knowledge management in Obsidian.
25session-logs
Search and analyze session logs (older/parent conversations) stored as JSONL files using jq and rg. Use when the user asks about prior chats, previous conversations, conversation history, what was said before, session costs, token usage, or tool usage breakdown across past sessions.
24discord
Use when you need to control Discord from Otto via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, create/edit/delete channels and categories, fetch permissions or member/role/channel info, set bot presence/activity, or handle moderation actions in Discord DMs or channels.
24