Join our community of builders on Discord!

Testnet API & RPC Reference

The Lightchain AI Testnet exposes standard Ethereum JSON-RPC endpoints alongside Lightchain-specific extensions for AIVM and PoI interactions.

Endpoints

ProtocolURLUse Case
HTTPS
CodeHTML
Standard RPC calls
WSS
CodeHTML
Subscriptions & real-time

Rate Limits

TierRequests/SecondDaily Limit
Public10 req/s100,000/day
Registered50 req/s500,000/day
[!TIP] Register for a free API key at https://developer.lightchain.ai to increase your rate limits.
Pass the key via the
CodeHTML
header or as a query parameter.

Supported JSON-RPC Methods

Standard Ethereum Methods

All standard Ethereum JSON-RPC methods are supported. Commonly used methods include: Querying State
MethodDescription
CodeHTML
Returns the latest block number
CodeHTML
Returns the balance of an address
CodeHTML
Returns transaction details by hash
CodeHTML
Returns the receipt of a transaction
CodeHTML
Returns block details by number
CodeHTML
Returns block details by hash
CodeHTML
Returns the bytecode at an address
CodeHTML
Returns storage at a position
CodeHTML
Executes a read-only call
CodeHTML
Returns logs matching a filter
Sending Transactions
MethodDescription
CodeHTML
Submits a signed transaction
CodeHTML
Estimates the gas for a transaction
CodeHTML
Returns the current gas price
CodeHTML
Returns the nonce for an address
Subscriptions (WebSocket)
MethodDescription
CodeHTML
Subscribe to events (newHeads, logs)
CodeHTML
Unsubscribe from an event stream

Lightchain-Specific Methods

The following custom RPC methods are available for interacting with the PoI consensus and AIVM layers: AIVM Methods
MethodDescription
CodeHTML
Submit an AI inference task to the AIVM
CodeHTML
Retrieve the result of a completed inference task
CodeHTML
Check the status of a pending inference task
CodeHTML
List AI models available on the testnet AIVM
PoI Methods
MethodDescription
CodeHTML
Get information about a PoI validator
CodeHTML
Get compute contributions for a validator
CodeHTML
Get the current PoI epoch details
CodeHTML
Get reward distribution for a specific epoch

Example Requests

Get Latest Block Number

CodeBASH
Response:
CodeJSON

Get Account Balance

CodeBASH

Submit an AI Inference Task

CodeBASH
Response:
CodeJSON

Subscribe to New Blocks (WebSocket)

CodeJAVASCRIPT

Error Codes

CodeMessageDescription
CodeHTML
Invalid RequestMalformed JSON-RPC request
CodeHTML
Method Not FoundThe method does not exist
CodeHTML
Invalid ParamsInvalid method parameters
CodeHTML
Internal ErrorServer-side processing error
CodeHTML
Transaction UnderpricedGas price too low
CodeHTML
Nonce Too LowTransaction nonce already used
CodeHTML
Parse ErrorInvalid JSON payload

Health Check

Verify that the RPC endpoint is responding:
CodeBASH
Expected
CodeHTML
:
CodeHTML
(the chain ID as a string).

Resources


Last updated: February 2026