Log Query
Interface module
Log Query
Paginated query for API call logs, consumption logs, top-up logs, and more
GET
Log Query
Paginated query for call, consumption, top-up, admin, error, refund, and test-credit logs within the scope of the current credential.
Endpoint
- HTTP method:
GET - URL:
https://maas.gravitex.ai/prod-api/api/logs/v2/page - Auth header:
Authorization - Language header:
Accept-Language; supportszh-CN,en-US - Time format:
yyyy-MM-dd HH:mm:ss - Max time range: 31 days
- Default pagination:
page=1,pageSize=30 - Max page size: 1000
Authentication
All of the following formats are supported:Query parameters
integer
default:"1"
Page number; values ≤ 0 are treated as 1
integer
default:"30"
Page size; values ≤ 0 are treated as 30; max 1000
string
API key name. Fuzzy match when authenticated with a system access token; unavailable for API key auth — the server always returns logs for the current API key only
string
Model name, exact match; comma-separated for multiple models
string
Request ID, exact match
string
Request IP, exact match
integer
Minimum duration in seconds, inclusive
integer
Maximum duration in seconds, inclusive
string
Start time, format
yyyy-MM-dd HH:mm:ss, inclusivestring
End time, format
yyyy-MM-dd HH:mm:ss, inclusivestring
Log types, comma-separated; allowed values:
1,2,3,5,6,8Log types
Accept-Language
Affects onlybillingProcessText:
Request examples
- curl
- JavaScript
- Python
Response structure
quotaDollar is returned as a decimal string. Use Decimal/BigDecimal; avoid binary floating-point.Response fields
Error responses
- Empty key
- Invalid or disabled key
- Invalid time format
- Range exceeds 31 days
Recommendations
- Store access tokens or API keys securely on the server; never log full keys.
- Prefer a time range of at most 31 days.
- Read
data.totalwhen paging — do not treat it as a page count. - Check response body
code; do not rely on HTTP 200 alone. - Handle amounts with Decimal/BigDecimal; do not recompute with binary floats.
