Skip to main content

Documentation Index

Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt

Use this file to discover all available pages before exploring further.

Use these endpoints to retrieve a record of every API request made under your account, filter by model or time range, and pull aggregated usage statistics.
The /api/log/self and /api/log/self/stat endpoints require User permission. The /api/log/ endpoint requires Admin permission. The /api/data/self statistics endpoint requires User permission. Authenticate with a system access token from Personal Settings → Security Settings → System Access Tokens.

Endpoints

MethodPathPermissionDescription
GET/api/log/selfUserGet your own request logs
GET/api/log/self/statUserGet your own usage statistics
GET/api/log/AdminGet all request logs
GET/api/data/selfUserGet aggregated quota statistics

Get your own logs

GET /api/log/self
Returns a paginated list of API request logs for the authenticated user. You can filter by log type, time range, model, and channel.

Query parameters

p
integer
Page number (1-indexed). Defaults to 1.
page_size
integer
Number of log entries to return per page. Defaults to 10.
type
integer
Filter by log type. Common values:
  • 1 — chat completion
  • 2 — embedding
  • 3 — image generation
start_timestamp
integer
Filter logs from this Unix timestamp (seconds, inclusive).
end_timestamp
integer
Filter logs up to this Unix timestamp (seconds, inclusive).
model_name
string
Filter by model identifier, for example gpt-4o or claude-3-5-sonnet.
channel
integer
Filter by the numeric channel ID that served the request.

Example

curl -X GET "https://YOUR_NEWAPI_BASE_URL/api/log/self?p=1&page_size=50&model_name=gpt-4o&start_timestamp=1700000000" \
  -H "Authorization: Bearer your-access-token"

Response fields

success
boolean
Whether the request succeeded.
data
object
Paginated result container.

Get your own usage statistics

GET /api/log/self/stat
Returns aggregated usage statistics for the authenticated user, summarizing totals for tokens consumed and quota spent.

Example

curl -X GET "https://YOUR_NEWAPI_BASE_URL/api/log/self/stat" \
  -H "Authorization: Bearer your-access-token"

Response fields

success
boolean
Whether the request succeeded.
data
object
Aggregated statistics.

Get all logs (Admin)

GET /api/log/
Requires Admin permission. Returns logs for all users on the instance, not just the authenticated user.
Returns a paginated list of all API request logs across the entire instance. Accepts the same query parameters as get your own logs.

Query parameters

p
integer
Page number (1-indexed). Defaults to 1.
page_size
integer
Number of log entries to return per page. Defaults to 10.
type
integer
Filter by log type.
start_timestamp
integer
Filter logs from this Unix timestamp (seconds, inclusive).
end_timestamp
integer
Filter logs up to this Unix timestamp (seconds, inclusive).
model_name
string
Filter by model identifier.
channel
integer
Filter by the numeric channel ID.

Example

curl -X GET "https://YOUR_NEWAPI_BASE_URL/api/log/?p=1&page_size=100&model_name=gpt-4o" \
  -H "Authorization: Bearer your-access-token"

Get aggregated quota statistics

GET /api/data/self
Returns aggregated quota consumption data for the authenticated user, suitable for building usage dashboards and charts.

Example

curl -X GET "https://YOUR_NEWAPI_BASE_URL/api/data/self" \
  -H "Authorization: Bearer your-access-token"

Response fields

success
boolean
Whether the request succeeded.
data
object[]
Array of data points, each representing a time period.