---
title: "Get all logs"
method: GET
path: "/api/logs/"
tags: ["logs"]
---

# Get all logs

`GET /api/logs/`

Returns a paginated list of all logs with optional filters

## Query parameters

- `page` integer
- `per_page` integer
- `start_timestamp` integer
- `end_timestamp` integer
- `model_name` string
- `channel` integer
- `order` string
- `request_id` string
- `upstream_id` string
- `code_type` string
- `code` integer
- `include_detail` boolean
- `ip` string
- `user` string

## Response `200`

OK

- object
  - `data` ModelGetLogsResult
    - `channels` integer[]
    - `logs` ModelLog[]
      - `amount` ModelAmount
        - `audio_input_amount` number
        - `audio_output_amount` number
        - `cache_creation_amount` number
        - `cached_amount` number
        - `image_input_amount` number
        - `image_output_amount` number
        - `input_amount` number
        - `output_amount` number
        - `used_amount` number
        - `video_input_amount` number
        - `web_search_amount` number
      - `async_usage_status` 0 | 1 | 2 | 3
      - `channel` integer
      - `code` integer
      - `content` string
      - `created_at` string
      - `endpoint` string
      - `group` string
      - `id` integer
      - `ip` string
      - `metadata` object
      - `mode` integer
      - `model` string
      - `price` ModelPrice
        - `audio_input_price` number
        - `audio_input_price_unit` integer
        - `audio_output_price` number
        - `audio_output_price_unit` integer
        - `cache_creation_price` number
        - `cache_creation_price_unit` integer
        - `cached_price` number
        - `cached_price_unit` integer
        - `conditional_prices` ModelConditionalPrice[]
          - `condition` ModelPriceCondition
            - `end_time` integer — Unix timestamp, 0 means no end limit
            - `input_token_max` integer
            - `input_token_min` integer
            - `output_token_max` integer
            - `output_token_min` integer
            - `quality` string[]
            - `resolution` string[]
            - `service_tier` string
            - `start_time` integer — Unix timestamp, 0 means no start limit
          - `price` ModelPrice — recursive
        - `image_input_price` number
        - `image_input_price_unit` integer
        - `image_output_price` number
        - `image_output_price_unit` integer
        - `input_price` number
        - `input_price_unit` integer
        - `output_price` number
        - `output_price_unit` integer
        - `per_request_price` number
        - `thinking_mode_output_price` number — when ThinkingModeOutputPrice and ReasoningTokens are not 0, OutputPrice and OutputPriceUnit will be overwritten
        - `thinking_mode_output_price_unit` integer
        - `video_input_price` number
        - `video_input_price_unit` integer
        - `web_search_price` number
        - `web_search_price_unit` integer
      - `prompt_cache_key` string
      - `request_at` string
      - `request_detail` ModelRequestDetail
        - `id` integer
        - `log_id` integer
        - `request_body` string
        - `request_body_truncated` boolean
        - `response_body` string
        - `response_body_truncated` boolean
      - `request_id` string
      - `retry_at` string
      - `retry_times` integer
      - `service_tier` string
      - `token_id` integer
      - `token_name` string
      - `ttfb_milliseconds` integer
      - `upstream_id` string
      - `usage` ModelUsage
        - `audio_input_tokens` integer
        - `audio_output_tokens` integer
        - `cache_creation_tokens` integer
        - `cached_tokens` integer
        - `image_input_tokens` integer
        - `image_output_tokens` integer
        - `input_tokens` integer
        - `output_tokens` integer
        - `reasoning_tokens` integer
        - `total_tokens` integer
        - `video_input_tokens` integer
        - `web_search_count` integer
      - `usage_context` ModelUsageContext
        - `quality` string
        - `resolution` string
        - `native_resolution` string
        - `service_tier` string
        - `input_video` boolean
        - `output_audio` boolean
      - `user` string — https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids
    - `models` string[]
    - `total` integer
  - `message` string
  - `success` boolean

---

[API](https://skmtc.net/labring/apis/ai-proxy-swagger-api.md) · [All operations](https://skmtc.net/labring/apis/ai-proxy-swagger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labring/ai-proxy-swagger-api/versions/e471487f2a2f/schema)
