quickstart.md

August 3, 2026 ยท View on GitHub

Use this quickstart to choose one environment and one execution lane. You do not need a PubFi API key to inspect public contracts or use an eligible accountless x402 route.

1. Choose An Environment

EnvironmentWebAPIMCP
Staginghttps://stg.pubfi.aihttps://api-stg.pubfi.aihttps://mcp-stg.pubfi.ai
Productionhttps://pubfi.aihttps://api.pubfi.aihttps://mcp.pubfi.ai

Start in Staging. Keep the web, API, MCP, credentials, and payment network in the same environment. See the Staging Guide for login and test details.

2. Choose A Path

GoalInterface or lanePubFi API key
Compare crypto data providersDiscoveryNo
Inspect routes and schemasRegistry catalog, Runtime OpenAPI, or MCP tools/listNo
Execute through HTTP with account allocationAPI-key laneYes
Execute through MCP with account allocationMCP API-key laneYes
Buy one eligible response without an accountHTTP or MCP x402 laneNo

Do not combine a PubFi API key with x402 payment evidence.

3. Inspect The Current Contract

Set the API root for the selected environment. This example uses Staging:

export PUBFI_API_BASE='https://api-stg.pubfi.ai'

Fetch the complete Registry catalog and the executable HTTP schema:

curl --fail --silent --show-error "${PUBFI_API_BASE}/v1/capabilities"
curl --fail --silent --show-error "${PUBFI_API_BASE}/openapi.json"

The catalog lists all installed operations and their readiness. Runtime OpenAPI includes current ready HTTP operations. Do not infer execution from Discovery, an old example, or a saved route from another environment or Registry generation.

4. Use The API-Key Lane

Skip this section if you selected accountless x402.

Create an environment-specific key in Manage application keys. Store it outside prompts, source code, logs, and tracked client configuration. For Staging:

export STG_PUBFI_API_KEY='<Staging PubFi API key>'

Select an exact current path and method from the Staging catalog. Then send one supported auth header. For example:

curl --fail --silent --show-error \
  --request GET \
  --header "Authorization: Bearer ${STG_PUBFI_API_KEY}" \
  "${PUBFI_API_BASE}/v1/gateway/quantro/health"

Confirm that the exact route is still ready before you call it. Continue with API Key And Runtime and Registry Gateway Examples.

5. Connect Through MCP

Use MCP Client Setup to choose hosted Streamable HTTP or the local stdio bridge. Then use MCP Client Guides for exact configuration in Codex, Claude, GitHub Copilot, VS Code, Cursor, Gemini CLI, and other common clients. MCP exposes catalog list and detail tools plus exact route execution over the same Registry authority as the HTTP gateway.

6. Or Use Accountless x402

Skip API-key creation. Confirm that the selected Staging route and method are ready, then call the route without auth:

curl --include \
  'https://api-stg.pubfi.ai/v1/gateway/quantro/health'

Only a current unsigned 402 response proves x402 availability for that exact request. Validate every payment term before you sign. Staging permits Base Sepolia eip155:84532. Production permits Base mainnet eip155:8453 only when x402 is enabled for the exact route.

Continue with Accountless x402 for wallet policy, payment, receipt, and replay rules.

7. Check Readiness Before Execution

A source page, schema, or route plan is not execution authority. Every call needs an exact ready operation and its request-time gates. The API-key lane also needs valid scope, fresh admission, and sufficient allocation. The x402 lane needs current route eligibility and a valid request-bound payment authorization.

Continue By Goal

GoalNext page
Understand API schemas and auth familiesAPI Reference
Connect an agent runtimeAgent Interface Reference
Compare payment and execution lanesPayment And Execution Modes
Understand route authority and readinessCapability And Registry Contracts
Browse runnable examplesPublic examples