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

# Consultar Saldo

> Consulta o saldo de um usuário da proxy.

Retorna o saldo disponível, total, usado e a quantidade de threads em uso do usuário da proxy informado.

## Headers

<ParamField header="X-API-Key" type="string" required>
  Sua chave de API no formato `gm_SUA_CHAVE`.
</ParamField>

## Body

<ParamField body="user_id" type="string" required>
  ID do usuário  da proxy a ser consultado.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.gmproxys.com/v1/balance \
    -H "X-API-Key: gm_SUA_CHAVE" \
    -H "Content-Type: application/json" \
    -d '{
      "user_id": "3627"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.gmproxys.com/v1/balance", {
    method: "GET",
    headers: {
      "X-API-Key": "gm_SUA_CHAVE",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      user_id: "3627",
    }),
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.gmproxys.com/v1/balance",
      headers={
          "X-API-Key": "gm_SUA_CHAVE",
          "Content-Type": "application/json",
      },
      json={"user_id": "3627"},
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "balance": 12900079458,
    "balance_format": "12.01 GB",
    "balance_total": 214748364800,
    "balance_total_format": "200 GB",
    "balance_used": 201848285342,
    "balance_used_format": "187.99 GB",
    "threads_used": 320
  }
  ```

  ```json 401 Token inválido theme={null}
  {
    "success": false,
    "message": "Invalid API token."
  }
  ```

  ```json 404 Proxy inexistente theme={null}
  {
    "success": false,
    "message": "Proxy user not found."
  }
  ```
</ResponseExample>
