openapi.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /api/log/{group}/search
  2. 描述信息:获取 组级别 log 数据
  3. 方法:get
  4. 参数:
  5. query
  6. page 页码 number
  7. per_page 每页条数 number
  8. model_name model name string
  9. token_name token name string
  10. start_timestamp 开始时间 timestamp 毫秒级别时间戳
  11. end_timestamp 结束时间 timestamp 毫秒级别时间戳
  12. code_type 状态 'all' | 'success' | 'error' string
  13. 响应结构:
  14. {
  15. "data": {
  16. "channels": [
  17. 0
  18. ],
  19. "logs": [
  20. {
  21. "channel": 0,
  22. "code": 0,
  23. "content": "string",
  24. "created_at": "string",
  25. "endpoint": "string",
  26. "group": "string",
  27. "id": 0,
  28. "ip": "string",
  29. "metadata": {
  30. "additionalProp1": "string",
  31. "additionalProp2": "string",
  32. "additionalProp3": "string"
  33. },
  34. "mode": 0,
  35. "model": "string",
  36. "price": {
  37. "cache_creation_price": 0,
  38. "cache_creation_price_unit": 0,
  39. "cached_price": 0,
  40. "cached_price_unit": 0,
  41. "image_input_price": 0,
  42. "image_input_price_unit": 0,
  43. "input_price": 0,
  44. "input_price_unit": 0,
  45. "output_price": 0,
  46. "output_price_unit": 0,
  47. "per_request_price": 0,
  48. "thinking_mode_output_price": 0,
  49. "thinking_mode_output_price_unit": 0,
  50. "web_search_price": 0,
  51. "web_search_price_unit": 0
  52. },
  53. "request_at": "string",
  54. "request_detail": {
  55. "id": 0,
  56. "log_id": 0,
  57. "request_body": "string",
  58. "request_body_truncated": true,
  59. "response_body": "string",
  60. "response_body_truncated": true
  61. },
  62. "request_id": "string",
  63. "retry_at": "string",
  64. "retry_times": 0,
  65. "token_id": 0,
  66. "token_name": "string",
  67. "ttfb_milliseconds": 0,
  68. "usage": {
  69. "cache_creation_tokens": 0,
  70. "cached_tokens": 0,
  71. "image_input_tokens": 0,
  72. "input_tokens": 0,
  73. "output_tokens": 0,
  74. "reasoning_tokens": 0,
  75. "total_tokens": 0,
  76. "web_search_count": 0
  77. },
  78. "used_amount": 0,
  79. "user": "string"
  80. }
  81. ],
  82. "models": [
  83. "string"
  84. ],
  85. "token_names": [
  86. "string"
  87. ],
  88. "total": 0
  89. },
  90. "message": "string",
  91. "success": true
  92. }
  93. ---
  94. /api/logs/search
  95. 描述信息:获取 全部 log 数据
  96. 方法:get
  97. 参数:
  98. query
  99. page 页码 number
  100. per_page 每页条数 number
  101. model_name model name string
  102. start_timestamp 开始时间 timestamp 毫秒级别时间戳
  103. end_timestamp 结束时间 timestamp 毫秒级别时间戳
  104. code_type 状态 'all' | 'success' | 'error' string
  105. 响应结构:
  106. {
  107. "data": {
  108. "channels": [
  109. 0
  110. ],
  111. "logs": [
  112. {
  113. "channel": 0,
  114. "code": 0,
  115. "content": "string",
  116. "created_at": "string",
  117. "endpoint": "string",
  118. "group": "string",
  119. "id": 0,
  120. "ip": "string",
  121. "metadata": {
  122. "additionalProp1": "string",
  123. "additionalProp2": "string",
  124. "additionalProp3": "string"
  125. },
  126. "mode": 0,
  127. "model": "string",
  128. "price": {
  129. "cache_creation_price": 0,
  130. "cache_creation_price_unit": 0,
  131. "cached_price": 0,
  132. "cached_price_unit": 0,
  133. "image_input_price": 0,
  134. "image_input_price_unit": 0,
  135. "input_price": 0,
  136. "input_price_unit": 0,
  137. "output_price": 0,
  138. "output_price_unit": 0,
  139. "per_request_price": 0,
  140. "thinking_mode_output_price": 0,
  141. "thinking_mode_output_price_unit": 0,
  142. "web_search_price": 0,
  143. "web_search_price_unit": 0
  144. },
  145. "request_at": "string",
  146. "request_detail": {
  147. "id": 0,
  148. "log_id": 0,
  149. "request_body": "string",
  150. "request_body_truncated": true,
  151. "response_body": "string",
  152. "response_body_truncated": true
  153. },
  154. "request_id": "string",
  155. "retry_at": "string",
  156. "retry_times": 0,
  157. "token_id": 0,
  158. "token_name": "string",
  159. "ttfb_milliseconds": 0,
  160. "usage": {
  161. "cache_creation_tokens": 0,
  162. "cached_tokens": 0,
  163. "image_input_tokens": 0,
  164. "input_tokens": 0,
  165. "output_tokens": 0,
  166. "reasoning_tokens": 0,
  167. "total_tokens": 0,
  168. "web_search_count": 0
  169. },
  170. "used_amount": 0,
  171. "user": "string"
  172. }
  173. ],
  174. "total": 0
  175. },
  176. "message": "string",
  177. "success": true
  178. }