Skip to content

How to Check Billings

View your billing history and transaction records.

Endpoint

GET https://api.get3w.com/api/v3/billings

Request

bash
curl "https://api.get3w.com/api/v3/billings" \
  -H "Authorization: Bearer YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.get3w.com/api/v3/billings",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

data = response.json()["data"]
for record in data["records"]:
    print(f"{record['date']}: ${record['amount']} - {record['type']}")

Response

json
{
  "code": 200,
  "message": "success",
  "data": {
    "records": [
      {
        "id": "bill_001",
        "date": "2024-01-15",
        "type": "top-up",
        "amount": 100.00,
        "balance_after": 142.50
      },
      {
        "id": "bill_002",
        "date": "2024-01-15",
        "type": "usage",
        "amount": -0.03,
        "model": "get3w/flux-dev",
        "task_id": "pred_abc123",
        "balance_after": 142.47
      }
    ],
    "total": 50,
    "page": 1,
    "per_page": 20
  }
}

Query Parameters

ParameterTypeDescriptionDefault
pageintegerPage number1
per_pageintegerRecords per page20
typestringFilter: top-up or usageall

Next Steps

Released under the MIT License.