> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# net_version | Tempo

> Tempo API method that returns the current network ID. The Tempo mainnet network ID is 4217. The Moderato testnet network ID is 42431.

Tempo API method that returns the current network ID. The Tempo mainnet network ID is `4217`. The Moderato testnet network ID is `42431`.

## Parameters

* `none`

## Response

* `result` — the network ID as a string (`4217` for Tempo mainnet, `42431` for Moderato testnet)

## `net_version` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  async function getNetworkId() {
    const network = await provider.getNetwork();
    console.log(`Network ID: ${network.chainId}`);
  }

  getNetworkId()
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"
  web3 = Web3(Web3.HTTPProvider(node_url))
  print(web3.net.version)
  ```

  ```bash cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/tempo_node_api/client_info/net_version.json POST /
openapi: 3.0.0
info:
  title: net_version Tempo example
  version: 1.0.0
  description: This is an API example for net_version for Tempo.
servers:
  - url: https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf
security: []
paths:
  /:
    post:
      tags:
        - Client info
      summary: net_version
      operationId: tempo-net-version
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: net_version
                params:
                  type: array
                  items: {}
                  default: []
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The network ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
                    description: The network ID (42431 for Tempo Moderato testnet)

````