Skip to main content
Alchemy provides reliable JSON-RPC endpoints for the Injective EVM. Use this guide to create an Alchemy app and start making requests.
Injective + Alchemy quick start (1 min) - YouTube

Prerequisites

  • An Alchemy account (sign up free)
  • Basic familiarity with EVM RPC endpoints

Steps

1

Create an app

From the Alchemy dashboard, create a new app and select Injective as the chain. Choose the network:
  • Injective EVM Mainnet: Chain ID 1776
  • Injective EVM Testnet: Chain ID 1439
2

Copy your RPC endpoints

Open your app and copy the HTTPS and WebSocket endpoints:
https://inj-mainnet.g.alchemy.com/v2/<YOUR_API_KEY>
wss://inj-mainnet.g.alchemy.com/v2/<YOUR_API_KEY>
https://inj-testnet.g.alchemy.com/v2/<YOUR_API_KEY>
wss://inj-testnet.g.alchemy.com/v2/<YOUR_API_KEY>
Keep your API key private, treat it like a password.
3

Start building

Use the endpoint with your preferred library:
import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider(
  "https://inj-mainnet.g.alchemy.com/v2/<YOUR_API_KEY>"
);

const blockNumber = await provider.getBlockNumber();
console.log("Latest block:", blockNumber);
import { createPublicClient, http } from "viem";
import { defineChain } from "viem";

const injectiveEVM = defineChain({
  id: 1776,
  name: "Injective EVM",
  nativeCurrency: { name: "Injective", symbol: "INJ", decimals: 18 },
  rpcUrls: {
    default: { http: ["https://inj-mainnet.g.alchemy.com/v2/<YOUR_API_KEY>"] },
  },
});

const client = createPublicClient({
  chain: injectiveEVM,
  transport: http(),
});

const blockNumber = await client.getBlockNumber();
console.log("Latest block:", blockNumber);
curl https://inj-mainnet.g.alchemy.com/v2/<YOUR_API_KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Next steps

Last modified on July 9, 2026