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

# eth_chainId

> Returns the `chainId` of the network the bundler is serving.



## OpenAPI

````yaml /paymaster-&-bundler/bundler-api-endpoints/erc4337/eth_chainId.json post /rpc/{chainId}
openapi: 3.1.0
info:
  title: eth_chainId
  version: 1.0.0
servers:
  - url: https://api.gelato.cloud
security: []
paths:
  /rpc/{chainId}:
    post:
      summary: eth_chainId
      description: Returns the `chainId` of the network the bundler is serving.
      parameters:
        - name: chainId
          in: path
          required: true
          schema:
            type: number
          description: Target network chain identifier.
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
          description: >-
            Gelato API key for higher rate limits. This must be provided if
            sponsoring off-chain via Gas Tank.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  schemas:
    Request:
      type: object
      properties:
        id:
          type: number
        jsonrpc:
          type: string
          default: '2.0'
        method:
          type: string
          default: eth_chainId
    Response:
      type: object
      properties:
        id:
          type: number
          default: 1
        jsonrpc:
          type: string
          default: '2.0'
        result:
          type: string
          default: '1'
          description: '`chainId`'

````