LLM API
OpenAI, Anthropic, Google, xAI Grok, DeepSeek, Meta와 OpenRouter 경유 오픈 모델(Qwen, Kimi, GLM, Llama 등)을 동일한 API 키로 사용합니다. 기존 OpenAI SDK와 100% 호환됩니다. 채팅이 아닌 구조화 판정은 판정 API에서 같은 키·같은 크레딧으로 호출합니다.
주요 모델 상세 정보
각 모델의 상세한 파라미터, 예제 코드, 활용 팁을 확인하세요.
Claude Fable 5.1
Anthropic
Anthropic's top model tier, above Opus. 1M-token context window and 128K max output tokens. Priced at $10/$50 per M tokens with prompt caching — cache reads are only $0.25/M (2.5% of the input price) and 5-minute cache writes $12.50/M — plus web search. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Fable 5
Anthropic
Anthropic's Fable-tier model, positioned above Opus. 1M-token context window and 128K max output tokens. Priced at $10/$50 per M tokens with prompt caching (read $1.00/M, 5-minute write $12.50/M) and web search. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Haiku 4.5
Anthropic
Fast, cost-effective model for everyday tasks. Great balance of speed, intelligence, and cost for high-volume applications.
Claude Opus 5.5
Anthropic
Anthropic's current Opus model (September 2026), cheaper than Opus 5 at $4/$20 per M tokens. 1M-token context window and 128K max output tokens, with prompt caching (read $0.20/M, i.e. 5% of input; 5-minute write $5.00/M) and web search. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Opus 5
Anthropic
Anthropic's Opus 5 model (superseded by the cheaper Claude Opus 5.5; Claude Fable 5.1 is the top tier), with a 1M-token context window by default and 128K max output tokens. Same pricing as Opus 4.5–4.8 ($5/$25 per M tokens) with prompt caching (read $0.50/M, write $6.25/M) and web search. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Opus 4.8
Anthropic
Anthropic's most capable Opus-tier model, with a 1M-token context window (200K on some surfaces), 128K max output tokens, and knowledge cutoff to January 2026. Builds on Opus 4.7 with stronger long-horizon agentic coding, better tool triggering, and adaptive thinking that reasons only when a turn needs it. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Opus 4.7
Anthropic
Anthropic's latest flagship model with reliable knowledge cutoff to January 2026 and 128K max output tokens. Builds on Opus 4.6 with improved reasoning, coding, and instruction-following while staying compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Opus 4.6
Anthropic
Anthropic's most capable model. Delivers breakthrough performance in reasoning, coding, and complex analysis with enhanced safety and instruction following.
Claude Opus 4.5
Anthropic
Anthropic's most powerful model for highly complex tasks. Exceptional at research, analysis, and creative projects requiring deep expertise.
Claude Sonnet 5.5
Anthropic
Anthropic's newest Sonnet model (September 2026), balancing speed, cost, and intelligence at $2/$10 per M tokens. 1M-token context window and 128K max output tokens, with prompt caching (read $0.10/M, 5-minute write $2.50/M) and web search. Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Sonnet 5
Anthropic
Anthropic's Sonnet 5 model, tuned for the best balance of speed, cost, and intelligence. Features a 1M-token context window, 64K max output tokens, and knowledge cutoff to August 2025. Supports adaptive thinking that reasons only when a turn needs it, vision, and tool use. Priced at $2/$10 per M tokens (cache read $0.20/M). Compatible with the Anthropic Messages and OpenAI Chat Completions formats.
Claude Sonnet 4.6
Anthropic
The successor to Claude Sonnet 4.5. Anthropic's frontier Sonnet-tier model for complex reasoning, nuanced understanding, and coding tasks with exceptional instruction following, at the same token pricing as Sonnet 4.5.
Claude Sonnet 4.5
Anthropic
Anthropic's most intelligent and capable Sonnet model. Best-in-class for complex reasoning, nuanced understanding, and coding tasks with exceptional instruction following.
DeepSeek V4 Pro
DeepSeek
DeepSeek's strongest V4 model (checkpoint V4-Pro-0813). Advanced reasoning with thinking mode on by default, a 1M-token context window, and discounted cache reads - still far cheaper than comparable frontier models.
DeepSeek Flash (V4.1)
DeepSeek
DeepSeek's fast, low-cost model - currently DeepSeek V4.1 Flash, with text and image input. Thinking mode is on by default, with a 1M-token context window, up to 384K output tokens, and cache reads at ~98% off. $0.30 input / $1.20 output per million tokens.
Gemini 4 Argon
Google's flagship reasoning model (GA 2026-10-13). A 1M-token context window with 65,536 max output tokens (thinking included), multimodal input, adjustable thinking levels and agentic tool use, priced at $4 input / $20 output per million tokens with implicitly cached inputs at $0.20/M.
Gemini 3.8 Flash
Google's newest Flash-tier model (released 2026-09-02). A 1M-token context window with 65,536 max output tokens, multimodal input, thinking and tool use, priced at $1.50 input / $7.50 output per million tokens with cached inputs at $0.15/M.
Gemini 3.7 Flash
Google's Gemini 3.7 Flash (released 2026-08-13), an earlier release in the Gemini 3.x Flash line - newer Flash generations (3.8) are available. A 1M-token context window with 65,536 max output tokens, multimodal input, thinking and tool use, priced at $1.50 input / $7.50 output per million tokens with cached inputs at $0.15/M.
Gemini 3.6 Flash
Google's Gemini 3.6 Flash (released 2026-07-21), an earlier release in the Gemini 3.x Flash line - newer Flash generations (3.7 and 3.8) are available. A 1M-token context window with 65,536 max output tokens, multimodal input, thinking and tool use, priced at $1.50 input / $7.50 output per million tokens with cached inputs at $0.15/M.
Gemini 3.5 Flash
Google's latest Flash-tier workhorse model. Flat pricing across all input modalities (text, image, video, audio, PDF) at $1.50/$9 per million tokens with no long-context premium, a 1M token context window, and 65,536 max output tokens. Cached inputs get a 90% discount.
Gemini 3.5 Flash Lite
Google's lightweight Gemini 3.5 model (released 2026-07-21) for high-throughput, budget-conscious workloads. $0.30/$2.50 per million tokens with cached input at $0.03/M. Successor to Gemini 3.1 Flash Lite, which Google retires on 2027-05-07.
Gemini 3.1 Flash Image
Generally available (GA) Gemini 3.1 Flash with native image generation - the stable successor to gemini-3.1-flash-image-preview, at the same price. Can generate images directly in chat responses alongside text. Features separate pricing for text and image output tokens.
Gemini 3.1 Flash Image Preview
Gemini 3.1 Flash with native image generation capabilities. Can generate images directly in chat responses alongside text. Features separate pricing for text and image output tokens.
Gemini 3.1 Flash Lite
Stable release of the ultra-lightweight Gemini 3.1 Flash Lite. The most cost-effective Gemini model at $0.25/$1.50 per million tokens, with cached input (90% discount), audio input, and batch (50% discount) support. Ideal for high-throughput, budget-conscious applications.
Gemini 3.1 Flash Lite Image
Lightweight, lower-cost sibling of Gemini 3.1 Flash Image with native image generation. Generates images directly in chat responses alongside text, with separate pricing for text and image output tokens: $0.25 input, $1.50 text output and $30 image output per million tokens.
Gemini 3.1 Flash Lite Preview
Ultra-lightweight variant of Gemini 3.1 Flash. The most cost-effective Gemini model with support for cached input and audio input. Ideal for high-throughput, budget-conscious applications.
Gemini 3.1 Pro Preview
Google's latest and most capable Gemini model in preview. Features dynamic pricing that adjusts based on context length, with enhanced pricing for inputs over 200K tokens.
Gemini 3 Flash Preview
Google's most advanced reasoning model with state-of-the-art multimodal understanding, PhD-level reasoning, and leading coding performance.
Gemini 3 Pro Image
Generally available (GA) premium image generation model in the Gemini 3 Pro family - the stable successor to gemini-3-pro-image-preview, at the same price. Generates high-quality images directly in chat with the highest fidelity among Gemini image models. Image output tokens are priced at 10x text output tokens.
Gemini 3 Pro Image Preview
Google's premium image generation model within the Gemini 3 Pro family. Generates high-quality images directly in chat with the highest fidelity among Gemini image models. Image output tokens are priced at 10x text output tokens.
Gemini 2.5 Flash
Google's fast and efficient model with built-in thinking capabilities. Great balance of speed, reasoning, and cost for high-volume applications.
Gemini 2.5 Flash Lite
The cheapest tier of the Gemini 2.5 family, optimized for high-volume, latency-sensitive workloads. Delivers 2.5-generation quality at a fraction of the cost, ideal for classification, extraction, and real-time chat at scale.
Gemini 2.5 Pro
Google's most capable model with state-of-the-art reasoning and 1M token context. Excels at complex coding, math, and multi-document analysis.
Gemini Embedding 2
Google's second-generation Gemini embedding model and the successor to gemini-embedding-001. Generates vector representations for semantic search, clustering, classification, and RAG at $0.20 per million text input tokens.
Gemini Embedding 001
Google's text embedding model for generating vector representations. Optimized for semantic search, clustering, and similarity tasks.
GLM 5.3
Z.ai
Z.ai's GLM 5.3 served through the OpenRouter aggregator (listed 2026-08-18) - a large-scale text reasoning model built for complex software engineering and long-horizon agent tasks, and the successor to GLM 5.2. 1.31M-token context window, billed at OpenRouter's actual usage cost.
GLM 5.3 Flash
Z.ai
Z.ai's GLM 5.3 Flash served through the OpenRouter aggregator (listed 2026-08-26) - a low-cost native multimodal model (text, image, video input) for efficient coding and long-horizon agent tasks. Its hybrid sparse and linear attention keeps long-context behavior accurate across a 1.31M-token window. Billed at OpenRouter's actual usage cost.
GLM 5.2
Z.ai
Z.ai's GLM 5.2 served through the OpenRouter aggregator - a large-scale text reasoning model with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering. Billed at OpenRouter's actual usage cost.
GLM 4.7
Z.ai
Z.ai's GLM 4.7 served through the OpenRouter aggregator - a flagship text model with enhanced programming capabilities and more stable multi-step reasoning/execution, showing clear gains on complex agent tasks. 200K context, billed at OpenRouter's actual usage cost.
GPT-6.1 Sol
OpenAI
OpenAI's GPT-6.1 Sol — the Sol tier of the GPT-6.1 generation at $2/$10 per million tokens, with cached inputs at a 95% discount ($0.10/M, half of GPT-6 Sol's cached rate). 1.05M token context window (up to 922K input), 128K max output tokens, text and image input. Supports Fast mode and Ultrafast mode. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-6.1 Terra
OpenAI
OpenAI's GPT-6.1 Terra — a fast, efficient model of the GPT-6.1 generation for visual reasoning, precise computer use and clear, natural writing, at $1/$5 per million tokens with cached inputs at a 95% discount ($0.05/M). 1.05M token context window (up to 922K input), 128K max output tokens, text and image input. Supports Fast mode. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-6 Astra
OpenAI
OpenAI's most capable model (GPT-6 generation, September 2026), built for the hardest end-to-end work: complex reasoning, coding, computer use, research and document creation. 1M token context window, 128K max output tokens, cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-6 Luna
OpenAI
The smallest, lowest-cost tier of OpenAI's GPT-6 generation, at $0.10/$0.50 per million tokens — built for high-volume, latency-sensitive work such as classification, extraction, routing and short-form generation. Cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-6 Sol
OpenAI
The mid tier of OpenAI's GPT-6 generation (in the API since September 14, 2026) — strong reasoning, coding and multimodal performance at $2/$10 per million tokens, a fifth of GPT-6 Astra. 1.05M token context window, 128K max output tokens, cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-5.6 Luna
OpenAI
The fast, low-cost tier of OpenAI's GPT-5.6 family (GA July 2026). Luna is built for high-throughput workloads at $0.20/$1.20 per million tokens, with a 1M token context window, 128K max output tokens, and cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-5.6 Sol
OpenAI
The flagship tier of OpenAI's GPT-5.6 family (GA July 2026). Sol delivers the strongest reasoning, coding, and multimodal performance of the generation with a 1M token context window, 128K max output tokens, and cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-5.6 Terra
OpenAI
The balanced tier of OpenAI's GPT-5.6 family (GA July 2026). Terra offers near-flagship quality at $2/$12 per million tokens (40% of Sol), with a 1M token context window, 128K max output tokens, and cached inputs at a 90% discount. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request.
GPT-5.5 Pro
OpenAI
Maximum-capability tier of the GPT-5.5 family (dated snapshot). Uses more compute to think longer and deliver the most reliable answers on the hardest reasoning, coding and analysis tasks. Served only via the OpenAI Responses API. $30/$180 per million tokens (no cached-input discount); prompts above 272K input tokens bill the whole request at $60/$270.
GPT-5.5
OpenAI
OpenAI's newest flagship model with a 1.05M token context window and 128K max output tokens. Supports cached inputs at 10× discount and improved reasoning, coding, and multimodal performance over the GPT-5.4 series.
GPT-5.4 Pro
OpenAI
Maximum-capability tier of the GPT-5.4 family (dated snapshot). Uses more compute to think longer and deliver the most reliable answers on the hardest reasoning, coding and analysis tasks. Served only via the OpenAI Responses API. $30/$180 per million tokens (no cached-input discount); prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request ($60/$270 per million tokens).
GPT-5.4
OpenAI
OpenAI's newest flagship model with 1M context window and 128K output tokens. Delivers top-tier reasoning across all domains with adjustable reasoning effort levels from none to xhigh. Prompts above 272K input tokens are billed at 2x input / 1.5x output for the whole request ($5 / $22.50 per 1M tokens, cached $0.50).
GPT-5.4 Mini
OpenAI
Fast and cost-efficient variant of GPT-5.4 with 400K context window and 128K output tokens. Excellent balance of performance and affordability for everyday tasks.
GPT-5.4 Nano
OpenAI
Ultra-lightweight and fastest GPT-5.4 variant with 400K context and 128K output. Designed for high-throughput, low-latency applications at minimal cost. Supports MCP for tool integration.
GPT-5.3 Codex
OpenAI
Codex model on the GPT-5.3 base, optimized for agentic coding harnesses and served via the OpenAI Responses API. 400K token context window, 128K max output tokens, cached inputs at a 90% discount.
GPT-5.2 Pro
OpenAI
Maximum-capability tier of the GPT-5.2 family (dated snapshot). Thinks longer with more compute to deliver the most reliable answers on the hardest reasoning and coding tasks.
GPT-5.2
OpenAI
OpenAI's latest and most advanced GPT model. Delivers state-of-the-art performance across reasoning, coding, and creative tasks with enhanced capabilities.
GPT-5.1 (2025-11-13)
OpenAI
Dated snapshot of GPT-5.1 for reproducible results. Supports cached input tokens for cost savings on repeated context. Ideal for production deployments requiring model version pinning.
GPT-5
OpenAI
OpenAI's latest flagship model. Delivers exceptional performance across reasoning, coding, and creative tasks with a massive 1M token context window and 32K output tokens. Supports vision, function calling, and JSON mode.
GPT-5 Mini
OpenAI
Fast and efficient variant of GPT-5. Delivers strong performance across reasoning, coding, and creative tasks with a 1M token context window and 32K output tokens, at a fraction of the cost of GPT-5.
GPT-5 Nano
OpenAI
Ultra-fast and lightweight variant of GPT-5. Designed for high-throughput, low-latency applications with a 1M token context window and 32K output tokens at minimal cost.
GPT-5 Pro
OpenAI
OpenAI's maximum-capability GPT-5 tier. Uses more compute to think longer and deliver the most reliable answers on the hardest reasoning, coding, and analysis tasks.
GPT-4.1
OpenAI
OpenAI's most capable model for coding and instruction following. Features a 1M token context window, 32K output tokens, and major improvements in coding, complex prompts, and long-context tasks. 20% cheaper than GPT-4o on output.
GPT-4.1 Mini
OpenAI
A significant leap in small model performance. Matches or exceeds GPT-4o in intelligence while reducing latency by nearly half and cost by 83%. Ideal balance of speed, quality, and affordability.
GPT-4o
OpenAI
OpenAI's flagship multimodal model. Industry-leading performance in reasoning, coding, and creative tasks with native vision capabilities and structured output support.
GPT-4o Mini
OpenAI
Cost-effective, fast model with strong performance. Best for high-volume tasks where speed and cost matter more than absolute capability.
GPT Audio 1.5
OpenAI
OpenAI's current audio model with native audio input/output via chat completions - the successor to GPT Audio and GPT Audio Mini, which OpenAI retires on 2027-01-20. Text tokens are $2.50 in / $10 out and audio tokens $32 in / $64 out per million tokens.
GPT Audio
OpenAI
Full-size multimodal model with native audio input/output via chat completions. Handles speech in and speech out with strong general intelligence behind it.
GPT Audio Mini
OpenAI
Lightweight multimodal model with native audio input/output capabilities. Optimized for voice-based interactions and audio processing tasks.
GPT-OSS 120B
OpenAI
OpenAI's open-weight gpt-oss-120b, a 117B-parameter Mixture-of-Experts model (5.1B active per forward pass) built for high-reasoning, agentic and general-purpose production use - served through OpenRouter only; it is not available on the direct OpenAI API. 131K-token context, billed at OpenRouter's actual usage cost.
Grok 4.7
xAI
xAI's newest flagship Grok model (API release 2026-09-02). Strongest reasoning and general capability in the Grok family, with a 500K-token context window, text and image input, and adjustable reasoning effort - at the same price as Grok 4.6.
Grok 4.6
xAI
xAI's previous-generation flagship Grok model with a 500K-token context window. Grok 4.7 has since superseded it at the same price.
Grok 4.5
xAI
xAI's coding-focused Grok model with a 500K-token context window - same token rates as Grok 4.6 with cheaper cache reads.
Grok 4.3
xAI
Cost-efficient Grok model with a 1M-token context window - under half the price of the 4.5/4.6 tier.
Grok 4.3 (OpenRouter)
xAI
xAI's Grok 4.3 served through the OpenRouter aggregator - 1M-token context, vision input, billed at OpenRouter's actual usage cost. Prefer the direct grok-4.3 route unless you need the OpenRouter path.
Grok 4.20 Multi-Agent
xAI
Grok 4.20 Multi-Agent beta (0309 snapshot) - deep-research style multi-agent orchestration with a 1M-token context window. Served through the Responses API only.
Grok 4.20 Non-Reasoning
xAI
Grok 4.20 non-reasoning variant (0309 snapshot) - fast responses with a 1M-token context window at the same rates as the reasoning variant.
Grok 4.20 Reasoning
xAI
Grok 4.20 reasoning variant (0309 snapshot) - chain-of-thought reasoning with a 1M-token context window. Reasoning tokens are billed additively on top of completion tokens.
Grok Build 0.1
xAI
xAI's agentic-coding Grok model with a 256K-token context window - the lowest rates in the Grok family.
Kimi K3
Moonshot AI
Moonshot AI's Kimi K3 served through the OpenRouter aggregator - a 2.8T-parameter open-weight multimodal reasoning model with a 1M-token context and image/video input, built for complex coding, knowledge work, and long-horizon agentic workflows. Billed at OpenRouter's actual usage cost.
Kimi K2.7 Code
Moonshot AI
Moonshot AI's Kimi K2.7 Code served through the OpenRouter aggregator - a coding-focused member of the Kimi K2 family built to complete end-to-end programming tasks reliably over long contexts, with a native multimodal mixture-of-experts architecture, 256K context, and image input. Billed at OpenRouter's actual usage cost.
Llama 3.3 70B Instruct
Meta
Meta's Llama 3.3 70B instruction-tuned multilingual model served through OpenRouter - text in/text out with 131K-token context, a strong open-weight general-purpose chat model. This id replaces the retired direct llama-3.3-70b-versatile route. Billed at OpenRouter's actual usage cost.
Llama 3.1 8B Instruct
Meta
Meta's Llama 3.1 8B instruction-tuned model served through OpenRouter - a fast, efficient small open-weight model with 131K-token context for high-volume, low-cost workloads. This id replaces the retired direct llama-3.1-8b-instant route. Billed at OpenRouter's actual usage cost.
MiniMax M3
MiniMax
MiniMax's M3 multimodal foundation model served through OpenRouter - text, image and video input, 1M-token context with up to 512K output tokens, suited for long-horizon agentic work and coding. Billed at OpenRouter's actual usage cost.
MiniMax M2.7 (OpenRouter)
MiniMax
MiniMax's M2.7 served through OpenRouter - an agentic large language model built for autonomous, real-world productivity with 204K-token context and multi-agent tool use. This id replaces the retired direct MiniMax-M2.7 route. Billed at OpenRouter's actual usage cost.
Mistral Large 3 (2512)
Mistral AI
Mistral Large 3 (2512) served through the OpenRouter aggregator - Mistral's most capable model to date, a sparse mixture-of-experts with 41B active parameters (675B total) released under Apache 2.0, with 256K context and image/file input. Billed at OpenRouter's actual usage cost.
Muse Spark 1.3
Meta
Meta's Muse Spark 1.3 over the direct Meta API - a multimodal reasoning model for agentic work that accepts text, images, video, audio and PDF documents and returns text, with a 1M-token context window and cached-input pricing. Answers are generated after reasoning tokens, so keep max_tokens at 2,048 or more.
Muse Spark 1.3 Contributor
Meta
The discounted Contributor tier of Meta's Muse Spark 1.3 - same model, about 1/12 of the standard price, on the condition that prompts and responses may be used by Meta to train its models. Do not send personal, confidential or customer data. Shares an upstream limit of 100 requests / 3M tokens per minute.
Muse Spark 1.1
Meta
Meta's Muse Spark 1.1 served through the OpenRouter aggregator - a multimodal reasoning model built for agentic tasks that accepts text, images, video, audio, and PDF documents and returns text, with a 1M-token context. Billed at OpenRouter's actual usage cost.
o3
OpenAI
OpenAI's frontier reasoning model. Uses extended chain-of-thought to solve complex problems in science, coding, and math with high accuracy at a competitive price.
o3 Pro
OpenAI
Highest-effort version of o3. Thinks longer with more compute to deliver the most reliable answers on the hardest science, math, and coding problems.
Qwen3.8 Max (0902)
Alibaba Qwen
Alibaba's Qwen3.8 Max (0902) served through the OpenRouter aggregator - the updated snapshot of Qwen3.8 Max and the id OpenRouter now lists for it (since 2026-09-03), replacing qwen/qwen3.8-max. The flagship of the Qwen3.8 series, a 2.4-trillion-parameter mixture-of-experts multimodal reasoning model for complex reasoning, visual understanding, and agentic work with a 1M-token context, billed at OpenRouter's actual usage cost.
Qwen3.8 27B
Alibaba Qwen
Qwen3.8 27B served through the OpenRouter aggregator - an open-weight dense vision-language model for coding, professional workflows, research, multimodal interaction, and long-running agent tasks, with flexible thinking mode and a 256K-token context. Billed at OpenRouter's actual usage cost.
Qwen3.8 2.4T-A95B
Alibaba Qwen
Qwen3.8 2.4T-A95B served through the OpenRouter aggregator - the open-weight sparse mixture-of-experts variant of Qwen3.8 Max, with 95B active parameters out of 2.4T total. Text-only reasoning model with a 1M-token context and up to 262K output tokens, billed at OpenRouter's actual usage cost.
Qwen3.8 Flash
Alibaba Qwen
Alibaba's Qwen3.8 Flash served through the OpenRouter aggregator (listed 2026-08-26) - a low-cost multimodal reasoning model and the successor to Qwen3.7 Flash, suited for coding assistance, agentic workflows, visual understanding, document and codebase analysis, desktop interaction, chart analysis and long-video analysis. 1M-token context, billed at OpenRouter's actual usage cost.
Qwen3.8 Max
Alibaba Qwen
Alibaba's Qwen3.8 Max served through the OpenRouter aggregator - the flagship of the Qwen3.8 series and GA successor to Qwen3.8 Max Preview. A multimodal reasoning model for complex reasoning, visual understanding, and agentic work with a 1M-token context, billed at OpenRouter's actual usage cost.
Qwen3.7 Flash
Alibaba Qwen
Alibaba's Qwen3.7 Flash served through the OpenRouter aggregator - a low-cost vision-language reasoning model for multimodal agents, visual coding, search, and computer interaction, with strengths in object recognition and spatial understanding. 1M-token context, billed at OpenRouter's actual usage cost.
Solar Pro 4
Upstage
Upstage's Solar Pro 4 served through the OpenRouter aggregator - a cost-efficient LLM with a 524K-token context window, built for long-horizon tasks and agentic workflows with strengths in office productivity and document-intensive work. Billed at OpenRouter's actual usage cost.
Text Embedding 3 Large
OpenAI
OpenAI's most capable text embedding model. Generates high-quality vector representations for semantic search, clustering, and similarity tasks where retrieval accuracy matters most.
Text Embedding 3 Small
OpenAI
OpenAI's cost-efficient text embedding model. Generates vector representations for semantic search, clustering, and similarity tasks at very low cost.
가격 단위: 가격표는 1M 토큰당 크레딧(1 크레딧 ≈ ₩1, VAT 별도)입니다. 입력·캐시·출력 토큰별 계산과 예시는 비용 계산법을 보세요.
GPT-5 / GPT-5.2 / O-Series 주의사항
GPT-5, GPT-5.2, o1, o3 등 추론(Reasoning) 모델은 일반 모델과 파라미터가 다릅니다:
max_tokens→max_completion_tokens사용temperature,top_p지원 안 함- 새 파라미터:
reasoning_effort(minimal/low/medium/high)
OpenAI (GPT)
GPT-4o / GPT-4.1 (일반 모델)
curl -X POST https://api.core.today/llm/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}],
"max_tokens": 1000,
"temperature": 0.7
}'GPT-5 / O-Series (추론 모델)
curl -X POST https://api.core.today/llm/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [{"role": "user", "content": "Explain quantum computing"}],
"max_completion_tokens": 16000,
"reasoning_effort": "medium"
}'GPT-5 전용 파라미터
max_completion_tokens- 최대 출력 토큰 (max_tokens 대신 사용)reasoning_effort- 추론 수준: minimal, low, medium, high
Codex 모델 (코드 특화)
Codex 모델은 Responses API 전용입니다
gpt-5.3-codex 등 Codex 모델은 /v1/chat/completions를 지원하지 않습니다. 대신 /v1/responses 엔드포인트를 사용해야 합니다.
게이트웨이는 경로를 그대로 프록시하므로, 클라이언트에서 엔드포인트 경로만 변경하면 됩니다: /llm/openai/v1/responses → OpenAI /v1/responses
# Codex 모델: /v1/responses 엔드포인트 사용
curl -X POST https://api.core.today/llm/openai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5.3-codex",
"instructions": "You are a helpful coding assistant.",
"input": "Write a Python function to merge two sorted lists",
"max_output_tokens": 16000
}'messages→input(문자열 또는 메시지 배열)- 시스템 프롬프트:
instructions파라미터 사용 - 출력 토큰 제한:
max_output_tokens사용 - 스트리밍 시 이벤트 형식:
response.output_text.delta
gpt-5.3-codex 등 모델 이름에 "codex"가 포함된 모델| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
음성 인식(gpt-transcribe, whisper-1)도 같은 base_url로 호출합니다 — client.audio.transcriptions.create → POST /llm/openai/v1/audio/transcriptions (multipart). whisper-1은 2027-02-26 OpenAI 종료 예정이니 새 연동은 gpt-transcribe로 하세요. Speech-to-Text 문서의 OpenAI SDK 호환 →
Anthropic (Claude)
curl -X POST https://api.core.today/llm/anthropic/v1/messages \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "claude-sonnet-4",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Explain quantum computing simply."}
]
}'Claude Opus 4.7 주의사항
claude-opus-4-7은 temperature 파라미터가 deprecated 되었습니다. 요청 바디에 포함하면 Anthropic이 400: `temperature` is deprecated for this model 으로 거절합니다 — 이 모델 호출 시 temperature 필드를 제거하세요.
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
Google (Gemini)
curl -X POST "https://api.core.today/llm/gemini/v1beta/models/gemini-2.5-pro:generateContent" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"contents": [
{
"parts": [{"text": "Write a haiku about programming"}]
}
]
}'| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
Google의 플래그십 추론 모델입니다(2026-10-13 GA). 어려운 수학·과학·코딩 문제와 도구·검색을 쓰는 에이전트 작업에 맞춰져 있고, 텍스트·이미지·오디오·비디오·PDF를 입력으로 받습니다. 모델 id는 gemini-4-argon이며 Gemini 네이티브 API, OpenAI 호환 경로, Interactions API 어디서나 같은 단가로 호출됩니다.
| 항목 | 값 |
|---|---|
| 입력 / 출력 (백만 토큰당) | 7,432 / 37,160 크레딧 ($4 / $20) |
| 캐시 입력 (암묵적 캐싱, 4,096 토큰 이상 프롬프트) | 371.6 크레딧 ($0.20, 95% 할인) |
| 컨텍스트 / 최대 출력 | 1,048,576 / 65,536 토큰 (Thinking 포함) |
| Google Search 그라운딩 | 검색 쿼리당 26.012 크레딧 (아래 참고) |
curl -X POST "https://api.core.today/llm/gemini/v1beta/models/gemini-4-argon:generateContent" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"contents": [{"parts": [{"text": "4k+3 꼴의 소수가 무한히 많음을 증명해 줘"}]}],
"generationConfig": {
"maxOutputTokens": 32768,
"thinkingConfig": {"thinkingLevel": "high"}
}
}'- Thinking은 기본으로 켜져 있고(
medium),low/high로 바꿀 수 있습니다. Thinking 토큰은 출력 단가로 과금됩니다. maxOutputTokens(OpenAI 호환은max_tokens)는 Thinking과 출력을 합친 상한입니다. 짧은 질문에도 Thinking이 상한을 다 쓸 수 있으니 어려운 작업은 32,768 이상으로 두세요. 생략하면 Thinking 몫으로 8,192 토큰분을 더 예약하고, 쓰지 않은 예약은 응답 직후 환불됩니다.temperature·top_p·top_k는 무시됩니다. 명시적 캐시(cachedContents)는 지원하지 않고 암묵적 캐싱만 적용됩니다.- Priority 추론(
serviceTier: priority)은 토큰 요금이 1.8배입니다. 65,536 토큰을 넘는 롱 디코드(background: true)는 게이트웨이에서 지원하지 않습니다.
Interactions API POST /llm/gemini/v1beta/interactions
콘솔에서 실행 →Google의 새 Interactions API도 같은 API 키로 호출할 수 있습니다. 모델은 URL이 아니라 본문 model에 넣고, 프롬프트는 input에 문자열로 보냅니다. 과금은 generateContent와 같은 토큰 단가로 응답 usage를 기준으로 정산됩니다 (thinking 토큰은 출력 단가, service_tier: "priority"는 1.8배).
curl -X POST "https://api.core.today/llm/gemini/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-3.8-flash",
"input": "Write a three.js script that renders a realistic 3D black hole.",
"generation_config": {"max_output_tokens": 8192}
}'응답 텍스트는 steps[] 중 type: "model_output" 단계의 content[].text에 있고, 사용량은 usage(total_input_tokens · total_output_tokens · total_thought_tokens)에 옵니다.
{
"object": "interaction",
"model": "gemini-3.8-flash",
"status": "completed",
"steps": [
{"type": "thought", "signature": "..."},
{"type": "model_output", "content": [{"type": "text", "text": "..."}]}
],
"usage": {"total_input_tokens": 18, "total_output_tokens": 2950, "total_thought_tokens": 840, "total_tokens": 3808}
}멀티턴 · 시스템 프롬프트 · 스트리밍
게이트웨이에서는 대화 이력을 매 요청에 직접 담습니다 — input을 user_input / model_output 단계 배열로 보내세요. 이미지는 {"type": "image", "data": "<base64>", "mime_type": "image/png"} 파트로 넣습니다. "stream": true면 SSE로 step.delta(텍스트) → interaction.completed(usage) 이벤트가 옵니다.
curl -N -X POST "https://api.core.today/llm/gemini/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-3.8-flash",
"system_instruction": "You are a concise assistant.",
"input": [
{"type": "user_input", "content": [{"type": "text", "text": "My name is Kyu."}]},
{"type": "model_output", "content": [{"type": "text", "text": "Nice to meet you, Kyu."}]},
{"type": "user_input", "content": [{"type": "text", "text": "What is my name?"}]}
],
"generation_config": {"temperature": 0.7, "max_output_tokens": 1024},
"stream": true
}'게이트웨이에서 지원하지 않는 기능
모든 고객이 하나의 Google 프로젝트를 공유하므로 저장된 interaction은 고객별로 격리할 수 없고, background·agent 실행은 응답 시점에 사용량이 없어 정산할 수 없습니다. 아래 요청은 예약·과금 없이 400으로 거부됩니다.
| 요청 | 에러 코드 | 대안 |
|---|---|---|
| background: true | background_not_supported | 동기 호출 또는 "stream": true |
| agent (Deep Research 등) | unsupported_agent | model 필드로 모델 호출 |
| previous_interaction_id, continuation_token | stored_interaction_not_supported | 대화 이력을 input 단계 배열로 직접 전송 |
| GET · DELETE /interactions/{id}, POST …/{id}/cancel, GET /interactions | unsupported_endpoint | 생성 응답·스트림에서 결과를 받기 |
| model 없음 | model_required | "model": "gemini-3.8-flash" |
Google Search · Maps 그라운딩
tools에 {"google_search": {}} 또는 {"google_maps": {}}를 넣으면 모델이 직접 검색해 출처가 달린 답을 줍니다. 토큰 요금과 별도로, 모델이 실제로 실행한 검색만큼 아래 요금이 붙습니다. 검색 수는 응답의 groundingMetadata.webSearchQueries(이미지 검색은 imageSearchQueries)에서 확인할 수 있습니다.
| 모델 | 도구 | 요금 |
|---|---|---|
| Gemini 3 이상 (Gemini 4 Argon 포함) | Search · Maps · 이미지 검색 | 검색 쿼리당 26.012 크레딧 ($14/1,000) |
| Gemini 2.5 | Search | 그라운딩된 요청당 65.03 크레딧 ($35/1,000) |
| Gemini 2.5 | Maps | 그라운딩된 요청당 46.45 크레딧 ($25/1,000) |
curl -X POST "https://api.core.today/llm/gemini/v1beta/models/gemini-4-argon:generateContent" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"contents": [{"parts": [{"text": "최신 Go와 Rust 안정 버전을 알려 줘"}]}],
"tools": [{"google_search": {}}]
}'- 한 질문에 검색을 여러 번 하면(예: 두 언어를 각각 검색) 쿼리 수만큼 청구됩니다. Gemini 2.5는 쿼리 수와 관계없이 요청당 한 번입니다.
- 그라운딩 도구가 켜진 요청은 쿼리 10회분 검색 요금과 검색 결과 입력분을 함께 예약하고, 쓰지 않은 예약은 응답 직후 환불됩니다. 잔액이 예약액보다 적으면
402가 반환됩니다. - Interactions API에서는
{"type": "google_search"}/{"type": "google_maps"}로 같은 단가가 적용됩니다. Search와 Maps는 한 요청에 함께 쓸 수 없습니다(Google이 400 반환).
추가 프로바이더 (OpenAI 호환) — xAI Grok · DeepSeek · Meta · OpenRouter
요청·응답 형식은 OpenAI chat completions와 동일하고 게이트웨이 경로 프리픽스만 다릅니다. OpenAI SDK의 base_url을 아래 주소로 바꾸면 그대로 동작합니다.
| 프로바이더 | base_url | 모델 ID 예시 |
|---|---|---|
| xAI Grok | https://api.core.today/llm/grok/v1 | grok-4.6, grok-4.3, grok-build-0.1 |
| DeepSeek | https://api.core.today/llm/deepseek/v1 | deepseek-flash, deepseek-v4-pro |
| Meta | https://api.core.today/llm/meta/v1 | muse-spark-1.3, muse-spark-1.3-contributor |
| OpenRouter | https://api.core.today/llm/openrouter/v1 | qwen/qwen3.8-max, moonshotai/kimi-k3, openai/gpt-oss-120b |
curl -X POST https://api.core.today/llm/openrouter/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "qwen/qwen3.8-max",
"messages": [{"role": "user", "content": "Explain MoE routing in two sentences"}]
}'| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|
muse-spark-1.3-contributor는 프롬프트와 응답이 Meta 모델 학습에 제공되는 조건의 할인 티어입니다 (표준 대비 약 1/12 단가). 개인정보·기밀·고객 데이터가 포함된 요청에는 표준 muse-spark-1.3을 쓰세요. 두 모델 모두 추론 모델이라 답변이 reasoning 토큰 뒤에 생성됩니다 — 실측으로 "세 단어로 인사"에도 약 700 completion 토큰(그중 reasoning 687)이 쓰였고, max_tokens 400에서는 content: null로 끝났습니다. max_tokens는 2,048 이상을 권장하고, reasoning 토큰도 출력 단가로 과금됩니다. 컨텍스트 1M, 이미지·영상·오디오·PDF 입력 지원, 캐시 입력 할인.vendor/model 형식이며 허용 목록(allowlist) 18종만 호출 가능합니다. 위 표의 단가는 표시·예약 추정용이고, 실제 청구는 OpenRouter 응답의 usage.cost(확정 USD) × 1,858 크레딧/USD 실비 정산입니다 — OpenRouter 측 가격이 바뀌어도 청구는 항상 실비 기준입니다. Claude/GPT/Gemini는 직접 라우트(/llm/anthropic 등)가 애그리게이터 수수료 없이 더 저렴합니다.-longcontext ID를 직접 호출하면 400으로 거부됩니다. grok-4.20-multi-agent-0309는 Responses API 전용(/llm/grok/v1/responses, chat/completions는 400)이며 서브에이전트 토큰까지 합산 청구되어 한 마디 질문에도 회당 약 4K 토큰(≈9크레딧)이 정산됩니다 — 짧은 대화용이 아니라 리서치급 질문에 쓰세요. DeepSeek은 시간대와 무관하게 표준(피크) 단가로 과금됩니다. Groq/MiniMax 직접 연동(llama-3.3-70b-versatile, MiniMax-M2.7)은 제공하지 않으며 같은 모델을 OpenRouter ID(meta-llama/llama-3.3-70b-instruct, minimax/minimax-m2.7)로 사용하세요.스트리밍 응답
실시간으로 응답을 받으려면 stream: true를 추가하세요:
curl -X POST https://api.core.today/llm/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [{"role": "user", "content": "Tell me a long story"}],
"stream": true
}'비용 계산법
LLM은 요청마다 응답의 토큰 사용량에 모델 단가를 곱해 크레딧을 차감합니다. 아래 규칙과 가격 API로 요청 전에 비용을 견적하거나, 지난 요청을 직접 검산할 수 있습니다. 실제 청구액은 응답에 실리는 사용 크레딧으로 바로 받을 수 있습니다.
단위
- 1 크레딧 ≈ ₩1 (VAT 별도). LLM 단가는 프로바이더 공개 정가 $1 = 1,858 크레딧으로 환산합니다.
- 가격 API는 토큰당 크레딧, 이 페이지의 가격표는 1M 토큰당 크레딧입니다.
단가 가져오기
인증 없이 호출할 수 있습니다. 해당 축이 없는 모델은 키가 생략됩니다(0이 아닙니다).
curl "https://api.core.today/v1/providers/llm/models"| pricing 필드 | 의미 |
|---|---|
| input_per_token | 일반(캐시 아닌) 입력 토큰 1개 |
| output_per_token | 출력 토큰 1개 — 추론(thinking) 토큰 포함 |
| cached_input_per_token | 캐시에서 읽은 입력 토큰 1개 |
| cache_write_per_token | 캐시에 쓴 입력 토큰 1개 (Anthropic 5분 기본, OpenAI GPT-5.6+) |
| image_output_per_token | 이미지 출력 토큰 1개 (이미지 생성 모델) |
| web_search_per_request | 서버 실행 웹 검색 1회 |
| long_context | 롱컨텍스트 티어: 경계(threshold_tokens, threshold_inclusive)와 그때의 요율 |
| surcharges | 할증 목록: name, trigger(응답 보고값 조건), multiplier |
공식
토큰 요금 = 일반 입력 × input_per_token
+ 캐시 읽기 × cached_input_per_token
+ 캐시 쓰기 × cache_write_per_token
+ 출력 × output_per_token
크레딧 = 토큰 요금 × 할증 배수 + 웹 검색 횟수 × web_search_per_request- 캐시 읽기·쓰기 단가가 없는 모델(가격표의 "—")은 그 토큰을 일반 입력 단가로 계산합니다.
- 캐시 쓰기 보존 기간을 늘리면 단가가 다릅니다 — Anthropic 1시간 캐시(
usage.cache_creation.ephemeral_1h_input_tokens)는 입력 단가 × 2, OpenAI 12시간 보존 캐시 쓰기는 입력 단가 × 2.5입니다. - 이미지 입력은 프로바이더가 입력 토큰에 포함해 보고하므로 입력 단가로 계산됩니다. 이미지 출력 토큰이 따로 보고되면
image_output_per_token을 적용합니다. - OpenRouter와 xAI는 응답에 프로바이더 실제 청구액(
usage.cost,cost_in_usd_ticks)이 있으면 그 금액 × 1,858로 정산합니다. 이때 가격표 단가는 견적용입니다.
응답 usage 필드와의 대응
| 응답 형식 | 일반 입력 | 캐시 읽기 | 캐시 쓰기 | 출력 |
|---|---|---|---|---|
| OpenAI Chat Completions | prompt_tokens − cached_tokens − cache_write_tokens | prompt_tokens_details.cached_tokens | prompt_tokens_details.cache_write_tokens | completion_tokens |
| OpenAI Responses | input_tokens − cached_tokens − cache_write_tokens | input_tokens_details.cached_tokens | input_tokens_details.cache_write_tokens | output_tokens |
| Anthropic Messages | input_tokens | cache_read_input_tokens | cache_creation_input_tokens | output_tokens |
| Gemini | promptTokenCount − cachedContentTokenCount | cachedContentTokenCount | — (암묵적 캐시만) | candidatesTokenCount + thoughtsTokenCount |
OpenAI와 Gemini는 캐시 토큰이 입력 합계 안에 들어 있어 빼야 하고, Anthropic은input_tokens에 캐시 토큰이 들어 있지 않습니다. OpenAI의 추론 토큰(reasoning_tokens)은 이미 출력 합계에 포함되어 있으므로 더하지 않습니다.
롱컨텍스트 티어
일부 모델은 입력 토큰(캐시 읽기 포함)이 경계를 넘으면 요청 전체(입력·출력 모두)가 더 높은 요율로 청구됩니다. 해당 모델은 가격 API의 long_context와 가격표의 모델 아래 줄에 요율이 표시됩니다.
가격 정보를 불러오는 중…
할증 (우선 처리·Fast 모드)
프로바이더가 응답에서 그 티어로 처리했다고 보고한 경우에만 적용되며, 토큰 요금 전체에 곱합니다(웹 검색 요금은 제외). 요청이 표준 티어로 강등되어 처리되면 표준 요금입니다. 여러 할증이 함께 적용되면 배수를 곱합니다. 모델별 목록은 가격 API의 surcharges에 있습니다.
flex 티어는 할인이 반영되지 않고 표준 요금으로 청구됩니다. 목록에 없는 OpenAI 모델이 Fast·Ultrafast로 처리됐다고 보고되면 가장 높은 공개 배수(2.5·6)를 적용합니다.
참고 구현 (Python)
import requests
PRICING = {
m["id"]: m["pricing"]
for m in requests.get("https://api.core.today/v1/providers/llm/models").json()["models"]
}
def llm_credits(model, *, prompt=0, cache_read=0, cache_write=0, output=0,
web_searches=0, tiers=()):
"""prompt = 캐시를 뺀 일반 입력 토큰. 인자는 위 'usage 필드 대응' 표를 따른다.
tiers = 응답이 보고한 할증 이름들 (예: ("openai_fast",))."""
p = PRICING[model]
web = p.get("web_search_per_request", 0)
surcharge = 1.0
for s in p.get("surcharges", []):
if s["name"] in tiers:
surcharge *= s["multiplier"]
lc = p.get("long_context")
total_in = prompt + cache_read + cache_write
if lc and (total_in >= lc["threshold_tokens"] if lc["threshold_inclusive"]
else total_in > lc["threshold_tokens"]):
p = lc # 요청 전체가 롱컨텍스트 요율
inp = p["input_per_token"]
tokens = (prompt * inp
+ cache_read * p.get("cached_input_per_token", inp)
+ cache_write * p.get("cache_write_per_token", inp)
+ output * p["output_per_token"])
return tokens * surcharge + web_searches * web
# Anthropic 응답 usage 예시
u = {"input_tokens": 1200, "cache_read_input_tokens": 8000,
"cache_creation_input_tokens": 0, "output_tokens": 340}
print(llm_credits("claude-haiku-4-5", prompt=u["input_tokens"],
cache_read=u["cache_read_input_tokens"],
cache_write=u["cache_creation_input_tokens"],
output=u["output_tokens"]))이 계산은 견적·검산용입니다. 실제 청구액은 응답의 usage.coredot.credits(응답에 사용 크레딧 받기), 지난 요청은 요청별 청구액 조회와 콘솔 사용량 페이지가 기준입니다.
응답에 사용 크레딧 받기
요청 헤더에 X-Coredot-Include-Cost: true를 넣으면 그 요청에 청구되는 크레딧이 응답에 함께 실립니다. 요청마다 비용을 기록하거나 리셀러로서 회원에게 다시 청구할 때 별도 조회 없이 바로 쓸 수 있습니다. 헤더를 넣지 않으면 응답은 프로바이더 원본 그대로입니다.
curl -X POST https://api.core.today/llm/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-H "X-Coredot-Include-Cost: true" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "안녕"}]
}'응답의 usage 객체 안에 coredot이 추가됩니다 (기존 필드는 그대로):
"usage": {
"prompt_tokens": 1200,
"completion_tokens": 340,
"coredot": {
"credits": 0.384606,
"request_id": "a1b2c3d4e5f60718-1762500000000000000",
"estimated": false
}
}| 응답 형태 | 위치 |
|---|---|
| OpenAI·Anthropic·OpenRouter 등 (일반 응답) | usage.coredot + 응답 헤더 X-Coredot-Credits |
| Gemini 네이티브 (일반 응답) | usageMetadata.coredot + 응답 헤더 X-Coredot-Credits |
| 스트리밍 | 마지막 usage 이벤트에만 실립니다 — OpenAI는 choices: [] 청크, Claude는 message_delta, Responses API는 response.completed, Gemini는 finishReason이 있는 청크. 스트리밍에는 응답 헤더가 없습니다. Gemini streamGenerateContent를 ?alt=sse 없이 부르면 본문이 JSON 배열로 와서 크레딧이 본문에 실리지 않고 X-Coredot-Credits 헤더로만 옵니다 — 본문에서 읽으려면 ?alt=sse를 붙이세요. |
공식 SDK에서는 기본 헤더로 한 번만 지정하면 됩니다. SDK가 모르는 필드도 보존하므로 바로 읽을 수 있습니다:
from openai import OpenAI
client = OpenAI(
base_url="https://api.core.today/llm/openai/v1",
api_key="cdt_your_api_key",
default_headers={"X-Coredot-Include-Cost": "true"},
)
r = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "안녕"}],
)
print(r.usage.model_extra["coredot"]["credits"]) # 0.384606
# Anthropic SDK도 같습니다: Anthropic(..., default_headers={...})
# m.usage.model_extra["coredot"]["credits"]credits— 이 요청에 청구되는 크레딧. 정산과 같은 계산(토큰 단가, 캐시 읽기·쓰기, 추론 토큰, 웹 검색 요금, Fast·우선 처리 할증 포함)입니다. 지수 표기 없이 일반 소수로 내려갑니다.request_id— 응답 헤더X-Request-Id와 같은 값. 문의하실 때 알려 주세요.estimated—true면 프로바이더가 사용량을 보고하지 않아 게이트웨이 추정치로 청구된 경우입니다.
- 응답이 만들어지는 시점의 계산값입니다. 드물게 실제 차감액이 더 적을 수 있습니다(예: 예약액을 넘는 추가 차감 시 잔액 부족). 확정 차감액은 아래 요청별 청구액 조회, 남은 잔액은
GET /v1/balance로 확인하세요. - 일반 응답의
X-Coredot-Credits헤더는 오류 응답에도 실립니다(청구가 없으면 0). 오류 본문은 바꾸지 않습니다. - 이 헤더는 프로바이더로 전달되지 않으며, 브라우저에서 호출할 때도 CORS로 허용·노출됩니다.
요청별 청구액 조회
응답 헤더 X-Request-Id로 지난 요청의 실제 차감된 크레딧을 API 키로 조회합니다. 응답을 놓쳤거나(타임아웃· 끊긴 스트림) 크레딧 표시 헤더 없이 보낸 요청, 자체 정산 대조에 씁니다.
curl "https://api.core.today/v1/llm/requests/a4262991c2a17116-1794057545962356314" \
-H "X-API-Key: cdt_your_api_key"{
"request_id": "a4262991c2a17116-1794057545962356314",
"status": "completed",
"model": "claude-haiku-4-5-20251001",
"provider": "anthropic",
"credits": 1.680747,
"input_tokens": 23,
"output_tokens": 5,
"total_tokens": 28,
"latency_ms": 580,
"error_code": null,
"settled_at": "2026-11-07T13:19:06.687002Z"
}credits는 정산에서 실제로 차감된 금액입니다. 실패한 요청은status가failed, 크레딧 0이고error_code에 원인이 있습니다.input_tokens는 캐시 읽기·쓰기를 따로 보고하는 프로바이더(Anthropic)에서는 캐시 토큰을 포함하지 않습니다. 토큰 구성별 검산은 응답의 usage로 하세요.- 응답이 끝나고 몇 초 안에 조회됩니다. 같은 워크스페이스의 요청만 보이고, 없거나 다른 워크스페이스의 요청은 404
request_not_found입니다. 게이트웨이가 프로바이더에 보내기 전에 거절한 요청(인증 실패 등)은 기록되지 않습니다. - 리셀러 워크스페이스 키는
X-Customer-Id(그 회원의 요청만) 또는X-Customer-Scope: all이 필요합니다. 둘 다 없으면 400customer_scope_required. - 생성 요청과 별도의 조회 한도(분당 60회)를 씁니다. 크레딧은 들지 않습니다.
한 번에 여러 답변 받기 (n)
OpenAI Chat Completions의 n을 지정하면 같은 프롬프트에 대한 답변 후보를 여러 개 받을 수 있습니다. 문구 시안 여러 개 뽑기, 답변 중 가장 나은 것 고르기 등에 유용합니다. 응답의 choices 배열에 n개가 담깁니다.
curl -X POST https://api.core.today/llm/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4o-mini",
"messages": [{"role": "user", "content": "카페 이름 아이디어를 하나 제안해 줘"}],
"n": 3,
"max_tokens": 100
}'- 입력(프롬프트)은 한 번만 청구되고, 출력은 답변 n개의 출력 토큰 합계로 청구됩니다.
max_tokens는 답변 하나당 상한입니다. 요청 전에max_tokens × n만큼의 출력 비용이 예약되므로, 잔액이 이보다 적으면402가 반환됩니다. 쓰지 않은 예약분은 응답 직후 환불됩니다.max_tokens를 생략하면 답변당 기본 추정치로 예약합니다. 예상 길이에 맞게 직접 지정하면 예약이 정확해져 잔액이 불필요하게 묶이지 않습니다.
n은 최대 128까지 지정할 수 있습니다. 넘으면400 invalid_choice_count로 거절되며 비용은 청구되지 않습니다.- Gemini는 같은 기능을
generationConfig.candidateCount로 제공하며 비용·예약 방식이 같습니다. Claude(Anthropic)는 지원하지 않으므로 여러 답변이 필요하면 요청을 나눠 보내세요. - 지원 여부는 모델마다 다릅니다(일부 추론 모델은
n을 1만 허용). 지원하지 않는 모델에서는 프로바이더가 400을 반환합니다.
프롬프트 캐싱 (Claude 자동 비용 절감)
Claude 모델을 호출할 때 매번 똑같이 반복되는 앞부분(시스템 프롬프트·대화 히스토리)을 게이트웨이가 자동으로 캐시합니다. 두 번째 요청부터 그 부분은 다시 계산되지 않고 캐시에서 읽혀, 입력 토큰가의 10% 가격으로 청구됩니다. 별도 설정이나 코드 변경은 필요 없습니다.
| 캐시되는 부분 | 조건 |
|---|---|
시스템 프롬프트 (system) | 항상 — 같은 시스템 프롬프트를 쓰는 모든 요청 |
| 대화 히스토리 (직전 답변까지) | 멀티턴 대화일 때 — 이전 assistant 답변이 포함된 요청 |
| 새로 보낸 마지막 질문 | 캐시하지 않음 — 매번 바뀌므로 정상 가격 |
같은 시스템 프롬프트를 재사용하거나 대화를 계속 이어가면 캐시가 잘 적중합니다:
1번째 요청: [긴 시스템 프롬프트] + "질문 A" → 시스템 프롬프트를 캐시에 저장
2번째 요청: [긴 시스템 프롬프트] + "질문 B" → 캐시에서 읽음 (10% 가격)
3번째 요청: [긴 시스템 프롬프트] + "질문 C" → 캐시에서 읽음usage.cache_read_input_tokens가 0보다 크면 캐시가 적중한 것입니다. (cache_creation_input_tokens는 캐시에 새로 저장된 토큰)- Claude(Anthropic) 요청에만 적용됩니다. OpenAI는 서버가 자동 캐싱, Gemini는 별도 방식입니다.
- 앞부분이 최소 캐시 길이(대략 1,024토큰)에 못 미치면 캐시가 적용되지 않습니다 — 이때는 추가 비용도 없습니다.
- 캐시는 마지막 사용 후 약 5분간 유지되며, 그 안에 다시 쓰이면 자동 연장됩니다.
- 요청에 직접
cache_control을 넣은 경우, 그 설정을 그대로 사용합니다(게이트웨이가 손대지 않음).
웹 검색 도구 요금 (서버 실행 검색)
모델이 프로바이더 서버에서 직접 웹을 검색하는 도구는 토큰 요금과 별도로 검색 1회마다 요금이 붙습니다. 검색 결과로 모델에 들어간 내용은 일반 입력 토큰으로 청구됩니다. 실패한 검색은 청구되지 않습니다.
| 프로바이더 | 도구 | 요금 |
|---|---|---|
| Anthropic (Claude) | web_search_20250305 / 20260209 / 20260318 | 검색당 18.58 크레딧 ($10/1,000) |
| OpenAI (Responses API) | web_search / web_search_preview | 검색당 18.58 크레딧 ($10/1,000). 단 gpt-4o·gpt-4.1 계열의 web_search_preview 는 46.45 ($25/1,000) |
| Google (Gemini) | google_search / google_maps | Gemini 3+ 쿼리당 26.012, 2.5는 요청당 65.03(Search)·46.45(Maps) |
| Meta (Muse Spark) | web_search | 검색당 4.645 크레딧 ($2.50/1,000) |
curl -X POST https://api.core.today/llm/anthropic/v1/messages \
-H "Authorization: Bearer cdt_your_api_key" \
-H "anthropic-version: 2023-06-01" -H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "오늘 서울 날씨 알려 줘"}],
"tools": [{"type": "web_search_20250305", "name": "web_search", "max_uses": 3}]
}'- 검색 도구가 켜진 요청은 검색 10회분(Claude는
max_uses가 있으면 그 횟수)과 검색 결과 입력분을 미리 예약하고, 쓰지 않은 예약은 응답 직후 환불됩니다. 비용을 제한하려면max_uses를 지정하세요. - Claude의 동적 필터링 버전(
web_search_20260209이후)이 내부적으로 쓰는 코드 실행에는 추가 요금이 없습니다. 이 버전은 응답이 몇 분씩 걸릴 수 있으니 HTTP 타임아웃을 넉넉히 두세요. 중간에 연결을 끊어도 이미 실행된 검색은 청구됩니다. - Claude의
web_fetch(URL 내용 가져오기)는 별도 요금 없이 토큰으로만 청구됩니다.
비용 계산 예시
1,000 토큰 입력, 500 토큰 출력 기준 (현재 가격, 캐시·할증 없음 — 자세한 규칙은 비용 계산법):
| 모델 | 입력 (크레딧/1M 토큰) | 출력 (크레딧/1M 토큰) | 캐시 읽기 | 캐시 쓰기 |
|---|---|---|---|---|