Export My Usage Logs
curl --request GET \
--url https://omnimux.ai/api/log/self/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://omnimux.ai/api/log/self/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnimux.ai/api/log/self/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://omnimux.ai/api/log/self/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{"id":1,"user_id":42,"created_at":1791979200,"type":2,"content":"","username":"example-user","token_name":"example-key","model_name":"","quota":500,"prompt_tokens":10,"completion_tokens":5,"use_time":1,"is_stream":false,"channel":0,"channel_name":"","token_id":1,"group":"","ip":"","request_id":"example-request-id","other":"{}"}
{"success":true,"message":"","data":{"count":1}}
{
"success": false,
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid user credential"
}
{
"success": false,
"code": "ACCESS_TOKEN_SCOPE_DENIED",
"message": "Permission denied"
}
{
"success": false,
"code": "AUTH_INTERNAL_ERROR",
"message": "Internal authentication error"
}
Account info
Export My Usage Logs
Stream the authenticated user’s visible logs; verify the terminal success record.
GET
/
api
/
log
/
self
/
export
Export My Usage Logs
curl --request GET \
--url https://omnimux.ai/api/log/self/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://omnimux.ai/api/log/self/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://omnimux.ai/api/log/self/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://omnimux.ai/api/log/self/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{"id":1,"user_id":42,"created_at":1791979200,"type":2,"content":"","username":"example-user","token_name":"example-key","model_name":"","quota":500,"prompt_tokens":10,"completion_tokens":5,"use_time":1,"is_stream":false,"channel":0,"channel_name":"","token_id":1,"group":"","ip":"","request_id":"example-request-id","other":"{}"}
{"success":true,"message":"","data":{"count":1}}
{
"success": false,
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid user credential"
}
{
"success": false,
"code": "ACCESS_TOKEN_SCOPE_DENIED",
"message": "Permission denied"
}
{
"success": false,
"code": "AUTH_INTERNAL_ERROR",
"message": "Internal authentication error"
}
- This account-management user API accepts a permitted user access token or dashboard login session; an
sk-generation key is not accepted. Personal access tokens requireusage:read; see Security and keys. - It exports only the authenticated account’s own visible logs, under the same visibility rules as that account’s log list. Supplying another username or channel filter does not grant other users’ records.
- The operator controls regular-user export availability. Each account can run one export at a time. Business rejections such as a busy export, excessive time span or disabled export can still return HTTP 200; read
success.
Confirming a complete export
A successful stream usesapplication/x-ndjson, with one log object per line and a terminal result object, for example {"success":true,"message":"","data":{"count":1}}. The count excludes the result object. No matching records still produces a successful count of 0.
Treat the export as complete only after reading terminal success: true and verifying that the record count matches data.count. A later failure can end the stream with success: false. A disconnection, cancellation or missing terminal result leaves a partial export. HTTP 200 or a few records alone do not establish completion.
Time span and record fields
The operator sets the maximum span, defaulting to 365 days. Negative timestamps, a start after the effective end, invalid search patterns, and an excessive span are rejected before streaming; divide a longer interval into permitted ranges. This does not set retention or delete logs. An omitted start reaches back the maximum range from the effective end; an omitted end uses now. Records follow the own-account list order.id is an export-local display position, not a database row ID or a cursor for incremental synchronization. quota is raw internal quota: quota ÷ 500000 = USD, 1 USD = 10 积分; do not label the raw number as points. Internal administrative information retains the own-account list’s visibility rules.
This read operation does not generate content or incur generation charges. Cross-account administrator exports are outside this contract.
{"id":1,"user_id":42,"created_at":1791979200,"type":2,"content":"","username":"example-user","token_name":"example-key","model_name":"","quota":500,"prompt_tokens":10,"completion_tokens":5,"use_time":1,"is_stream":false,"channel":0,"channel_name":"","token_id":1,"group":"","ip":"","request_id":"example-request-id","other":"{}"}
{"success":true,"message":"","data":{"count":1}}
{
"success": false,
"code": "AUTH_UNAUTHORIZED",
"message": "Invalid user credential"
}
{
"success": false,
"code": "ACCESS_TOKEN_SCOPE_DENIED",
"message": "Permission denied"
}
{
"success": false,
"code": "AUTH_INTERNAL_ERROR",
"message": "Internal authentication error"
}
Authorizations
Query Parameters
Response
Export stream, or a business rejection before streaming. HTTP 200 alone does not prove completion.
One log object per line; the last line is a success/message/data.count result. A later failure can emit success:false; a missing terminal result also means incomplete export.