Skip to main content

Quickstart for AI

For an AI agent to call Nodit APIs, it needs context to understand the API structure and tooling to execute actual requests. This guide walks through setting up an execution path via Skills or MCP and handling payments with x402.


0. Prerequisites

At least one of the following must be in place before you begin.

  • API Key-based calls: Sign up at the Nodit Console, create a project, and issue an API Key.
  • x402-based calls: A wallet that supports EIP-712 signing and a USDC balance are required. You can call APIs using only a wallet, with no account registration needed.

Prepare your AI agent environment as well.

PathExample Environments
SkillsClaude Code, Codex, Cursor, and other AI coding agents
MCPClaude Desktop, Cursor IDE, and other MCP clients
Recommended Starting Path

If you are using an AI coding agent, Skills is the right fit. For MCP client environments, use MCP. llms.txt can supplement either path, or serve as a way to review documentation context before installing any tools.

1. Choose an Execution Path: Skills or MCP

Connect an execution path so the AI agent can invoke Nodit APIs as tools.

1-1. Setting Up the Skills Path

Install Nodit Skills to give an AI coding agent access to Nodit API specifications and usage patterns.

Install Nodit Skills
# Install all skills
npx skills add noditlabs/skills --yes

# Install only the skills you need
npx skills add noditlabs/skills --skill web3-tools
npx skills add noditlabs/skills --skill web3-x402

web3-tools is the foundational skill that connects Nodit API structure and call patterns to the agent. web3-x402 handles payments via the x402 protocol. Installing both skills together lets an agent handle API calls and payments in a single workflow.

1-2. Setting Up the MCP Path

To use Nodit APIs as tools in an MCP client, connect the Nodit MCP server.

The Nodit MCP server provides tools for listing APIs, retrieving specifications, and making actual calls.

ToolDescription
list_nodit_api_categoriesList available API categories
list_nodit_node_apisList Node APIs
list_nodit_data_apisList Web3 Data APIs
list_nodit_webhook_apisList Webhook APIs
list_nodit_aptos_indexer_api_query_rootList Aptos Indexer APIs
get_nodit_api_specRetrieve detailed specification for a specific API
call_nodit_apiCall a Nodit API
call_nodit_aptos_indexer_apiCall the Aptos Indexer API

For a local MCP server, add the following to your configuration file.

Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
Cursor IDE~/.cursor/mcp.json

Local MCP Server Config
{
"mcpServers": {
"nodit": {
"command": "npx",
"args": ["@noditlabs/nodit-mcp-server@latest"],
"env": {
"NODIT_API_KEY": "{YOUR_API_KEY}"
}
}
}
}

To register via the Claude CLI, run the following command.

Claude CLI MCP Registration
claude mcp add nodit-mcp-server npx @noditlabs/nodit-mcp-server
export NODIT_API_KEY={YOUR_API_KEY}

Alternatively, connect directly to the Remote MCP server hosted by Nodit.

https://mcp.nodit.io/sse?apiKey={YOUR_API_KEY}
Difference Between Skills and MCP

Skills is better suited for applying Nodit usage patterns within an AI coding agent. MCP is the right choice when an MCP client needs to call Nodit APIs through a standard tool interface.

2. llms.txt (Optional)

llms.txt is not required when using Skills or MCP, since both paths already include Nodit API structure and usage context. You can add llms.txt as supplementary context in the following situations.

  • You need to convey the Nodit documentation structure to an AI without installing any tools.
  • You want to include an official documentation summary in a system prompt.
  • You want to verify how well the AI understands Nodit before connecting Skills or MCP.

2-1. Locating llms.txt

Copy the content at the URL below, or configure your AI tool to reference it directly if it supports external document ingestion.

https://developer.nodit.io/llms.txt

2-2. Building a Basic Instruction Set for the AI

When using llms.txt, pairing the documentation summary with operational instructions improves the accuracy of the AI's responses. The example below is a minimal setup applicable to AI coding agents or custom agent runtimes.

System Prompt Example
You are working with Nodit, a multichain blockchain data platform.

Use Nodit's llms.txt as supporting context:
https://developer.nodit.io/llms.txt

When blockchain data is required:
1. Identify the relevant Nodit API category or method.
2. Prefer official Nodit tools or documented API patterns.
3. If the environment supports wallet-based payment, use x402 when API Key authentication is not available.
4. Explain which chain, network, and method you chose before making the request.

2-3. Verification Prompt Examples

After providing llms.txt, use prompts like the one below to confirm the AI understands Nodit API structure before connecting any tools.

Prompt Example
Use Nodit to find the latest Ethereum mainnet block.
Before calling anything, explain which Nodit API you would use and why.

3. Make Your First Call

With an execution path connected, use the example below to make a real API call — retrieving the latest block on Ethereum Mainnet.

3-1. Sample Prompt

The prompt below works with both Skills and MCP.

Prompt Example (Get latest block)
Use Nodit to get the latest block on Ethereum mainnet.
1. Identify the API category and method first.
2. Call the API.
3. Return the block number, block hash, and timestamp.

3-2. Expected Execution Flow

When configured correctly, the AI follows these steps.

  1. Checks the Nodit API structure from the connected tool.
  2. Selects the appropriate method from the Web3 Data API or Node API.
  3. Retrieves the required specification via Skills or MCP.
  4. Authenticates using an API Key or x402 and sends the request.
  5. Extracts and returns the relevant fields from the response.

4. Connect x402 Payment

Use x402 when you need to process API requests using only a wallet signature, without an API Key. x402 is an HTTP 402 Payment Required-based payment protocol and is supported by the Node API (JSON-RPC) and Web3 Data API.

4-1. How x402 Works

x402 receives payment conditions at request time, signs them, and resubmits the request.

  1. The agent sends a request to a Nodit API.
  2. Nodit returns 402 Payment Required along with payment conditions.
  3. The agent signs the payment data using a wallet.
  4. The agent resubmits the same request with the signed data included.
  5. Nodit validates the payment and returns the API response.

4-2. Using x402 with Skills

web3-x402 is designed to work alongside web3-tools. web3-tools determines which API to call, while web3-x402 handles wallet authentication and payment processing.

x402 Prompt Example
Use Nodit to fetch the latest Ethereum mainnet block.
If API Key authentication is unavailable, use x402 payment.
x402 Support Scope

x402 currently supports the Node API (JSON-RPC) and Web3 Data API. The Webhook API and Aptos Node API cannot be called via x402. Check supported chains and methods at Supported APIs & Pricing.

4-3. Choosing a Payment Mode

x402 offers two modes depending on your call pattern. Start with Pay-Per-Use to validate behavior, then switch to Credit as call volume increases.

ModeDescriptionUse Case
Pay-Per-Use (PPU)USDC payment per requestLow-frequency calls, prototyping
CreditPre-loaded balance deducted per callHigh-frequency calls, predictable workloads

For detailed differences and implementation steps, refer to the documents below.

Next Steps

  • Web3 Data API — Query on-chain data via an indexed data API
  • Webhook — Receive notifications to a designated server when on-chain events occur
  • Stream — Subscribe to on-chain events in real time over a persistent WebSocket channel
  • What is x402? — Overview of the x402 protocol and payment flow
  • Supported APIs & Pricing — List of chains and methods supported by x402
Get Started Now

Create a project in the Nodit Console, issue an API Key, and make your first API call.