ccglassIt is an online tool designed for AI engineers and prompt engineers,for API request debugging and Token cost analysis.It supportsAnthropic Messages API,OpenAI Chat CompletionsandOpenAI Responses APIthree mainstream formats, helping developers directly parse, preview, and optimize request content sent to large language models within the browser.
contentlist, and restoring theinputparameters of tool_use, making it easy to verify the model's multi-step reasoning path.The core of this tool is aformat-agnostic request view abstraction layer: Regardless of whether the input is Anthropic'smessages[]structure or OpenAI'sinput[]structure, the engine normalizes it into a{ system, messages, tools }three-part view. Token estimation uses a hybrid strategy—CJK characters count as 1.5 tokens, Latin characters count as 0.25 tokens, and the JSON Schema length of tool descriptions is added. Cost calculation matches the model name to the corresponding price table (e.g., Claude Opus at $15 USD per million input tokens, $75 USD per million output tokens), combined with theusagefield returned in the response to derive the exact value. Streaming response reconstruction parses SSEdata:events line by line, mergingtext_delta、thinking_delta, andinput_json_delta, ultimately restoring the complete message content.
Q: Will my API Key be uploaded?
A: No. All data is processed locally in the browser and is not sent to any server. You can safely paste requests containing Authorization headers.
Q: Which models are supported for price calculation?
A: Currently includes built-in price tables for mainstream models such as Claude Opus / Sonnet / Haiku, GPT-4o / 4.1 / o3 / mini / Codex, DeepSeek V4 Flash / Pro, and will be updated with official price changes.
Q: Why didn't my streaming response parse out tool_use?
A: Please ensure the SSE data includescontent_block_startandinput_json_deltaevents. If the response is a complete JSON (non-streaming), the tool also supports parsing it.
Q: What is the principle behind the Diff feature?
A: The context blocks of two requests are extracted into{ kind, text }lists respectively, compared using SHA-1 hashing to mark added, removed, and unchanged blocks, and displayed with color coding.
ccglass · AI API Request Insight Analyzer v1.0 · Independently built based on the core concepts of the open-source project ccglass (Claude Code Wire Inspector).