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.

25 stars

Best use case

Nightmarket — API Marketplace for AI Agents is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using Nightmarket — API Marketplace for AI Agents should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/nightmarket/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/elizaOS/eliza/nightmarket/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/nightmarket/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Nightmarket — API Marketplace for AI Agents Compares

Feature / AgentNightmarket — API Marketplace for AI AgentsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 Required` from a `nightmarket.ai` URL
- User wants their agent to access external services without managing API keys

## Searching for Services

Search the marketplace to find what you need:

```bash
# 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 seller
- `sort` (optional) — `popular`, `newest`, `price_asc`, `price_desc` (default: `popular`)

**Response:**
```json
[
  {
    "_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):

```bash
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:

```bash
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

1. **Make the request** — standard HTTP to the proxy URL
2. **Receive 402** — response includes a `PAYMENT-REQUIRED` header with: scheme, payTo address, price (USDC), and network (Base)
3. **Pay** — sign the payment with your wallet or use CrowPay to handle it
4. **Retry with proof** — resend the same request with the `payment-signature` header
5. **Get your response** — proxy verifies payment on-chain, forwards to seller, returns the result

## Paying with CrowPay (recommended)

```bash
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"}'
```

2. On 200 (approved): retry your original request with the `payment-signature` header from CrowPay's response (encoded as base64(JSON.stringify(response_body)))
3. On 202 (pending): poll `/authorize/status?id=<approvalId>` for human approval
4. 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

```bash
# 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 codes
- `references/crow-payments.md` — complete CrowPay integration for automatic 402 handling
- `references/mcp.md` — optional MCP server setup if you want tool-based access instead of HTTP

Related Skills

marketplace-manager

25
from ComeOnOliver/skillshub

Automatically manages marketplace catalog updates, syncs marketplace.json, and handles plugin distribution when user mentions marketplace update, sync catalog, or add to marketplace. Specific to claude-code-plugins two-catalog system.

contract-first-agents

25
from ComeOnOliver/skillshub

Contract-First Map-Reduce coordination protocol for native TeamCreate multi-agent teams. Wraps TeamCreate, Task (teammates), SendMessage with an upfront shared contract phase that eliminates 75% of integration errors. Based on 400+ experiment research proving 52.5% quality improvement over naive coordination.

hosted-agents

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "build background agent", "create hosted coding agent", "set up sandboxed execution", "implement multiplayer agent", or mentions background agents, sandboxed VMs, agent infrastructure, Modal sandboxes, self-spawning agents, or remote coding environments.

suggest-awesome-github-copilot-agents

25
from ComeOnOliver/skillshub

Suggest relevant GitHub Copilot Custom Agents files from the awesome-copilot repository based on current repository context and chat history, avoiding duplicates with existing custom agents in this repository, and identifying outdated agents that need updates.

mcp-deploy-manage-agents

25
from ComeOnOliver/skillshub

Skill converted from mcp-deploy-manage-agents.prompt.md

declarative-agents

25
from ComeOnOliver/skillshub

Complete development kit for Microsoft 365 Copilot declarative agents with three comprehensive workflows (basic, advanced, validation), TypeSpec support, and Microsoft 365 Agents Toolkit integration

create-agentsmd

25
from ComeOnOliver/skillshub

Prompt for generating an AGENTS.md file for a repository

agents-md

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "create AGENTS.md", "update AGENTS.md", "maintain agent docs", "set up CLAUDE.md", or needs to keep agent instructions concise. Enforces research-backed best practices for minimal, high-signal agent documentation.

../../../agents/engineering-team/cs-workspace-admin.md

25
from ComeOnOliver/skillshub

No description provided.

../../../agents/ra-qm-team/cs-quality-regulatory.md

25
from ComeOnOliver/skillshub

No description provided.

../../../agents/project-management/cs-project-manager.md

25
from ComeOnOliver/skillshub

No description provided.

../../../agents/business-growth/cs-growth-strategist.md

25
from ComeOnOliver/skillshub

No description provided.