Request Logs
ShuYou provides a comprehensive logging system to help you monitor and analyze all API call records in real time. With logging, you can review detailed information for each request—including token usage, cost, performance metrics, and more—so you can better optimize your application and control costs.Viewing Logs
Logs UI
On the Logs page in the console, you can view detailed records for all API calls. The UI provides powerful filtering and analysis capabilities:
Filters:
- Time range (Time): Select a specific date range to view historical records
- API key (API Keys): Filter logs by different API keys for easier multi-project management
- Request ID search (Request): Enter a request ID to quickly locate a specific request
- Provider (Provider): Filter by provider, such as Anthropic, OpenAI, etc.
- Model (Model): Filter by model to quickly find call records for a specific model
- Finish reason (Finish Reason): Filter by finish reason, such as
stop,end_turn,max_tokens, etc.
| Field Name | Description |
|---|---|
Timestamp | Timestamp when the request was initiated |
Model | Model name used (e.g., openai/gpt-5.2, anthropic/claude-opus-4.5) |
Input Tokens | Number of input tokens; click to view a detailed token breakdown |
Output Tokens | Number of output tokens |
Cost | Cost of this call (USD) |
Latency | Request latency (ms) |
Throughput | Throughput, tokens generated per second (tokens per second) |
Finish | Completion status (e.g., end_turn, tool_use, stop, max_tokens, length) |
Action | Action button; click Details to view full request and response details |
Request Details page
Click Details on any log entry to view the full information for that call. The details page is split into two sections:
Left: Conversation content
The left panel displays the complete request and response content, split into Request and Response sections. Each section includes:- User message: The input sent by the user
- System message: System prompt (if any)
- Assistant message: The response generated by the model
- Tool calls: If tool calling is used, the tool inputs and outputs are shown
- Pretty mode (formatted): Presents the conversation in a formatted, readable view. Messages are grouped by role, and code is syntax-highlighted for easier reading and understanding.
- JSON mode (raw data): Shows the complete raw request and response data in JSON format, including all technical details—ideal for development debugging and troubleshooting.
- Request:
User -> ShuYou: The original request sent by the user to ShuYouShuYou -> Origin: The request ShuYou forwarded to the upstream provider
- Response:
ShuYou -> User: The response returned by ShuYou to the userOrigin -> ShuYou: The original response returned by the upstream provider to ShuYou
Right: Metrics and metadata
The right panel shows detailed technical metrics and metadata: Model information (Model Information):- Model: Model name used
- Provider: Model provider
- Input Tokens:
prompt: Prompt token countinput_cache_write: Tokens written to cacheinput_cache_write_5_min: 5-minute cache write token countinput_cache_write_1_h: 1-hour cache write token countinput_cache_read: Tokens read from cache
- Output Tokens:
completion: Generated content token countinternal_reasoning: Internal reasoning token countaudio: Audio token count
web_search: Number of web search requests
image: Number of images processed
- First Token Latency (ms): Time from sending the request to receiving the first token (ms)
- Generation Time (ms): Time to generate the full response (ms)
- Throughput (tps): Token generation rate (tokens per second)
- Displays the full request metadata in JSON format
- Supports one-click copying of the JSON data


