Project Billing

Read project usage and organization balance, top-up, and pricing data.

The billing endpoints are read-only. They return balance, usage, top-up history, and current pricing through the same project-scoped API key used by the GPU endpoints.

Data scope

EndpointScope
GET /billing/balanceOrganization associated with the project
GET /billing/usageProject only
GET /billing/top-upsOrganization associated with the project
GET /billing/pricingCurrent shared price tables

Balance

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/billing/balance"
{
  "status": "success",
  "body": {
    "environment": "prod",
    "scope": "organization",
    "currency": "USD",
    "credit_balance": 12345,
    "balance_usd": 123.45
  }
}

Credits use the platform's cent-based accounting unit. balance_usd is the converted display value. If the organization does not have a recorded balance yet, the endpoint returns a zero balance.

Project usage

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/billing/usage?start_date=2026-08-01&end_date=2026-08-04"

Dates are inclusive UTC calendar dates in YYYY-MM-DD format. The default is the most recent seven UTC dates, and the maximum range is 366 days.

The response contains total_credits, total_amount_usd, usage grouped by category, and daily records. The project ID is enforced from the authenticated URL, so a project key cannot request sibling-project usage.

Top-up history

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/billing/top-ups?page=1&number=20"

page is one-based and number is limited to 100. Top-ups are organization-scoped because projects in an organization share funds. Sensitive account and payment-provider details are not included in the response.

Pricing

curl -sS \
  -H "x-api-key: ${TEC_API_KEY}" \
  "${TEC_BASE_URL}/v1/projects/${TEC_PROJECT_ID}/billing/pricing"

The response includes current chatbot, storage, and on-demand inference price tables. Hosted and community GPU hourly prices are returned by GPU Resources.

Common responses

ConditionHTTP status
Invalid date or pagination400 Bad Request
Missing API key401 Unauthorized
Invalid key or project mismatch403 Forbidden

Did this page help you?