Skip to content

API overview

The TronGasAi API is a versioned REST API. Authenticate with an API key and drive the same actions available in the dashboard: pricing, balance, orders, automations and webhooks.

https://trongas.ai/api/v1
  • Auth — send your key as the X-Api-Key header. See Authentication.
  • Money — amounts are strings in TRX (e.g. "5.502"), never floats.
  • Errors — RFC 7807 application/problem+json with a machine-readable code. See Errors.
  • Idempotency — money-moving requests (creating an order) take an Idempotency-Key header; retrying with the same key returns the original result instead of charging twice.

Every endpoint is documented under Endpoints in the sidebar, grouped by area:

  • Pricing and Rate — public, no key required.
  • Wallet — balance, deposit address, ledger history.
  • Orders — preview and buy energy or bandwidth.
  • Automations — auto-refill, auto-renewal and smart rules.
  • Webhooks — register endpoints and inspect deliveries.
  • Notifications — in-app events for your account.

Those pages are generated from our OpenAPI description, which is produced by the API’s own build — so they describe the API that is actually deployed, not a copy of it that someone remembered to update. The description itself is available if you want to generate a client:

https://docs.trongas.ai/openapi/trongas.json

Issue a key in the dashboard under Settings → API keys. Pick the narrowest scope that does the job and set a daily spend limit — especially if an AI agent will hold the key. See Authentication.