@@ -821,6 +821,161 @@ definitions:
821821 username :
822822 type : string
823823 type : object
824+ internal_transport_http_admin.UsageStatisticsMetricsResponse :
825+ properties :
826+ avgLatencyMS :
827+ type : integer
828+ billedNanousd :
829+ type : integer
830+ billedUSD :
831+ type : number
832+ cacheReadTokens :
833+ type : integer
834+ cacheWriteTokens :
835+ type : integer
836+ callCount :
837+ type : integer
838+ inputTokens :
839+ type : integer
840+ outputTokens :
841+ type : integer
842+ reasoningTokens :
843+ type : integer
844+ recordCount :
845+ type : integer
846+ totalTokens :
847+ type : integer
848+ type : object
849+ internal_transport_http_admin.UsageStatisticsModelRankResponse :
850+ properties :
851+ avgLatencyMS :
852+ type : integer
853+ billedNanousd :
854+ type : integer
855+ billedUSD :
856+ type : number
857+ cacheReadTokens :
858+ type : integer
859+ cacheWriteTokens :
860+ type : integer
861+ callCount :
862+ type : integer
863+ inputTokens :
864+ type : integer
865+ outputTokens :
866+ type : integer
867+ platformModelName :
868+ type : string
869+ reasoningTokens :
870+ type : integer
871+ recordCount :
872+ type : integer
873+ totalTokens :
874+ type : integer
875+ trend :
876+ items :
877+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsTrendResponse'
878+ type : array
879+ type : object
880+ internal_transport_http_admin.UsageStatisticsResponse :
881+ properties :
882+ range :
883+ properties :
884+ endDate :
885+ type : string
886+ granularity :
887+ type : string
888+ startDate :
889+ type : string
890+ type : object
891+ section :
892+ type : string
893+ topModels :
894+ items :
895+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsModelRankResponse'
896+ type : array
897+ topUsers :
898+ items :
899+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsUserRankResponse'
900+ type : array
901+ totals :
902+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsMetricsResponse'
903+ trend :
904+ items :
905+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsTrendResponse'
906+ type : array
907+ type : object
908+ internal_transport_http_admin.UsageStatisticsResponseDoc :
909+ properties :
910+ data :
911+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsResponse'
912+ errorMsg :
913+ type : string
914+ type : object
915+ internal_transport_http_admin.UsageStatisticsTrendResponse :
916+ properties :
917+ avgLatencyMS :
918+ type : integer
919+ billedNanousd :
920+ type : integer
921+ billedUSD :
922+ type : number
923+ cacheReadTokens :
924+ type : integer
925+ cacheWriteTokens :
926+ type : integer
927+ callCount :
928+ type : integer
929+ inputTokens :
930+ type : integer
931+ outputTokens :
932+ type : integer
933+ periodStart :
934+ type : string
935+ reasoningTokens :
936+ type : integer
937+ recordCount :
938+ type : integer
939+ totalTokens :
940+ type : integer
941+ type : object
942+ internal_transport_http_admin.UsageStatisticsUserRankResponse :
943+ properties :
944+ avgLatencyMS :
945+ type : integer
946+ billedNanousd :
947+ type : integer
948+ billedUSD :
949+ type : number
950+ cacheReadTokens :
951+ type : integer
952+ cacheWriteTokens :
953+ type : integer
954+ callCount :
955+ type : integer
956+ inputTokens :
957+ type : integer
958+ outputTokens :
959+ type : integer
960+ reasoningTokens :
961+ type : integer
962+ recordCount :
963+ type : integer
964+ totalTokens :
965+ type : integer
966+ trend :
967+ items :
968+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsTrendResponse'
969+ type : array
970+ userDisplayName :
971+ type : string
972+ userID :
973+ type : integer
974+ userLabel :
975+ type : string
976+ username :
977+ type : string
978+ type : object
824979 internal_transport_http_admin.UserAuthEventListResponseDoc :
825980 properties :
826981 data :
@@ -2120,6 +2275,48 @@ definitions:
21202275 unit :
21212276 type : string
21222277 type : object
2278+ internal_transport_http_billing.OpenRouterOfficialPricingDataResponse :
2279+ properties :
2280+ cached :
2281+ type : boolean
2282+ fetchedAt :
2283+ type : string
2284+ items :
2285+ items :
2286+ $ref : ' #/definitions/internal_transport_http_billing.OpenRouterOfficialPricingItemResponse'
2287+ type : array
2288+ stale :
2289+ type : boolean
2290+ type : object
2291+ internal_transport_http_billing.OpenRouterOfficialPricingItemResponse :
2292+ properties :
2293+ canonicalSlug :
2294+ type : string
2295+ id :
2296+ type : string
2297+ name :
2298+ type : string
2299+ pricing :
2300+ $ref : ' #/definitions/internal_transport_http_billing.OpenRouterOfficialPricingUnitPricingResponse'
2301+ type : object
2302+ internal_transport_http_billing.OpenRouterOfficialPricingResponseDoc :
2303+ properties :
2304+ data :
2305+ $ref : ' #/definitions/internal_transport_http_billing.OpenRouterOfficialPricingDataResponse'
2306+ errorMsg :
2307+ type : string
2308+ type : object
2309+ internal_transport_http_billing.OpenRouterOfficialPricingUnitPricingResponse :
2310+ properties :
2311+ completion :
2312+ type : string
2313+ inputCacheRead :
2314+ type : string
2315+ inputCacheWrite :
2316+ type : string
2317+ prompt :
2318+ type : string
2319+ type : object
21232320 internal_transport_http_billing.PatchRedemptionCodeRequestDoc :
21242321 properties :
21252322 description :
@@ -3031,6 +3228,7 @@ definitions:
30313228 - chat
30323229 - image_generation
30333230 - image_edit
3231+ - video_generation
30343232 type : string
30353233 type : object
30363234 internal_transport_http_channel.ModelProbeResponse :
@@ -5270,7 +5468,7 @@ info:
52705468 contact : {}
52715469 description : DEEIX Chat 后端 API 文档
52725470 title : DEEIX Chat API
5273- version : " 0.3.2"
5471+ version : 0.3.2
52745472paths :
52755473 /admin/announcements :
52765474 get :
@@ -5636,6 +5834,32 @@ paths:
56365834 summary : 管理员保存模型按量单价
56375835 tags :
56385836 - admin-billing
5837+ /admin/billing/official-pricing/openrouter :
5838+ get :
5839+ consumes :
5840+ - application/json
5841+ description : 从 storage 缓存读取 OpenRouter 模型定价;缓存不存在、过期或 refresh=true 时由后端刷新。
5842+ parameters :
5843+ - description : 强制刷新缓存
5844+ in : query
5845+ name : refresh
5846+ type : boolean
5847+ produces :
5848+ - application/json
5849+ responses :
5850+ " 200 " :
5851+ description : OK
5852+ schema :
5853+ $ref : ' #/definitions/internal_transport_http_billing.OpenRouterOfficialPricingResponseDoc'
5854+ " 502 " :
5855+ description : Bad Gateway
5856+ schema :
5857+ $ref : ' #/definitions/internal_transport_http_billing.ErrorDoc'
5858+ security :
5859+ - BearerAuth : []
5860+ summary : 管理员获取 OpenRouter 官方模型定价
5861+ tags :
5862+ - admin-billing
56395863 /admin/billing/plans/{id} :
56405864 patch :
56415865 consumes :
@@ -8385,6 +8609,72 @@ paths:
83858609 summary : 管理员查询系统事件
83868610 tags :
83878611 - admin
8612+ /admin/usage-statistics :
8613+ get :
8614+ consumes :
8615+ - application/json
8616+ description : 管理员按日期、统计对象、平台模型和计费范围查看全局费用、Token、调用次数及排名;用户与权限组筛选互斥
8617+ parameters :
8618+ - description : 开始日期(YYYY-MM-DD),默认近30天
8619+ in : query
8620+ name : start_date
8621+ type : string
8622+ - description : 结束日期(YYYY-MM-DD,包含当日)
8623+ in : query
8624+ name : end_date
8625+ type : string
8626+ - description : 用户ID
8627+ in : query
8628+ name : user_id
8629+ type : integer
8630+ - description : 权限组ID,与 user_id 互斥
8631+ in : query
8632+ name : permission_group_id
8633+ type : integer
8634+ - description : 平台模型名
8635+ in : query
8636+ name : platform_model_name
8637+ type : string
8638+ - description : 计费范围:all/free/billable
8639+ in : query
8640+ name : billing_scope
8641+ type : string
8642+ - description : 返回范围:all/models/users
8643+ in : query
8644+ name : section
8645+ type : string
8646+ - description : 模型排名指标:cost/tokens/calls
8647+ in : query
8648+ name : model_rank_by
8649+ type : string
8650+ - description : 用户排名指标:cost/tokens/calls
8651+ in : query
8652+ name : user_rank_by
8653+ type : string
8654+ produces :
8655+ - application/json
8656+ responses :
8657+ " 200 " :
8658+ description : OK
8659+ schema :
8660+ $ref : ' #/definitions/internal_transport_http_admin.UsageStatisticsResponseDoc'
8661+ " 400 " :
8662+ description : Bad Request
8663+ schema :
8664+ $ref : ' #/definitions/internal_transport_http_admin.ErrorDoc'
8665+ " 404 " :
8666+ description : Not Found
8667+ schema :
8668+ $ref : ' #/definitions/internal_transport_http_admin.ErrorDoc'
8669+ " 500 " :
8670+ description : Internal Server Error
8671+ schema :
8672+ $ref : ' #/definitions/internal_transport_http_admin.ErrorDoc'
8673+ security :
8674+ - BearerAuth : []
8675+ summary : 管理员查询全局用量统计
8676+ tags :
8677+ - admin
83888678 /admin/user-auth-events :
83898679 get :
83908680 consumes :
@@ -10483,6 +10773,25 @@ paths:
1048310773 summary : 查询新会话默认模型候选
1048410774 tags :
1048510775 - chat
10776+ /conversations/export :
10777+ get :
10778+ description : 流式导出当前用户全部会话及消息为 NDJSON 文件
10779+ produces :
10780+ - application/x-ndjson
10781+ responses :
10782+ " 200 " :
10783+ description : NDJSON stream
10784+ schema :
10785+ type : string
10786+ " 500 " :
10787+ description : Internal Server Error
10788+ schema :
10789+ $ref : ' #/definitions/internal_transport_http_conversation.ErrorDoc'
10790+ security :
10791+ - BearerAuth : []
10792+ summary : 导出当前用户全部对话
10793+ tags :
10794+ - chat
1048610795 /conversations/project :
1048710796 post :
1048810797 consumes :
0 commit comments