<aside>

Overview

:ambient-logo-original: Docs Home

What is Ambient?

Getting Started

Testnet

App

API

On-Chain

Tool Oracle

Claude Code

Miners

Encyclopedia

Solana Quickstart

X402 Client Documentation

Developers

OpenAI SDK

Anthropic SDK

API Docs

API Playground

Links

🌐 Homepage

βœ‰οΈΒ [email protected]

:discord-symbol-blurple: Discord

:github-mark-white-bg: github.com/ambient-xyz

:x-logo-black: @ambient_xyz

</aside>

Overview

JumpGate offers a pay-per-use AI inference API powered by the x402 payment protocol. No API keys, no accounts, no pre-depositsβ€”just send a request and pay automatically with USDC.

Endpoint: https://jumpgate.ambient.xyz/paid/chat

What makes this different:


Supported Payment Networks

JumpGate accepts USDC payments on two networks:

Network Chain ID Token Recommended For
Solana Mainnet solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp USDC Low fees, fast finality, high throughput
Base Mainnet eip155:8453 USDC Ethereum ecosystem, EVM compatibility

How x402 Payment Protocol Works

The x402 protocol brings cryptocurrency payments to standard HTTP requests using the 402 Payment Required status code.

Payment Flow

1. Client β†’ Server: POST /paid/chat (no payment)
2. Server β†’ Client: 402 Payment Required + payment options (Solana + Base)
3. Client: Selects preferred chain and creates on-chain payment
4. Client β†’ Facilitator: Submits payment proof
5. Facilitator β†’ Client: Issues payment token
6. Client β†’ Server: Retries request with X-Payment header
7. Server: Verifies payment with facilitator
8. Server β†’ Client: 200 OK + streaming inference response

The good news: Client libraries handle steps 3-6 automatically! You just make a normal HTTP request.

Key Components


Pricing

JumpGate uses a transparent token-based pricing model:

Resource Price
Input tokens PRICE_PER_INPUT_TOKENS micro-USDC per token
Output tokens PRICE_PER_OUTPUT_TOKENS micro-USDC per token

Total cost calculation:

cost = (input_tokens Γ— PRICE_PER_INPUT_TOKENS) + (output_tokens Γ— PRICE_PER_OUTPUT_TOKENS)

πŸ’‘ Pricing details: Visit https://app.ambient.xyz/billing

Note on HTTP 403 Responses: Very small USDC payment amounts (particularly with x402 payments) may result in HTTP 403 Forbidden responses. This is due to minimum payment thresholds imposed by the payment processing network. If you encounter a 403 response, try increasing the payment amount slightly.

Cost Estimation

Before making a request, you can estimate the cost:

  1. Input tokens: Count the characters in your prompt (approximately 1 token = 1 byte)
  2. Output tokens: Set max_completion_tokens to your desired maximum
  3. Calculate: total_cost = input_cost + output_cost

Tip: Add a small buffer (e.g., +50 micro-USDC) to account for price variations.

Network Fee Comparison

Network Avg. Transaction Fee Finality
Solana ~$0.00001 ~400ms
Base ~$0.01-0.05 ~2 seconds

Prerequisites

Before you start, you'll need:

Option A: Solana (Recommended)

  1. Solana Wallet: A keypair with SOL and USDC on mainnet
  2. Solana RPC Access:

Option B: Base

  1. Ethereum Wallet: Private key with ETH and USDC on Base mainnet
  2. Base RPC Access:

Programming Environment