Skip to main content
GET
/
usage
/
overview
AI Gateway usage overview
curl --request GET \
  --url https://api.ngrok.ai/usage/overview \
  --header 'Authorization: Bearer <token>'
{
  "uri": "<string>",
  "buckets": [
    {
      "bucketStart": "2023-11-07T05:31:56Z",
      "groupKey": "<string>",
      "cost": "<string>",
      "requests": 123,
      "errors": 123
    }
  ],
  "totals": {
    "cost": "<string>",
    "requests": 123,
    "errors": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

startTime
string<date-time>
required

Start of the window as an RFC3339 timestamp. Inclusive.

endTime
string<date-time>

End of the window as an RFC3339 timestamp. Defaults to now.

groupBy
enum<string>
default:provider

Dimension to break the series down by. Defaults to provider.

Available options:
provider,
accessKey

Response

The usage overview series and window totals.

uri
string
required

URI of this overview resource.

buckets
object[]
required

Daily series ordered by day then group key.

totals
object
required