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
| Environment | Web | API | MCP |
|---|---|---|---|
| Staging | https://stg.pubfi.ai | https://api-stg.pubfi.ai | https://mcp-stg.pubfi.ai |
| Production | https://pubfi.ai | https://api.pubfi.ai | https://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
| Goal | Interface or lane | PubFi API key |
|---|---|---|
| Compare crypto data providers | Discovery | No |
| Inspect routes and schemas | Registry catalog, Runtime OpenAPI, or MCP tools/list | No |
| Execute through HTTP with account allocation | API-key lane | Yes |
| Execute through MCP with account allocation | MCP API-key lane | Yes |
| Buy one eligible response without an account | HTTP or MCP x402 lane | No |
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
| Goal | Next page |
|---|---|
| Understand API schemas and auth families | API Reference |
| Connect an agent runtime | Agent Interface Reference |
| Compare payment and execution lanes | Payment And Execution Modes |
| Understand route authority and readiness | Capability And Registry Contracts |
| Browse runnable examples | Public examples |