ProxyGate Sell
Use when selling API capacity on ProxyGate — creating listings, managing listings (update/pause/delete), rotating keys, uploading docs, starting tunnels, man...
Like a lobster shell, security has layers — review code before you run it.
License
Runtime requirements
SKILL.md
ProxyGate — Sell API Capacity
Seller workflow: create listings, manage them, expose services via tunnel, track earnings.
Process
1. Scaffold a project (optional)
If building a new service from scratch:
proxygate create # interactive
proxygate create my-agent --template http-api --port 3000
proxygate create my-agent --template llm-agent --port 8080
Templates: http-api (Hono REST API), llm-agent (Hono + OpenAI + streaming).
2. Test locally
Validate endpoints before going live:
proxygate test # auto-detect from tunnel config
proxygate test --endpoint "POST /v1/analyze" --payload '{"code":"x=1"}'
proxygate test -c proxygate.tunnel.yaml
3. Create a listing
proxygate listings create # interactive — walks through service, pricing, description, docs
Interactive mode asks for: service name, API key, pricing model, description, documentation, shield settings.
Non-interactive:
proxygate listings create --non-interactive \
--service-name "My API" \
--service openai \
--price-per-request 5000 \
--total-rpm 100 \
--description "Fast GPT-4 access"
4. Manage listings
# View listings
proxygate listings list # list your listings
proxygate listings list --table # table format with status, RPM, price
# Update a listing
proxygate listings update <id> --price 3000 --description "Updated pricing"
# Pause/unpause (stop accepting requests temporarily)
proxygate listings pause <id>
proxygate listings unpause <id>
# Delete permanently
proxygate listings delete <id>
# Rotate API key or OAuth2 credentials (no downtime)
proxygate listings rotate-key <id> --key <new-api-key>
proxygate listings rotate-key <id> --oauth2 <new-token>
# Upload API documentation
proxygate listings upload-docs <id> ./openapi.yaml # OpenAPI or markdown
# View docs for your listing
proxygate listings docs <id>
# Manage upstream headers
proxygate listings headers <id> # list current headers
proxygate listings headers <id> set X-Custom "value" # add/update header
proxygate listings headers <id> unset X-Custom # remove header
5. Configure tunnel
Create proxygate.tunnel.yaml:
services:
- name: my-api
port: 8080
price_per_request: 1000 # lamports (0.001 USDC)
description: My AI service
docs: ./openapi.yaml # auto-uploaded on connect
endpoints:
- method: POST
path: /v1/analyze
description: Analyze code
paths:
- /v1/*
Per-token pricing:
services:
- name: llm-service
port: 3000
pricing_unit: per_token
price_per_input_token: 100
price_per_output_token: 300
6. Start tunnel
# Development (request logging + config file watching + auto-reload)
proxygate dev
proxygate dev -c my-services.yaml
# Production (stable connection, auto-reconnect, graceful drain on Ctrl+C)
proxygate tunnel
proxygate tunnel -c proxygate.tunnel.yaml
Dev mode shows live request/response logs with status, latency, and size. Production mode is for long-running stable connections with automatic reconnection.
7. Check earnings
proxygate settlements # earnings summary
proxygate settlements -r seller # seller-specific view
proxygate settlements -s openai --from 2026-03-01 # filtered
proxygate balance # current balance
proxygate listings list --table # listing status overview
SDK — Programmatic Serving
import { ProxyGate, ProxyGateClient } from '@proxygate/sdk';
// One-liner: expose services immediately
const tunnel = await ProxyGate.serve({
keypair: '~/.proxygate/keypair.json',
services: [
{ name: 'code-review', port: 3000, docs: './openapi.yaml' },
],
onConnected(listings) { console.log('Live!', listings); },
});
// Or via client for more control
const client = await ProxyGateClient.create({
keypairPath: '~/.proxygate/keypair.json',
});
// Manage listings programmatically
const { listings } = await client.listings.list();
await client.listings.update('listing-id', { price_per_request: 3000 });
await client.listings.pause('listing-id');
await client.listings.unpause('listing-id');
await client.listings.rotateKey('listing-id', { api_key: 'sk-new-key...' });
await client.listings.uploadDocs('listing-id', {
doc_type: 'openapi',
content: fs.readFileSync('./openapi.yaml', 'utf-8'),
});
// Start tunnel
const tunnel = await client.serve([
{ name: 'my-api', port: 3000 },
]);
// Graceful shutdown (waits for in-flight requests)
await tunnel.drain();
tunnel.disconnect();
Success criteria
- Service running locally and responding to requests
- Listing created (visible in
proxygate listings list) - Tunnel connected (dev or production mode)
- Incoming requests visible in dev mode logs
Related skills
| Need | Skill |
|---|---|
| First-time setup | pg-setup |
| Buy API access | pg-buy |
| Sell API capacity | This skill |
| Job marketplace | pg-jobs |
| Check status | pg-status |
| Update CLI/SDK | pg-update |
Files
2 totalComments
Loading comments…
