Rent GPU per job API for AI agent

$1.00 USDC per call on Base · No signup · No API key · x402 v2

What it does

Rent a spot GPU per job — pay USDC, get SSH. Pay $1.00 USDC and get SSH access to a spot GPU (RTX 4090, 3090, 3080, or A6000) for up to 2 hours. No account, no signup. Async provisioning: book now, poll for SSH credentials in 1-5 minutes. We book the cheapest verified Vast.ai spot offer and pass the savings to you.

Data source: Vast.ai spot GPU marketplace (verified hosts only)

How to call (for AI agents)

No account. No API key. Every endpoint speaks x402 v2:

  1. Call the endpoint → you get 402 Payment Required with the price
  2. Pay $1.00 USDC on Base (eip155:8453)
  3. Retry with the X-PAYMENT header → 200 with JSON
curl -X POST "https://api.mekongtradeintel.com/gpubroker/api/gpu" \
  -H "Content-Type: application/json" \
  -d '{   "gpu_type": "RTX_4090",   "duration_hours": 1,   "ssh_key": "ssh-ed25519 AAAA..." }'

Input

ParamTypeDescription
gpu_typestring (body JSON)One of: RTX_4090, RTX_3090, RTX_3080, RTX_A6000
duration_hoursnumber (body JSON)1-2, default 1. Instance auto-destroys at expiry
ssh_keystring (body JSON)Your SSH public key — injected into the instance
imagestring (body JSON, optional)Docker image override

Example request & response

Request

{
  "gpu_type": "RTX_4090",
  "duration_hours": 1,
  "ssh_key": "ssh-ed25519 AAAA..."
}

Response

{
  "job_id": "job_8f3a2b",
  "status": "queued",
  "expires_at": "2026-10-19T09:50:00Z",
  "message": "Poll GET /api/gpu/job_8f3a2b for SSH credentials."
}

Payment

x402 v2 · exact scheme · USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base (eip155:8453).
Facilitators: Coinbase CDP and PayAI (no API key needed for either).

FAQ

How do I get SSH access?
Pass your SSH public key in the booking request. When the job status becomes 'running', poll GET /api/gpu/{job_id} for ssh_host, ssh_port (user: root), then ssh -p PORT root@HOST.

How long does provisioning take?
1-5 minutes. The worker books the cheapest verified spot offer matching your GPU type.

What happens when time runs out?
The instance is automatically destroyed at expires_at. You can also DELETE /api/gpu/{job_id} anytime to stop early.

Which GPUs are available?
Pilot: RTX 4090 (~$0.40/hr spot), RTX 3090 (~$0.17/hr), RTX 3080 (~$0.16/hr), RTX A6000 (~$0.40/hr). $1.00/job covers up to 2h on any of them.

Is my SSH key stored?
Your public key is injected into the instance via onstart script and kept in the job record until the job is destroyed. Never share private keys.

Do I need an API key?
No. This API uses x402: call the endpoint, receive a 402 Payment Required with the price, pay in USDC on Base, and retry with proof of payment. No signup, no API key, no account.

Which facilitators are supported?
Both Coinbase CDP and PayAI facilitators are supported for x402 v2 exact payments on Base (eip155:8453).

What if my payment is too low?
The facilitator verifies the on-chain amount against the price. If underpaid, you get 402 again; pay the full amount and retry.

More APIs for AI agents

Part of the x402 API Collection — 16 pay-per-call endpoints, $0.0008–$0.008/call. Full catalog: https://api.mekongtradeintel.com/.well-known/x402