> ## 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.

# Get tokens

> Chainstack API method to request testnet funds from the Chainstack faucet for Ethereum, BNB Smart Chain, Polygon, Base, Solana, TON, and other supported test networks.

Chainstack API method to request testnet funds. Developers use testnet funds for various purposes, primarily to test and develop decentralized applications (DApps), smart contracts, and other blockchain-based projects within a safe and controlled environment.

<Note>
  You can also request funds directly from the [Chainstack Faucet](https://faucet.chainstack.com) page.
</Note>

## Path parameters

* `chain` — the test network you want to receive funds on.
  * `sepolia` — receive testnet ETH on Ethereum Sepolia.
  * `hoodi` — receive testnet ETH on Ethereum Hoodi.
  * `bnb-testnet` — receive testnet BNB on BNB Smart Chain testnet.
  * `amoy` — receive testnet POL on Polygon Amoy.
  * `zksync-testnet` — receive testnet ETH on ZKsync Sepolia.
  * `base` — receive testnet ETH on Base Sepolia.
  * `hyperevm` — receive testnet HYPE on Hyperliquid testnet.
  * `robinhood` — receive testnet ETH on Robinhood Chain testnet.
  * `monad` — receive testnet MON on Monad testnet.
  * `plasma` — receive testnet XPL on Plasma testnet.
  * `solana` — receive SOL on Solana devnet.
  * `ton` — receive TON on TON testnet.

<Warning>
  **Spam protection system**

  To safeguard against misuse, the Chainstack faucet implements two key checks before disbursing funds:

  1. The requesting address must have a minimum balance of 0.08 ETH on the Ethereum mainnet.
  2. The address should have a history of holding ETH on the mainnet; it should not have been recently empty.

  These checks apply to the EVM networks. A `solana` request checks the address's balance on Solana mainnet instead, and a `ton` request has no mainnet check.

  These precautions help us maintain the integrity of the Chainstack faucet, ensuring fair and equitable access for all users.
</Warning>

<Note>
  **Faucet API base URL**

  `https://api.chainstack.com/v1/faucet/{chain}`
</Note>

## Body parameters

* `address` — the address that will receive the funds.

## Response

* `url`— the block explorer URL, including the transaction hash, to monitor the status.

## Request funds from this page

You can already try this API from this page by doing the following:

1. [Get your API key](/reference/platform-api-getting-started#create-api-key) and paste it into the **Bearer** field in the **AUTHENTICATION** section.
2. At the bottom of the page, select which network you want to receive funds from.
3. At the bottom of the page, paste your Ethereum address in the **address** field.

## Code examples

The Faucet API is a great option for developers who don't want to spend time hunting for testnet tokens.

Here's an example of a script that automatically refills your wallet by calling the Chainstack Faucet API every 24 hours, ensuring a seamless daily refill.

<CodeGroup>
  ```javascript JavaScript theme={"system"}
  // npm i axios

  const axios = require('axios');

  // API config
  const chain = 'sepolia' // hoodi
  const address = 'YOUR_ADDRESS';

  const apiUrl = `https://api.chainstack.com/v1/faucet/${chain}`;
  const apiKey = 'YOUR_CHAINSTACK_API_KEY';

  const fillWallet = async () => {
      console.log(`Sending faucet request for address ${address}`)
    try {
      const response = await axios.post(apiUrl, { address }, {
        headers: {
          'Authorization': `Bearer ${apiKey}`,
          'Content-Type': 'application/json',
        },
      });

      console.log('API call successful:', response.data);
    } catch (error) {
      console.error('Error making API call:', error.response.data);
    }

    // Schedule the next API call in 24 hours (24 * 60 * 60 * 1000 milliseconds)
    setTimeout(makeApiCall, 24 * 60 * 60 * 1000);
  };

  // Make the first API call immediately
  fillWallet();
  ```

  ```python Python theme={"system"}
  # pip install requests

  import requests
  import time

  # API config
  chain = 'sepolia'  # hoodi
  address = 'YOUR_ADDRESS'

  api_url = f'https://api.chainstack.com/v1/faucet/{chain}'
  api_key = 'YOUR_CHAINSTACK_API_KEY'


  def fill_wallet():
      print(f'Sending faucet request for address {address}')
      try:
          response = requests.post(
              api_url,
              json={'address': address},
              headers={
                  'Authorization': f'Bearer {api_key}',
                  'Content-Type': 'application/json',
              },
          )

          print('API call successful:', response.json())
      except Exception as error:
          print('Error making API call:', error)

      # Schedule the next API call in 24 hours (24 * 60 * 60 seconds)
      time.sleep(24 * 60 * 60)


  # Make the first API call immediately
  while True:
      fill_wallet()
  ```
</CodeGroup>

## Use cases

Here are some use cases testnet funds are used for:

* Smart contract development — with testnet funds, developers can deploy and interact with smart contracts, finding and fixing any issues before moving to the mainnet, where the real money is involved.
* Testing DApps and infrastructure — testnet funds allow developers to try out transactions, see how user interfaces work, and check the overall functionality of their DApps and blockchain components without risking real assets.
* Trying out new features — testnets are perfect for exploring and testing new features or updates to blockchain protocols and applications. It's like a sandbox where developers can play around and validate their ideas before taking them live on the mainnet.
* Stress testing and scalability — developers use testnet funds to put their DApps or smart contracts through the wringer, seeing how they perform under various conditions and loads. This helps them spot any issues and fix them before going live.
* Learning and training — testnet funds create a risk-free space for developers, researchers, and enthusiasts to learn about blockchain technology, smart contracts, and DApps. It's a great way to build expertise and understanding in the field.


## OpenAPI

````yaml openapi/faucet_api/get_tokens.json POST /v1/faucet/{chain}
openapi: 3.0.0
info:
  title: Faucet API
  version: 1.0.0
  description: This is an API for interacting with the Chainstack Faucet.
servers:
  - url: https://api.chainstack.com
security: []
paths:
  /v1/faucet/{chain}:
    post:
      tags:
        - faucet
      summary: Request funds
      operationId: requestFunds
      parameters:
        - name: chain
          in: path
          description: The test network to receive funds on.
          required: true
          schema:
            type: string
            enum:
              - sepolia
              - hoodi
              - bnb-testnet
              - amoy
              - zksync-testnet
              - base
              - hyperevm
              - robinhood
              - monad
              - plasma
              - solana
              - ton
            default: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: string
                  description: The recipient address.
                  example: '0x06f0aB63eD883C61b9e4447fCbD9603dfC189662'
      responses:
        '200':
          description: Funds successfully sent.
        '400':
          description: Address is not valid.
        '401':
          description: Unauthorized access, invalid API key.
        '429':
          description: Too many requests or balance exceeded.
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````