pg-buy

Use when buying API access through ProxyGate — depositing USDC, browsing available APIs, making proxy requests, streaming responses, or rating sellers. Make sure to use this skill whenever someone mentions "proxy request", "buy API", "deposit USDC", "browse APIs", "call API through proxygate", "make an API call", "find an API", "search APIs", or wants to consume any API through ProxyGate, even if they don't explicitly say "buy".

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pg-buy" with this command: npx skills add jwelten/pg-buy

ProxyGate — Buy API Access

Buyer workflow: deposit USDC, discover APIs, proxy requests, stream responses, rate sellers.

Process

1. Check balance

proxygate balance

Shows: total balance, pending settlement, available, cooldown status. If 0 or insufficient, deposit first.

2. Deposit USDC

proxygate deposit -a 5000000      # 5 USDC (amounts in lamports: 1 USDC = 1,000,000)
proxygate deposit -a 1000000      # 1 USDC

Vault auto-initializes on first deposit. User needs USDC in their Solana wallet. Use --rpc <url> for custom RPC.

3. Discover APIs

# Browse all APIs with rich filtering
proxygate apis                                    # all listings
proxygate apis -s weather-api                     # filter by service
proxygate apis -c ai-models                       # filter by category
proxygate apis -q "code review"                   # semantic search
proxygate apis --verified                         # verified sellers only
proxygate apis --sort price_asc                   # sort: price_asc, price_desc, popular, newest
proxygate apis -l 50                              # limit results

# Search
proxygate search weather                          # alias for apis -q
proxygate services                                # service stats (cheapest, avg latency, rating)
proxygate categories                              # browse categories

# Listing details & docs
proxygate listings docs <id>                     # view API documentation

4. Proxy a request

Use a service name, slug, or listing UUID — the CLI resolves it automatically:

# By service name (easiest)
proxygate proxy weather-api /v1/forecast \
  -d '{"latitude":52.37,"longitude":4.90,"hourly":"temperature_2m"}'

# Simple GET
proxygate proxy agent-postal-lookup /nl/1012

# Stream SSE responses
proxygate proxy weather-api /v1/forecast --stream \
  -d '{"latitude":52.37,"longitude":4.90,"hourly":"temperature_2m"}'

# Shield scanning (content moderation)
proxygate proxy weather-api /path --shield monitor    # log threats (default)
proxygate proxy weather-api /path --shield strict     # block threats (credits refunded)
proxygate proxy weather-api /path --shield off        # disable (no surcharge)

After each call, you'll see cost and request ID:

cost: $0.0155 | request: 905b1a53

5. Rate a seller

Use the request ID shown after each proxy call:

proxygate rate --request-id <id> --up      # positive rating
proxygate rate --request-id <id> --down    # negative rating

6. Check usage

proxygate usage                                   # recent request history
proxygate usage -s weather-api -l 50              # filtered by service
proxygate usage --from 2026-03-01 --to 2026-03-14 # date range
proxygate usage --json                            # machine-readable

proxygate settlements -r buyer                    # cost breakdown
proxygate settlements -s weather-api --from 2026-03-01 # filtered

7. Withdraw (optional)

Convert credits back to USDC:

proxygate withdraw -a 2000000     # withdraw 2 USDC
proxygate withdraw                # withdraw all available

Recovery (if CLI crashes mid-withdrawal):

proxygate withdraw-confirm --tx <tx_signature>

SDK (Programmatic)

For agent-to-agent use without CLI:

import { ProxyGateClient, parseSSE } from '@proxygate/sdk';

const client = await ProxyGateClient.create({
  keypairPath: '~/.proxygate/keypair.json',
});

// Check balance
const { balance, available } = await client.balance();

// Browse APIs
const apis = await client.apis({ service: 'weather-api', verified: true });
const categories = await client.categories();
const services = await client.services();

// Proxy a request (by service name, slug, or UUID)
const res = await client.proxy('weather-api', '/v1/forecast', {
  latitude: 52.37, longitude: 4.90, hourly: 'temperature_2m',
});

// Resolve service to listing
const listing = await client.resolveByService('weather-api');

// Stream with SSE
const streamRes = await client.proxy('weather-api', '/v1/forecast',
  { latitude: 52.37, longitude: 4.90, hourly: 'temperature_2m' },
);
for await (const event of parseSSE(res)) {
  process.stdout.write(event.data);
}

// Shield scanning
const res = await client.proxy('weather-api', '/path', body, { shield: 'strict' });

// Rate a seller
await client.rate({ request_id: 'req-id', is_positive: true });

// Usage & settlements
const usage = await client.usage({ service: 'weather-api', limit: 50 });
const settlements = await client.settlements({ role: 'buyer' });

Success criteria

  • Balance checked and sufficient for request
  • Service found via proxygate search or proxygate apis
  • Proxy request returns upstream API response
  • Usage reflects the completed request

Related skills

NeedSkill
First-time setuppg-setup
Buy API accessThis skill
Sell API capacitypg-sell
Job marketplacepg-jobs
Check statuspg-status
Update CLI/SDKpg-update

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Pg Sell

Use when selling API capacity on ProxyGate — creating listings, managing listings (update/pause/delete), rotating keys, uploading docs, starting tunnels, man...

Registry SourceRecently Updated
2920Profile unavailable
General

Pg Status

Use when checking ProxyGate status — balance, usage, listings, tunnel health, earnings, seller profile, or job status. Make sure to use this skill whenever s...

Registry SourceRecently Updated
3040Profile unavailable
Coding

Pg Update

Use when updating ProxyGate CLI or SDK to the latest version. Also triggers proactively when an update notification is shown. Make sure to use this whenever...

Registry SourceRecently Updated
2950Profile unavailable
Web3

Pg Setup

Use when setting up ProxyGate for the first time, installing the CLI, configuring auth (API key or wallet), or connecting to the gateway. Make sure to use th...

Registry SourceRecently Updated
2950Profile unavailable