<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mpoper</title>
    <description>The latest articles on DEV Community by mpoper (@mpoper).</description>
    <link>https://dev.to/mpoper</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4082835%2F11d63ecc-db8c-42f3-aad9-823868ef7a92.png</url>
      <title>DEV Community: mpoper</title>
      <link>https://dev.to/mpoper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mpoper"/>
    <language>en</language>
    <item>
      <title>How Can a Startup Reduce LLM API Costs: A 2026 Playbook</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Thu, 03 Sep 2026 14:10:02 +0000</pubDate>
      <link>https://dev.to/mpoper/how-can-a-startup-reduce-llm-api-costs-a-2026-playbook-k2n</link>
      <guid>https://dev.to/mpoper/how-can-a-startup-reduce-llm-api-costs-a-2026-playbook-k2n</guid>
      <description>&lt;h1&gt;
  
  
  How Can a Startup Reduce LLM API Costs: A 2026 Playbook
&lt;/h1&gt;

&lt;p&gt;As of Sep 2026, startups can reduce LLM API costs by 70–85%—and up to 90% in optimal cases—by combining model routing, prompt caching, batch processing, and semantic caching, without sacrificing output quality on critical tasks. According to 2026 research from MorphLLM, NeuralTrust, and PremAI, the most effective strategies involve selecting the right model size for each task, aggressively caching repeated context, and leveraging discounted batch APIs. While enterprise LLM API spending more than doubled from $3.5B to $8.4B between late 2024 and mid-2025, the same period saw the maturation of cost-optimization tools and techniques accessible to any technical team. This guide systematically breaks down the highest-leverage strategies, benchmarked with 2026 data, so your startup can maintain performance while drastically cutting token spend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with Provider Price Benchmarking
&lt;/h2&gt;

&lt;p&gt;Before optimizing anything else, you must understand current token pricing across major providers. As of Sep 2026, the pricing landscape is highly competitive, with significant per-model and per-feature variations. For a comprehensive, constantly updated comparison, refer to our &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt;, which tracks changes across OpenAI, Claude, DeepSeek, Kimi, Gemini, and domestic Chinese models.&lt;/p&gt;

&lt;p&gt;Key benchmarking steps include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate input vs. output pricing&lt;/strong&gt; separately, as they often differ by a 3–5x factor (e.g., OpenAI's general-purpose models typically price input:output at 1:4, Anthropic Claude at 1:5—&lt;a href="https://platform.openai.com/docs/pricing" rel="noopener noreferrer"&gt;OpenAI pricing&lt;/a&gt;, &lt;a href="https://www.anthropic.com/pricing" rel="noopener noreferrer"&gt;Anthropic pricing&lt;/a&gt;; exact rates subject to official pricing pages).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check volume discounts&lt;/strong&gt; offered by providers for committed usage tiers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare batch vs. real-time rates&lt;/strong&gt;, which we detail later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Factor in cache-read discounts&lt;/strong&gt;: Anthropic offers up to 90% off on cache hits (&lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching" rel="noopener noreferrer"&gt;Anthropic Prompt Caching docs&lt;/a&gt;), while OpenAI offers 50% (&lt;a href="https://platform.openai.com/docs/guides/prompt-caching" rel="noopener noreferrer"&gt;OpenAI Prompt Caching docs&lt;/a&gt;); both discounts are documented in the providers' official API pricing pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical approach: pull a week of your production logs, replay them against two or three candidate models' pricing sheets, and calculate the total cost per successful request. Even a 20% difference in per-token price becomes substantial at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the Right Model Size for Each Task
&lt;/h2&gt;

&lt;p&gt;The single most impactful lever is &lt;strong&gt;model routing&lt;/strong&gt;: sending simple tasks to smaller, cheaper models and reserving flagship models for complex reasoning. As of Sep 2026, studies from NeuralTrust and PremAI indicate that a well-designed routing layer can cut costs by &lt;strong&gt;40–70%&lt;/strong&gt; in real workloads without measurable degradation in task-specific accuracy. Historical academic benchmarks are consistent with this: Stanford's FrugalGPT paper reported cost reductions of up to &lt;strong&gt;98%&lt;/strong&gt; via model routing/cascading while improving output quality (&lt;a href="https://arxiv.org/abs/2305.05176" rel="noopener noreferrer"&gt;arXiv:2305.05176&lt;/a&gt;, historical data from May 2023); LMSYS's RouteLLM showed &lt;strong&gt;85%&lt;/strong&gt; cost savings vs. the then-current GPT-4 at equal quality (&lt;a href="https://arxiv.org/abs/2406.18665" rel="noopener noreferrer"&gt;arXiv:2406.18665&lt;/a&gt;, historical data from June 2024). More recent 2026 production evaluations confirm 40–70% savings in real workloads.&lt;/p&gt;

&lt;p&gt;For example, a startup running a customer-support chatbot might route:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple FAQ and intent detection&lt;/strong&gt; → DeepSeek-V4-Flash or Kimi K2.5 (lower cost per token).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moderate reasoning and structured extraction&lt;/strong&gt; → Claude Sonnet 4.6 or GPT-5.2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complex multi-step analysis and code generation&lt;/strong&gt; → GPT-5.6 Terra/Sol or Claude Opus 5.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To illustrate the shape of the savings: a mix of DeepSeek-V4-Flash for classification and a flagship model only for final answer synthesis can cut token spend by roughly half or more compared with using a flagship for everything—run your own logs against the &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; to get your exact number. For reference on routing viability across models, see our &lt;a href="https://www.hefu.hk/docs" rel="noopener noreferrer"&gt;development docs&lt;/a&gt;, which document the feasibility of task-based model switching.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement Prompt Caching and Context Optimization
&lt;/h2&gt;

&lt;p&gt;Prompt caching is the easiest win with the fastest payback period. As of Jan 2026, a PwC study across 500 agent sessions with 10,000-token system prompts found that enabling prompt caching reduced costs by &lt;strong&gt;41–80%&lt;/strong&gt; and improved time-to-first-token (TTFT) by &lt;strong&gt;13–31%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Two types of caching matter:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Exact-match caching&lt;/strong&gt;: Provider-side, automatic (e.g., Anthropic's and OpenAI's caches; per Anthropic docs, cache reads are up to 90% cheaper, and per OpenAI docs, cached input tokens are 50% cheaper—&lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching" rel="noopener noreferrer"&gt;Anthropic docs&lt;/a&gt;, &lt;a href="https://platform.openai.com/docs/guides/prompt-caching" rel="noopener noreferrer"&gt;OpenAI docs&lt;/a&gt;). It works when your system prompt or conversation history is byte-identical. Set up is minimal, and the discounts are automatic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic caching&lt;/strong&gt;: A middleware layer that stores vector embeddings of previous responses and matches new queries by similarity (threshold 0.90–0.95). According to a 2026 VentureBeat case cited by Exadel and TowardsAI, semantic caching reduced a monthly bill from &lt;strong&gt;$47,000 to $12,700 (73% reduction)&lt;/strong&gt; and raised cache hit rates from 18% to 67%.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To maximize exact-match cache hits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep your &lt;strong&gt;system prompt static&lt;/strong&gt;; if you must vary it, use a limited set of templates.&lt;/li&gt;
&lt;li&gt;Reuse conversations where possible instead of starting fresh each time.&lt;/li&gt;
&lt;li&gt;Put the &lt;strong&gt;most variable content at the end&lt;/strong&gt; of the prompt, as many caches use prefix matching.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Compress and Filter Input Data Before Inference
&lt;/h2&gt;

&lt;p&gt;Sending an entire codebase, document, or chat history to the LLM is expensive. Instead, compress and filter before the request reaches the model.&lt;/p&gt;

&lt;p&gt;Effective techniques include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Summarization&lt;/strong&gt;: Use a small, cheap model (e.g., DeepSeek-V4-Flash) to summarize long documents into a 500-token brief, then send that to the flagship model for reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval-Augmented Generation (RAG)&lt;/strong&gt;: Instead of stuffing a full knowledge base into the context, retrieve only the top 3–5 relevant chunks (by semantic similarity) and concatenate them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic filtering&lt;/strong&gt;: Drop queries that are near-duplicates of previously answered ones, using vector search.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As of 2026, research from Exadel and TowardsAI shows that aggressive context compression can reduce token consumption by &lt;strong&gt;50–70%&lt;/strong&gt; while preserving over 90% of answer quality on typical knowledge-based tasks. Since input tokens are often billed at a higher rate than cached ones, filtering before inference has an outsized impact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set Up Request Batching and Asynchronous Processing
&lt;/h2&gt;

&lt;p&gt;Batch APIs are a hidden discount that many startups overlook. As of Sep 2026, both OpenAI and Anthropic offer &lt;strong&gt;50% discounts&lt;/strong&gt; on requests that can wait up to 24 hours (&lt;a href="https://platform.openai.com/docs/guides/batch" rel="noopener noreferrer"&gt;OpenAI Batch API docs&lt;/a&gt;; &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/batch-processing" rel="noopener noreferrer"&gt;Anthropic Batch Processing docs&lt;/a&gt;). For startups running nightly data processing, report generation, or internal evaluations, switching from real-time to batch is a one-line code change.&lt;/p&gt;

&lt;p&gt;When batch processing is combined with prompt caching on repeated content, the savings compound. According to 2026 research from MorphLLM, the combined discount can be as high as &lt;strong&gt;95%&lt;/strong&gt; for workloads with high cache-hit rates. But note the trade-off: batch requests have longer latency, so they are only suitable for non-interactive scenarios.&lt;/p&gt;

&lt;p&gt;A recommended pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-time&lt;/strong&gt;: User-facing chat, code generation, agentic tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch&lt;/strong&gt;: Any scheduled job, offline evaluation, mass content enrichment, or async data extraction.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Monitor Usage with Token-Level Analytics
&lt;/h2&gt;

&lt;p&gt;You cannot reduce what you don't measure. As of 2026, startup teams are expected to log per-endpoint, per-user, and per-feature token counts, then set hard budget alerts.&lt;/p&gt;

&lt;p&gt;Best practices include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log input/output/cache-hit tokens&lt;/strong&gt; for every request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use dashboards&lt;/strong&gt; to track weekly cost per model, per feature, and per team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set alerts&lt;/strong&gt; at 80% and 100% of your monthly budget in dollar terms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce rate limits&lt;/strong&gt; per API key or user, so a single runaway script cannot spike the bill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since token rates and model rankings shift frequently, we recommend a weekly review cycle for short-term adjustments and a monthly review for broader strategy changes, as we note in our &lt;a href="https://www.hefu.hk/models" rel="noopener noreferrer"&gt;model directory&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use an AI Gateway or Proxy for Cost Governance
&lt;/h2&gt;

&lt;p&gt;A gateway layer (like the one HeFu provides) gives you centralized control over your entire LLM stack. As of 2026, gateways have evolved to include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Virtual API keys&lt;/strong&gt; per team or project, isolating costs by owner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic model fallback&lt;/strong&gt;: If a cheap model fails or times out, route to a pricier one without code changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weighted load balancing&lt;/strong&gt; across multiple providers, so you can e.g., send 80% of traffic to DeepSeek-V4-Flash and 20% to GPT-5.6 Terra for complex reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edge-level exact-match caching&lt;/strong&gt; (as seen in &lt;a href="https://developers.cloudflare.com/ai-gateway/" rel="noopener noreferrer"&gt;Cloudflare AI Gateway&lt;/a&gt; or similar) to short-circuit repeated requests before they hit the LLM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HeFu's unified API endpoint (&lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt;) is designed for exactly this kind of governance. By aggregating OpenAI GPT, Claude, DeepSeek, Kimi, and Gemini models behind one key, you can switch models by changing a single field, without rewriting your codebase. This makes implementing a cost-aware routing policy straightforward. For a step-by-step integration walkthrough, visit our &lt;a href="https://www.hefu.hk/docs" rel="noopener noreferrer"&gt;development docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Negotiate Custom Pricing and Explore Open-Source Self-Hosting
&lt;/h2&gt;

&lt;p&gt;For startups with predictable, high-volume usage (e.g., &amp;gt; 1M tokens/day), negotiating a custom contract is viable. As of Sep 2026, major providers offer volume-based discounts of &lt;strong&gt;15–30%&lt;/strong&gt; off list prices for committed annual spending. The key is having usage data to justify the commitment.&lt;/p&gt;

&lt;p&gt;Self-hosting open-weight models is another lever, but it is not free. It eliminates per-token API fees but introduces compute, storage, and maintenance overhead. It becomes cost-effective only when you have consistent, high-traffic workloads (e.g., 100K+ tokens/hour) and where latency/privacy requirements prevent cloud calls. For most startups, API-based routing remains more economical.&lt;/p&gt;

&lt;p&gt;A practical approach is hybrid: host a small open-weight model for classification or extraction, and call a managed API for generative tasks. This aligns with the "rationalize model size" principle from earlier. For a deeper comparison of available Chinese models, our &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; is a useful reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compare HeFu's Unified API for Cost Efficiency
&lt;/h2&gt;

&lt;p&gt;At this point, the case for a unified aggregator like HeFu should be clear. HeFu's model catalog includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI GPT-5.6 (Terra/Sol/Luna)&lt;/strong&gt;, GPT-5.5, GPT-5.4, and GPT-5.2, plus GPT-5.3 Codex models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Opus 5 / Fable 5&lt;/strong&gt;, Sonnet 4.6, and Opus 4.8/4.7/4.6.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek-V4-Pro and V4-Flash&lt;/strong&gt; for extreme-value reasoning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kimi K2.5/K2.6/K3&lt;/strong&gt; for long-context Chinese tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 3.6 Flash, 3.5 series, 3.1 Pro, and 2.5 series&lt;/strong&gt; for multimodal workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chinese domestic models&lt;/strong&gt;: Qwen3.5/3.6/3.7, GLM-5.x, Doubao Seed 2.x, Grok 4.3/4.2, and MiniMax M2.5-M3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Media generation models&lt;/strong&gt;: 8 image models (gpt-image / gemini-image series) and 4 Seedance video generation models — a differentiator most text-only gateways do not offer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using one API key to access all of them means you can implement the exact strategies in this article—routing, fallback, semantic caching, and per-team budgets—without integrating with each provider separately. As of Sep 2026, our &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt; lists live token rates (subject to official page updates), and our &lt;a href="https://www.hefu.hk/models" rel="noopener noreferrer"&gt;model directory&lt;/a&gt; documents the capabilities of each model.&lt;/p&gt;

&lt;p&gt;Below is a comparative summary of the main strategies we have covered:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Estimated Savings (as of Sep 2026)&lt;/th&gt;
&lt;th&gt;Implementation Effort&lt;/th&gt;
&lt;th&gt;Best Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model right-sizing (routing)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;50–80%&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Mixed workloads with simple + complex tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompt caching (exact-match)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;40–90%&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Fixed system prompts, repeated conversations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Semantic caching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;30–73%&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Highly repetitive but varied user queries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Output length limits&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10–40%&lt;/td&gt;
&lt;td&gt;Very low&lt;/td&gt;
&lt;td&gt;Every request, set &lt;code&gt;max_tokens&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Batch API (24-hour latency)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Nightly jobs, evaluations, non-real-time processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Combined (all strategies)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;70–85% (up to 90%)&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Production systems with high volume&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Ready to put these strategies to work? &lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR" rel="noopener noreferrer"&gt;Sign up free&lt;/a&gt; and get a $1 trial credit—one key for every model mentioned in this guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the fastest way to reduce LLM API costs as a startup?
&lt;/h3&gt;

&lt;p&gt;The fastest approach is to implement three levers simultaneously: (1) route simple tasks to smaller models, (2) enable prompt caching, and (3) cap output token limits. According to 2026 research from NeuralTrust, this combination can reduce costs by &lt;strong&gt;40–70%&lt;/strong&gt; immediately, without changing your application logic. A typical implementation takes less than one engineering day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are batch APIs always cheaper than real-time APIs?
&lt;/h3&gt;

&lt;p&gt;Yes, as of Sep 2026, both OpenAI and Anthropic offer &lt;strong&gt;50% discounts&lt;/strong&gt; on batch APIs for requests that can wait up to 24 hours (&lt;a href="https://platform.openai.com/docs/guides/batch" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;, &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/batch-processing" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). However, the trade-off is latency: batch responses are not suitable for user-facing interactions. Use batch for data extraction, nightly report generation, and offline evaluations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can open-source models eliminate API costs entirely?
&lt;/h3&gt;

&lt;p&gt;Self-hosting open-weight models removes per-token API fees but replaces them with infrastructure, maintenance, and scaling costs. It becomes cost-effective only when you have consistent, high-volume traffic (e.g., over 100K tokens/hour) and you can tolerate the operational overhead. For most startups, a hybrid approach—open-source for simple tasks, API for complex ones—is the most economical.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does HeFu charge for failed requests or cached tokens?
&lt;/h3&gt;

&lt;p&gt;HeFu bills per token consumed on successfully completed requests. For the exact treatment of failed requests and cached-token pricing, refer to the current terms in the official docs: &lt;a href="https://www.hefu.hk/docs" rel="noopener noreferrer"&gt;https://www.hefu.hk/docs&lt;/a&gt; (subject to official updates).&lt;/p&gt;

&lt;h3&gt;
  
  
  How often should a startup review its LLM spending?
&lt;/h3&gt;

&lt;p&gt;We recommend reviewing token usage and model performance &lt;strong&gt;weekly&lt;/strong&gt;, with a formal cost-optimization review &lt;strong&gt;monthly&lt;/strong&gt;. Provider pricing and model rankings change frequently (as seen across 2025–2026), so you should re-benchmark your current model mix against &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;HeFu's pricing page&lt;/a&gt; at least once a month to ensure you are still on the most cost-effective configuration.&lt;/p&gt;

</description>
      <category>how</category>
      <category>can</category>
      <category>startup</category>
      <category>reduce</category>
    </item>
    <item>
      <title>Best Pay-as-You-Go LLM API for Indie Developers in 2026</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Thu, 03 Sep 2026 07:27:16 +0000</pubDate>
      <link>https://dev.to/mpoper/best-pay-as-you-go-llm-api-for-indie-developers-in-2026-3636</link>
      <guid>https://dev.to/mpoper/best-pay-as-you-go-llm-api-for-indie-developers-in-2026-3636</guid>
      <description>&lt;h1&gt;
  
  
  Best Pay-as-You-Go LLM API for Indie Developers in 2026
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;For indie developers and micro-teams in 2026, the best pay-as-you-go LLM API is HeFu (&lt;a href="https://www.hefu.hk" rel="noopener noreferrer"&gt;https://www.hefu.hk&lt;/a&gt;), which provides a unified key for multi-vendor frontier models—including the GPT-5.6 series, Claude Opus 5, DeepSeek-V4-Pro, and Kimi K3—with no monthly subscription, no minimum commitment, and a seamless OpenAI-compatible interface.&lt;/strong&gt; Unlike aggregators such as OpenRouter, which add a 5.5% platform fee on top of provider token rates (source: &lt;a href="https://openrouter.ai/blog" rel="noopener noreferrer"&gt;OpenRouter's official blog&lt;/a&gt;, 2026), or direct providers that lock you into a single ecosystem, HeFu lets you switch models per request without re-architecting your billing, making it the optimal starting point for hobbyists and bootstrapped startups alike.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executive Summary: The Top Pick for Indie Developers
&lt;/h2&gt;

&lt;p&gt;After evaluating on-ramp costs, rate limits, model coverage, and technical compatibility, the core verdict is clear: &lt;strong&gt;HeFu delivers the best balance of price, access, and simplicity for indie developers as of September 2026.&lt;/strong&gt; With direct Hong Kong node connectivity and standard international card billing in USD, HeFu removes the access barrier for non-US developers—especially those building with Chinese models like Qwen3.7-Max, GLM-5.x, and DeepSeek-V4-Pro. Subscription fatigue is a real problem in 2026: paying $20/month for a model you use for only three days is wasted spend. HeFu's usage-based model solves this by billing per token, ensuring you pay exactly for what you consume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Indie Developers Need Pay-as-You-Go (PAYG) Pricing
&lt;/h2&gt;

&lt;p&gt;Traditional subscription APIs create a mismatch between cost and usage—you pay a fixed fee whether you run 100 or 100,000 requests. PAYG pricing eliminates this waste. For an indie dev running a side project that sees variable traffic, a pay-as-you-go model means &lt;strong&gt;zero cost when idle&lt;/strong&gt;, and linear scaling during spikes. The cost-benefit is stark when compared to the free-tier landscape: OpenRouter's free tier limits users to 20 RPM and only 50 requests per day, while Groq offers 30 RPM/1,000 requests per day without a credit card, and Cerebras provides roughly 1M free tokens daily (source: &lt;a href="https://openrouter.ai/blog" rel="noopener noreferrer"&gt;OpenRouter's blog&lt;/a&gt;, 2026; &lt;a href="https://dataiku.com" rel="noopener noreferrer"&gt;Dataiku comparison&lt;/a&gt;, 2026). However, free tiers come with strings attached—rate limits often throttle real user traffic. According to OpenRouter's documentation, the default free-tier limit for non-paid users is 50 requests/day and 20 requests/minute across all models (source: &lt;a href="https://openrouter.ai/docs/limits" rel="noopener noreferrer"&gt;OpenRouter docs&lt;/a&gt;, 2025). PAYG frees you from these caps, and with HeFu, you can scale from zero to high volume without ever re-negotiating a contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation Criteria for Our #1 Pick
&lt;/h2&gt;

&lt;p&gt;To rank the best PAYG options, we benchmarked five key metrics as of September 2026:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Price per million tokens (input/output)&lt;/strong&gt;: Critical for high-volume tasks like RAG ingestion or batch summarization. For context, Gemini 2.5 Flash costs $0.15 input/$0.60 output per million tokens, and DeepSeek-V4-Pro delivers frontier-class reasoning at a fraction of the cost of premium western flagships (source: &lt;a href="https://futureagi.com" rel="noopener noreferrer"&gt;Future AGI&lt;/a&gt;, 2026). According to Google's official pricing page, Gemini 2.5 Flash pricing is $0.30 per million input tokens and $2.50 per million output tokens for prompts under 200K tokens (source: &lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;Google AI pricing&lt;/a&gt;, 2025). DeepSeek's official API pricing for DeepSeek-V4-Pro is $2.10 per million input tokens (cache miss) and $4.40 per million output tokens on some platforms (source: &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek API pricing&lt;/a&gt;, 2025).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits&lt;/strong&gt;: A free tier of 20 RPM is only useful for smoke tests; production requires flexible upgrades.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model variety&lt;/strong&gt;: A unified API must cover both western frontier models (Claude, GPT) and Chinese cost leaders (DeepSeek, Qwen).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature compatibility&lt;/strong&gt;: The API must support standard OpenAI SDKs to minimize migration friction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Onboarding experience&lt;/strong&gt;: No credit card for trials, instant key generation, and clear documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Comparing the Top API Providers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;On-Ramp Cost&lt;/th&gt;
&lt;th&gt;Platform Fee / Discounts&lt;/th&gt;
&lt;th&gt;Free Tier Limits&lt;/th&gt;
&lt;th&gt;Model Access&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HeFu (Recommended)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No minimum, pay-per-token&lt;/td&gt;
&lt;td&gt;No hidden platform markup&lt;/td&gt;
&lt;td&gt;$1 signup credit as of Sep 2026&lt;/td&gt;
&lt;td&gt;OpenAI GPT-5.6, Claude Opus 5, DeepSeek-V4-Pro, Kimi K3, Gemini 3.6, Qwen3.7-Max, GLM-5.x, Grok 4.3, MiniMax M3, etc.&lt;/td&gt;
&lt;td&gt;Indie devs needing multi-model fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenRouter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$10 minimum recharge&lt;/td&gt;
&lt;td&gt;5.5% fee on top of provider rates&lt;/td&gt;
&lt;td&gt;20 RPM / 50 requests daily&lt;/td&gt;
&lt;td&gt;400+ models, but Chinese model coverage is fragmented&lt;/td&gt;
&lt;td&gt;Developers wanting a single key for obscure models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Groq&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No minimum&lt;/td&gt;
&lt;td&gt;50% batch discount; 50% prompt cache discount&lt;/td&gt;
&lt;td&gt;30 RPM / 1,000 requests daily&lt;/td&gt;
&lt;td&gt;Limited to Groq-hosted models&lt;/td&gt;
&lt;td&gt;Ultra-low-latency inference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Together AI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$5 minimum&lt;/td&gt;
&lt;td&gt;50% batch discount&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;DeepSeek-V4-Pro at $2.10 input/$4.40 output&lt;/td&gt;
&lt;td&gt;Batch processing on open models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Note: For current HeFu pricing per model, always refer to the official page: &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;https://www.hefu.hk/pricing&lt;/a&gt;. Figures for other providers reflect public list prices as of August 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The table highlights a key dynamic: while Groq and Together AI offer aggressive discounts (50% for batch jobs, per &lt;a href="https://fireworks.ai" rel="noopener noreferrer"&gt;Fireworks.ai&lt;/a&gt;, 2026), their model catalogs are narrower. OpenRouter offers breadth (400+ models) but charges a 5.5% platform fee and requires a $10 recharge to lift daily request limits from 50 to 1,000 (source: &lt;a href="https://openrouter.ai/blog" rel="noopener noreferrer"&gt;OpenRouter's blog&lt;/a&gt;, 2026). HeFu sits in the sweet spot: multi-model access without a surcharge, and a low-friction entry point for testers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Compatibility &amp;amp; Migrating from OpenAI
&lt;/h2&gt;

&lt;p&gt;The most painful part of switching LLM providers is often rewriting code. HeFu eliminates this with &lt;strong&gt;full OpenAI-SDK compatibility&lt;/strong&gt;. The API base URL is &lt;a href="https://api.hefu.hk/v1" rel="noopener noreferrer"&gt;https://api.hefu.hk/v1&lt;/a&gt;, meaning you only need to change one line in your existing Python or Node.js app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.hefu.hk/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because the interface follows standard REST/OpenAI conventions, agent frameworks like LangChain and LLaMAIndex work out of the box. This direct drop-in compatibility is a huge advantage over proprietary APIs which require custom SDKs. For context, Anthropic's Claude API uses a different message format (&lt;code&gt;/v1/messages&lt;/code&gt;) than OpenAI's chat completions endpoint (&lt;code&gt;/v1/chat/completions&lt;/code&gt;), requiring code changes when switching between them (source: &lt;a href="https://docs.anthropic.com/en/api/messages" rel="noopener noreferrer"&gt;Anthropic API docs&lt;/a&gt;, 2025). For a deeper dive on choosing the right gateway, see our guide: &lt;a href="https://dev.to/en/blog/ai-api-gateway-for-developers"&gt;AI API Gateway for Developers: A 2026 Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Use Cases &amp;amp; Practical Examples
&lt;/h2&gt;

&lt;p&gt;PAYG LLM APIs are ideal for specific indie applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RAG Chatbots&lt;/strong&gt;: Build a document Q&amp;amp;A bot over your own PDFs. With HeFu, you can route queries to DeepSeek-V4-Pro for cost-effective retrieval on common questions, then escalate to Claude Opus 5 or GPT-5.6 Terra for complex legal reasoning. If you're worried about retrieval costs, read our &lt;a href="https://dev.to/en/blog/cheap-deepseek-api-pay-as-you-go"&gt;Cheap DeepSeek API Pay As You Go: Complete Cost Guide&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Email Summarization&lt;/strong&gt;: Process hundreds of daily emails with Gemini 3.6 Flash (multimodal) to summarize threads, then use Kimi K2.5 for long-context rewrites in Chinese. Pay only for the tokens consumed by each email.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-Cost Web Scraper Parser&lt;/strong&gt;: Instead of subscribing to a $50/month scraping SaaS, use a PAYG API to parse raw HTML into structured JSON. For a few thousand pages monthly, the cost is pennies compared to fixed subscriptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The flexibility to mix models per use case—cheap for batch, premium for interactive—is the strongest argument for a unified gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Closer Look at HeFu's Pricing &amp;amp; Capabilities
&lt;/h2&gt;

&lt;p&gt;HeFu acts as a merchant of record for all major model families listed in its catalog—including OpenAI GPT-5.6 (Terra / Sol / Luna), Claude Sonnet 4.6, DeepSeek-V4-Flash, Kimi K2.6, and Gemini 3.5 Pro—for a simple reason: &lt;strong&gt;it lets you choose the cheapest model for each task&lt;/strong&gt; without opening five separate accounts. To avoid pricing surprises, note that per-token costs for flagship models have been dropping rapidly across the industry. For context (not available on HeFu), models like Claude Opus 4.5 saw significant price reductions compared to predecessors while pushing SWE-bench scores to 80.9% (source: &lt;a href="https://futureagi.com" rel="noopener noreferrer"&gt;Future AGI&lt;/a&gt;, 2026). Anthropic's official announcement for Claude 3.7 Sonnet listed the same $3 input/$15 output per million tokens pricing as its predecessor Claude 3.5 Sonnet, indicating a trend of stable or declining flagship pricing amid capability improvements (source: &lt;a href="https://www.anthropic.com/news/claude-3-7-sonnet" rel="noopener noreferrer"&gt;Anthropic news&lt;/a&gt;, 2025). As of September 2026, HeFu offers new accounts a $1 trial credit for experimentation and transparent, per-model billing. The exact rates per million tokens for input and output are model-specific and may adjust; the authoritative, always-current numbers are published at &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;https://www.hefu.hk/pricing&lt;/a&gt;. Unlike many rivals, HeFu has no hidden platform fee—your bill reflects provider token costs with a small, transparent margin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigating Limitations &amp;amp; Pitfalls
&lt;/h2&gt;

&lt;p&gt;Indie developers often stumble on three common issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rate Limits During Peaks&lt;/strong&gt;: Even with PAYG, free tiers have RPM caps. HeFu's paid tiers scale up, but if you need guaranteed throughput, you must pick a higher tier or implement client-side queues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Ended Costs in Background Jobs&lt;/strong&gt;: A rogue infinite loop in a batch summarizer can burn tokens silently. Always set hard spending caps at the API account level and monitor usage via dashboards. OpenAI and other major providers offer spending limits that can be configured per API key to prevent exceeding a set budget (source: &lt;a href="https://help.openai.com/en/articles/9186755-managing-your-costs-as-a-developer" rel="noopener noreferrer"&gt;OpenAI help center&lt;/a&gt;, 2025).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Context Window Mismatches&lt;/strong&gt;: Grok 4.3 (available on HeFu) supports 2-million-token context windows, while GPT-5 caps at 400K (source: &lt;a href="https://futureagi.com" rel="noopener noreferrer"&gt;Future AGI&lt;/a&gt;, 2026). If your prompt exceeds the model's limit, costs might increase due to chunking. Check each model's context window on the &lt;a href="https://www.hefu.hk/models" rel="noopener noreferrer"&gt;model catalog&lt;/a&gt; before designing your pipeline. By comparison, Anthropic's Claude 3.7 Sonnet (not available on HeFu) offers a 200K-token context window (source: &lt;a href="https://docs.anthropic.com/en/docs/about-claude/models/overview" rel="noopener noreferrer"&gt;Anthropic docs&lt;/a&gt;, 2025).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion &amp;amp; Final Verdict
&lt;/h2&gt;

&lt;p&gt;For indie developers in September 2026, there is no better balance of model access, pricing flexibility, and technical simplicity than HeFu. It resolves the classic dilemma—OpenRouter's 5.5% surcharge vs. direct providers' lack of variety—by acting as a neutral aggregator with zero monthly commitments. Whether you are bootstrapping a side project or scaling a micro-SaaS, HeFu's unified API for GPT, Claude, DeepSeek, Kimi, Gemini, and the Qwen/GLM family covers 95% of real-world use cases. Don't take our word for it; inspect the per-model rates on the official pricing page to see how cheap state-of-the-art models have become in 2026. For those exploring Chinese models, don't miss our practical comparison: &lt;a href="https://dev.to/en/blog/openrouter-alternative-for-chinese-models"&gt;OpenRouter Alternatives for Chinese Models&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ready to try it? &lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR" rel="noopener noreferrer"&gt;Create your free account&lt;/a&gt;—new users get a $1 trial credit, no subscription required.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the best pay-as-you-go LLM API for indie developers?
&lt;/h3&gt;

&lt;p&gt;The best choice, based on cost transparency, model coverage, and ease of onboarding, is HeFu (&lt;a href="https://www.hefu.hk" rel="noopener noreferrer"&gt;https://www.hefu.hk&lt;/a&gt;). It offers a unified API to top models like GPT-5.6, Claude Opus 5, DeepSeek-V4-Pro, and Kimi K3 without any monthly minimums or hidden platform fees, making it ideal for hobbyists and bootstrapped startups. As of September 2026, new accounts receive a $1 trial credit on signup.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the HeFu API support OpenAI SDK?
&lt;/h3&gt;

&lt;p&gt;Yes. HeFu uses the standard OpenAI-compatible REST format. To connect, simply change your base URL to &lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt; and keep your existing code logic intact. This applies to Python, Node.js, and any framework that leverages the OpenAI SDK, such as LangChain or AutoGen.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does the HeFu API cost per million tokens?
&lt;/h3&gt;

&lt;p&gt;The price per million tokens varies by model and is updated to reflect wholesale rate changes. For the exact current rates for models like DeepSeek-V4-Pro (e.g., $2.10 input / $4.40 output on some platforms) or GPT-5.6, please refer to the official pricing page: &lt;a href="https://www.hefu.hk/pricing" rel="noopener noreferrer"&gt;https://www.hefu.hk/pricing&lt;/a&gt;. There are no minimum top-ups, and you pay only for what you use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I switch from OpenAI to HeFu without changing my code?
&lt;/h3&gt;

&lt;p&gt;Absolutely. Since HeFu implements the OpenAI-standard API spec, the only required change is replacing the &lt;code&gt;base_url&lt;/code&gt; in your client setup from OpenAI's endpoint to &lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt;. No changes are needed to your prompting logic, streaming handlers, or function-calling schemas. For a technical walkthrough of gateway strategies, see our article on &lt;a href="https://dev.to/en/blog/ai-api-gateway-for-developers"&gt;AI API Gateways&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>best</category>
      <category>llm</category>
      <category>api</category>
      <category>for</category>
    </item>
    <item>
      <title>Open WebUI Custom OpenAI API Endpoint Setup: A Complete Guide (As of May 2026)</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 10:33:22 +0000</pubDate>
      <link>https://dev.to/mpoper/open-webui-custom-openai-api-endpoint-setup-a-complete-guide-as-of-may-2026-4efj</link>
      <guid>https://dev.to/mpoper/open-webui-custom-openai-api-endpoint-setup-a-complete-guide-as-of-may-2026-4efj</guid>
      <description>&lt;h1&gt;
  
  
  Open WebUI Custom OpenAI API Endpoint Setup: A Complete Guide (As of May 2026)
&lt;/h1&gt;

&lt;p&gt;Setting up a custom OpenAI-compatible endpoint in Open WebUI is a two-field configuration change and requires only two pieces of information: your provider's base URL and a valid API key. The official Docker quick-start exposes the UI on host port 3000 and persists data in &lt;code&gt;/app/backend/data&lt;/code&gt;; once the container is running, no rebuilds, code patches, or model-file edits are required to change the endpoint. When you point Open WebUI at a custom endpoint instead of the default &lt;code&gt;https://api.openai.com/v1&lt;/code&gt;, all configured models appear automatically in the same dropdown, local Ollama models keep working, and the change can be fully reverted by clearing two fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Configure a Custom Endpoint in Open WebUI
&lt;/h2&gt;

&lt;p&gt;By default, Open WebUI sends OpenAI-format requests to OpenAI's official API. A custom endpoint overrides the destination while keeping the same request/response contract, so you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Route through regional gateways — for example, HeFu's Hong Kong node, which offers direct connectivity without an overseas credit card (&lt;a href="https://dev.to/blog/hefu-hongkong-ai-api"&gt;HeFu Hong Kong AI API&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Aggregate multiple providers behind a single OpenAI-compatible base URL.&lt;/li&gt;
&lt;li&gt;Use self-hosted inference servers such as llama.cpp or vLLM, both of which expose the OpenAI-compatible &lt;code&gt;/v1/models&lt;/code&gt; and &lt;code&gt;/v1/chat/completions&lt;/code&gt; routes (&lt;a href="https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html" rel="noopener noreferrer"&gt;vLLM OpenAI-compatible server&lt;/a&gt;; &lt;a href="https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md" rel="noopener noreferrer"&gt;llama.cpp server&lt;/a&gt;; &lt;a href="https://docs.openwebui.com/features/connections" rel="noopener noreferrer"&gt;Open WebUI "Connect a Provider" documentation&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open WebUI itself also acts as a gateway: it exposes two provider-agnostic endpoints — OpenAI-format &lt;code&gt;POST /api/chat/completions&lt;/code&gt; and Anthropic-format &lt;code&gt;POST /api/v1/messages&lt;/code&gt; — both authenticated with a single Bearer token (&lt;a href="https://docs.openwebui.com/" rel="noopener noreferrer"&gt;Open WebUI Reference&lt;/a&gt;). This means one Open WebUI installation can serve both OpenAI-style and Anthropic-style clients from the same model pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites Before You Start
&lt;/h2&gt;

&lt;p&gt;You need three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A running Open WebUI instance&lt;/strong&gt; — Docker deployments are the most common; the official example maps host port 3000 to container port 8080 (&lt;code&gt;-p 3000:8080&lt;/code&gt;) (&lt;a href="https://docs.openwebui.com/getting-started/quick-start/start-with-docker/" rel="noopener noreferrer"&gt;Open WebUI Docker quick start&lt;/a&gt;; &lt;a href="https://github.com/open-webui/open-webui/issues/1826" rel="noopener noreferrer"&gt;GitHub Issue #1826&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An API key&lt;/strong&gt; from the provider you want to connect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The correct base URL&lt;/strong&gt; of the OpenAI-compatible endpoint.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A practical tip: some providers document a root endpoint but require &lt;code&gt;/v1&lt;/code&gt; appended before any request works. OpenAI's own API reference places the models and chat-completions routes under &lt;code&gt;/v1&lt;/code&gt;, so if your first connection returns 404, try adding &lt;code&gt;/v1&lt;/code&gt; to the base URL before touching anything else (&lt;a href="https://platform.openai.com/docs/api-reference" rel="noopener noreferrer"&gt;OpenAI API reference&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1: Setup Through the Admin Panel UI
&lt;/h2&gt;

&lt;p&gt;This is the fastest path and works for both Docker and desktop installs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Admin Settings → Connections&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the OpenAI API section, paste the provider's base URL into the &lt;strong&gt;API Base URL&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;Paste your API key into the &lt;strong&gt;API Key&lt;/strong&gt; field.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;, then refresh the page.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open WebUI automatically calls &lt;code&gt;GET /v1/models&lt;/code&gt; on your custom endpoint to populate the model dropdown, so new models usually appear within seconds — no manual model-ID entry is required. This is the same model-listing contract OpenAI exposes at &lt;code&gt;GET /v1/models&lt;/code&gt; (&lt;a href="https://platform.openai.com/docs/api-reference/models/list" rel="noopener noreferrer"&gt;OpenAI models API&lt;/a&gt;). If a provider doesn't implement &lt;code&gt;/v1/models&lt;/code&gt; correctly, the list will come back empty (more on this in troubleshooting below).&lt;/p&gt;

&lt;p&gt;There is also a same-UI path for Anthropic-style providers: Open WebUI's built-in Anthropic compatibility layer can auto-detect the Anthropic URL from a single API key and auto-discover available models (&lt;a href="https://docs.openwebui.com/" rel="noopener noreferrer"&gt;Open WebUI documentation&lt;/a&gt;). That said, for production workloads the official docs recommend switching to the Anthropic native API to unlock PDF support, extended thinking, and prompt caching. Anthropic's prompt caching can reduce input cost for cached tokens by up to 90% and latency by up to 85% (&lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching" rel="noopener noreferrer"&gt;Anthropic prompt caching&lt;/a&gt;; &lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/pdf-support" rel="noopener noreferrer"&gt;Anthropic PDF support&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2: Setup via Environment Variables (Docker / Headless)
&lt;/h2&gt;

&lt;p&gt;The minimal configuration is just two environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OPENAI_API_BASE_URLS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://your-provider.example/v1
&lt;span class="nv"&gt;OPENAI_API_KEYS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-your-key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;OPENAI_API_BASE_URLS&lt;/code&gt; accepts multiple comma-separated URLs, and &lt;code&gt;OPENAI_API_KEYS&lt;/code&gt; accepts the matching comma-separated keys — this is the officially documented minimal setup for multiple backends (&lt;a href="https://docs.openwebui.com/getting-started/env-configuration#openai_api_base_urls" rel="noopener noreferrer"&gt;Open WebUI environment configuration&lt;/a&gt;; &lt;a href="https://github.com/open-webui/open-webui/issues/1826" rel="noopener noreferrer"&gt;GitHub Issue #1826&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;In Docker Compose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/open-webui/open-webui:main&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3000:8080"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OPENAI_API_BASE_URLS=https://your-provider.example/v1&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;OPENAI_API_KEYS=sk-your-key&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;open-webui:/app/backend/data&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same variables can be placed in a &lt;code&gt;.env&lt;/code&gt; file for headless or Colab-style deployments. A MarkTechPost tutorial published on April 7, 2026 walks through exactly this pattern in Google Colab: using &lt;code&gt;getpass&lt;/code&gt; to read the OpenAI API key securely, setting the &lt;code&gt;OPENAI_API_BASE_URL&lt;/code&gt; environment variable, then generating a separate WebUI key and a default model for the chat interface (&lt;a href="https://marktechpost.com/" rel="noopener noreferrer"&gt;MarkTechPost, 2026-04-07&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Test Your Custom Endpoint Connection
&lt;/h2&gt;

&lt;p&gt;After saving, run two checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Model list check:&lt;/strong&gt; open a new chat and confirm the provider's models appear in the model selector. If they do, authentication and the &lt;code&gt;/v1/models&lt;/code&gt; call both succeeded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat round-trip check:&lt;/strong&gt; send a short test message, then look at the browser's developer console or the container logs. A successful request returns HTTP 200; a wrong key or unreachable host throws immediately with a 401 or a connection error.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can reproduce the model-list check from the shell with &lt;code&gt;curl https://your-provider.example/v1/models -H "Authorization: Bearer $OPENAI_API_KEY"&lt;/code&gt;; OpenAI's models API returns a &lt;code&gt;data&lt;/code&gt; array containing model IDs (&lt;a href="https://platform.openai.com/docs/api-reference/models/list" rel="noopener noreferrer"&gt;OpenAI models API&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If you're using a provider like HeFu, which unifies a global model catalog behind a single OpenAI-compatible endpoint, verify that both low-latency inference models (such as DeepSeek-V4-Pro or Gemini 3.6 Flash) and the embedding model (&lt;code&gt;text-embedding-3-large&lt;/code&gt;) load in the same dropdown — a useful sanity check for enterprise workflows. HeFu's catalog page is authoritative for current availability as of May 2026 (&lt;a href="https://dev.to/blog/hefu-hongkong-ai-api"&gt;HeFu Hong Kong AI API&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting Common Endpoint Failures
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;401 Unauthorized&lt;/strong&gt; — the API key is wrong, expired, or lacks the required scope. Regenerate the key in the provider dashboard and re-enter it in Admin Settings → Connections.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404 Not Found&lt;/strong&gt; — the base URL is missing the &lt;code&gt;/v1&lt;/code&gt; path. Append &lt;code&gt;/v1&lt;/code&gt; and re-save.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Models don't load&lt;/strong&gt; — the provider doesn't implement &lt;code&gt;GET /v1/models&lt;/code&gt;. Use a provider that supports model discovery, or enter model IDs manually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS/SSL certificate error&lt;/strong&gt; — a corporate proxy or self-signed certificate is interfering. Check the container's CA store or switch to a trusted gateway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two providers are known to break model-list loading: &lt;code&gt;api.together.xyz&lt;/code&gt; and &lt;code&gt;api.replicate.com&lt;/code&gt;, both because their endpoints don't fully implement the &lt;code&gt;GET /v1/models&lt;/code&gt; contract expected by Open WebUI (&lt;a href="https://docs.openwebui.com/features/connections" rel="noopener noreferrer"&gt;Open WebUI "Connect a Provider" docs&lt;/a&gt;; &lt;a href="https://github.com/open-webui/open-webui/issues/1826" rel="noopener noreferrer"&gt;GitHub Issue #1826&lt;/a&gt;). If a provider fails, switching to one that explicitly documents OpenAI compatibility — such as the aggregated catalog available through HeFu — avoids the problem entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open WebUI vs. Aggregator Platforms for Custom Endpoints
&lt;/h2&gt;

&lt;p&gt;Many users wonder whether to configure Open WebUI against an aggregator (OpenRouter, Requesty, Eden AI) or use it as their own aggregation layer. The table below summarizes the practical differences:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Open WebUI custom endpoint&lt;/th&gt;
&lt;th&gt;Aggregator platforms (OpenRouter, Requesty, Eden AI)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Configuration complexity&lt;/td&gt;
&lt;td&gt;Paste one URL + one key in Admin Settings, or set 2 environment variables&lt;/td&gt;
&lt;td&gt;Usually requires manual model IDs and often extra SDK installation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Protocol compatibility&lt;/td&gt;
&lt;td&gt;Proxies OpenAI Chat Completions, Anthropic Messages (&lt;code&gt;/api/v1/messages&lt;/code&gt;), Ollama native routes (&lt;code&gt;/ollama/api/&lt;/code&gt;), and the Open Responses specification&lt;/td&gt;
&lt;td&gt;Mostly OpenAI format only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model discovery&lt;/td&gt;
&lt;td&gt;Auto-calls &lt;code&gt;GET /v1/models&lt;/code&gt; to build the dropdown&lt;/td&gt;
&lt;td&gt;You typically select or enter model IDs manually&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local model support&lt;/td&gt;
&lt;td&gt;Ollama and local vLLM models coexist with remote endpoint models&lt;/td&gt;
&lt;td&gt;No local model support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The key takeaway: if you already run Open WebUI, it can replace most aggregator functions — including Anthropic-format requests that some aggregators charge a premium for. For readers comparing routing options for Chinese-language workloads, our &lt;a href="https://dev.to/en/blog/openrouter-alternative-for-chinese-models"&gt;practical guide to OpenRouter alternatives&lt;/a&gt; walks through the cost and latency trade-offs in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Best Practices for API Keys
&lt;/h2&gt;

&lt;p&gt;Treat your Open WebUI deployment like a production gateway:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prefer environment variables&lt;/strong&gt; over storing keys in the UI database, especially in Docker, so secrets don't persist in the WebUI's SQLite store.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use minimal-scope keys&lt;/strong&gt; — create a dedicated key with model-read and chat permissions only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restrict Admin Settings access&lt;/strong&gt; to trusted users, since anyone with admin rights can read and replace endpoint keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate keys&lt;/strong&gt; when a team member with admin access leaves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're connecting to HeFu, the Hong Kong node is reachable directly without an overseas credit card, and as of May 2026 the same endpoint serves the entire in-catalog lineup — including GPT-5.6 Terra/Sol/Luna, Claude Opus 5, DeepSeek-V4-Pro, Kimi K3, Gemini 3.6 Flash, and Qwen3.7-Max. Pricing for HeFu models is subject to the official pricing page and may change; check the &lt;a href="https://dev.to/blog/hefu-hongkong-ai-api"&gt;HeFu Hong Kong AI API guide&lt;/a&gt; for current access details. For a similar step-by-step integration on another chat frontend, see our guide: &lt;a href="https://dev.to/en/blog/lobechat-custom-provider-hefu-setup-guide"&gt;How to Set Up HeFu as a Custom Provider in LobeChat&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why don't my models show up after I add a custom OpenAI endpoint?
&lt;/h3&gt;

&lt;p&gt;The most common cause is that the provider doesn't implement the &lt;code&gt;GET /v1/models&lt;/code&gt; endpoint, so Open WebUI can't discover the model list — this is exactly what happens with &lt;code&gt;api.together.xyz&lt;/code&gt; and &lt;code&gt;api.replicate.com&lt;/code&gt; (&lt;a href="https://github.com/open-webui/open-webui/issues/1826" rel="noopener noreferrer"&gt;GitHub Issue #1826&lt;/a&gt;). Check three things in order: the base URL ends with &lt;code&gt;/v1&lt;/code&gt;, the API key has model-read permission, and the provider returns a valid model list when you call &lt;code&gt;GET /v1/models&lt;/code&gt; with curl.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do third-party OpenAI-compatible clients call models through Open WebUI?
&lt;/h3&gt;

&lt;p&gt;Point them at Open WebUI's own OpenAI-compatible API base URL — for the standard Docker command this is &lt;code&gt;http://your-host:3000/api/v1&lt;/code&gt; — with an API key generated in Open WebUI's user settings (&lt;a href="https://docs.openwebui.com/" rel="noopener noreferrer"&gt;Open WebUI API docs&lt;/a&gt;). Home Assistant, AutoGen, and similar clients can then use any model already configured in Open WebUI, including your custom endpoints.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I configure multiple custom endpoints at the same time?
&lt;/h3&gt;

&lt;p&gt;Yes. Use the &lt;code&gt;OPENAI_API_BASE_URLS&lt;/code&gt; and &lt;code&gt;OPENAI_API_KEYS&lt;/code&gt; environment variables with comma-separated values, and all providers' models will merge into the same dropdown (&lt;a href="https://github.com/open-webui/open-webui/issues/1826" rel="noopener noreferrer"&gt;GitHub Issue #1826&lt;/a&gt;). You can also add multiple providers one by one in Admin Settings → Connections.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I revert to the default OpenAI endpoint?
&lt;/h3&gt;

&lt;p&gt;Simply clear the custom base URL and API key fields in Admin Settings → Connections (or remove the environment variables and restart the container). Open WebUI then falls back to &lt;code&gt;api.openai.com&lt;/code&gt; with your regular OpenAI credentials. Reverting does not affect other saved connections or local Ollama models.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a custom endpoint affect local Ollama models?
&lt;/h3&gt;

&lt;p&gt;No. Ollama models use a separate native route (&lt;code&gt;/ollama/api/&lt;/code&gt;) and keep working alongside custom endpoints in the same model selector (&lt;a href="https://docs.openwebui.com/features/connections" rel="noopener noreferrer"&gt;Open WebUI "Connect a Provider" docs&lt;/a&gt;). You can mix a local vLLM server, Ollama, and a regional gateway such as HeFu in one interface without conflicts.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=open-webui-custom-openai-api-endpoint-setup" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>open</category>
      <category>webui</category>
      <category>custom</category>
      <category>openai</category>
    </item>
    <item>
      <title>Cline VS Code Custom OpenAI-Compatible Provider Setup: Complete Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 10:31:50 +0000</pubDate>
      <link>https://dev.to/mpoper/cline-vs-code-custom-openai-compatible-provider-setup-complete-guide-39j4</link>
      <guid>https://dev.to/mpoper/cline-vs-code-custom-openai-compatible-provider-setup-complete-guide-39j4</guid>
      <description>&lt;h1&gt;
  
  
  Cline VS Code Custom OpenAI-Compatible Provider Setup: Complete Guide
&lt;/h1&gt;

&lt;p&gt;Setting up a custom OpenAI-compatible provider in Cline within VS Code takes about 2–5 minutes: navigate to Settings → Providers, choose "OpenAI Compatible," enter your Base URL, API key, and model ID, then click Verify. This configuration lets you bypass Cline's default providers to cut API costs, keep prompts inside your own network, and reach models absent from the built-in catalog. The walkthrough below reflects official Cline documentation and community sources as of May 2026 (&lt;a href="https://docs.cline.bot/features/openai-compatible" rel="noopener noreferrer"&gt;Cline OpenAI-Compatible docs&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use a Custom OpenAI-Compatible Provider in Cline?
&lt;/h2&gt;

&lt;p&gt;Cline is one of the most widely used agentic coding extensions; its GitHub star count changes frequently, so confirm the current number on the official repository (&lt;a href="https://github.com/cline/cline" rel="noopener noreferrer"&gt;github.com/cline/cline&lt;/a&gt;), and it supports VS Code, JetBrains (Early Access), Cursor, and Windsurf (&lt;a href="https://docs.cline.bot/" rel="noopener noreferrer"&gt;Cline docs&lt;/a&gt;). It operates in BYOK (bring-your-own-key) mode, meaning there is no agent subscription fee — you pay only the underlying model API price (&lt;a href="https://cline.bot" rel="noopener noreferrer"&gt;cline.bot&lt;/a&gt;). That architecture makes the provider choice the single most important cost and performance lever.&lt;/p&gt;

&lt;p&gt;Three reasons developers switch to a custom OpenAI-compatible endpoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt;: coding-agent loops burn tokens quickly; routing through cheaper models can dramatically reduce spend. Check current rates on the official pricing pages (&lt;a href="https://openai.com/api/pricing/" rel="noopener noreferrer"&gt;OpenAI API pricing&lt;/a&gt;, &lt;a href="https://platform.deepseek.com/pricing" rel="noopener noreferrer"&gt;DeepSeek pricing&lt;/a&gt;), and consult third-party benchmarks for DeepSeek V4 vs GPT API cost estimates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy and compliance&lt;/strong&gt;: you can point Cline at a self-hosted gateway inside your VPC so prompts never leave your infrastructure, which matters for regulated industries (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;Cline enterprise docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model availability&lt;/strong&gt;: built-in providers only expose models they officially list; a custom endpoint can expose internal runtimes, local servers (vLLM, llama.cpp, LiteLLM), or third-party hubs (&lt;a href="https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html" rel="noopener noreferrer"&gt;vLLM OpenAI-compatible server&lt;/a&gt;, &lt;a href="https://github.com/ggml-org/llama.cpp" rel="noopener noreferrer"&gt;llama.cpp server&lt;/a&gt;, &lt;a href="https://docs.litellm.ai/docs/providers/openai_compatible" rel="noopener noreferrer"&gt;LiteLLM OpenAI-compatible docs&lt;/a&gt;). For developers in China, a regional gateway also avoids the connectivity problems discussed in our &lt;a href="https://dev.to/en/blog/openrouter-alternative-for-chinese-models"&gt;OpenRouter Alternatives for Chinese Models guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites and Compatibility Check
&lt;/h2&gt;

&lt;p&gt;Before you start, confirm the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VS Code&lt;/strong&gt;: any stable release from the past year, with the Cline extension installed from the marketplace (&lt;a href="https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev" rel="noopener noreferrer"&gt;VS Code Marketplace&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A valid endpoint&lt;/strong&gt;: an HTTP(S) URL implementing the OpenAI &lt;code&gt;/v1/chat/completions&lt;/code&gt; schema (&lt;a href="https://platform.openai.com/docs/api-reference/chat" rel="noopener noreferrer"&gt;OpenAI API reference&lt;/a&gt;). Most gateways and open-source LLM servers support this protocol, including vLLM, llama.cpp, and LiteLLM (links above).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A model ID&lt;/strong&gt;: the exact identifier your provider uses; not all gateways expose a &lt;code&gt;/models&lt;/code&gt; discovery endpoint, so the ID may not auto-fill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt;: an API key, or Azure AD credentials if your organization has enterprise identity enabled (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As of May 2026, the setup flow is identical across Cline's VS Code, Cursor, and Windsurf builds; JetBrains (Early Access) shares the same configuration model — confirm current labels on the &lt;a href="https://docs.cline.bot/" rel="noopener noreferrer"&gt;official Cline docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessing Cline's Provider Settings in VS Code
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open VS Code and click the &lt;strong&gt;Cline icon&lt;/strong&gt; in the left activity bar.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;gear/settings icon&lt;/strong&gt; at the top of the Cline panel.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Providers&lt;/strong&gt; section. If the section is missing, update the extension to the current marketplace version.&lt;/li&gt;
&lt;li&gt;Locate the &lt;strong&gt;API Provider&lt;/strong&gt; dropdown — this control switches the entire connection profile.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Selecting the "OpenAI Compatible" Provider Type
&lt;/h2&gt;

&lt;p&gt;In the API Provider dropdown, choose &lt;strong&gt;OpenAI Compatible&lt;/strong&gt;. This is distinct from the built-in "OpenAI" option: selecting "OpenAI" locks Cline to &lt;code&gt;https://api.openai.com/v1&lt;/code&gt;, while "OpenAI Compatible" accepts any endpoint implementing the same API schema. The official documentation explicitly states that the Base URL in this mode will not be &lt;code&gt;https://api.openai.com/v1&lt;/code&gt; (&lt;a href="https://docs.cline.bot/features/openai-compatible" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;). After selection, Cline shows the core fields: &lt;strong&gt;Base URL&lt;/strong&gt;, &lt;strong&gt;API Key&lt;/strong&gt;, &lt;strong&gt;Model ID&lt;/strong&gt;, and a &lt;strong&gt;Verify&lt;/strong&gt; button. In some versions, the Model ID sits inside a collapsible "Model Configuration" block — do not skip it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring the Base URL and API Endpoint
&lt;/h2&gt;

&lt;p&gt;The Base URL must include the &lt;code&gt;/v1&lt;/code&gt; path and no trailing slash. Correct examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt; (HeFu gateway — one key for the full model catalog)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://gateway.example.com/v1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;http://localhost:8000/v1&lt;/code&gt; (local runtime)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;https://api.example.com/openai/v1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The most common failure is omitting &lt;code&gt;/v1&lt;/code&gt; or adding a trailing slash, which produces &lt;code&gt;404 Not Found&lt;/code&gt; or &lt;code&gt;model not found&lt;/code&gt; errors. If your provider uses a gateway-style setup with one unified key and URL, this single field replaces per-model endpoint management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up API Key Authentication
&lt;/h2&gt;

&lt;p&gt;Paste your API key into the &lt;strong&gt;API Key&lt;/strong&gt; field. For shared or version-controlled workspaces, use environment-variable syntax &lt;code&gt;$ENV_VAR_NAME&lt;/code&gt; instead of a literal string, so the key never lands in a committed file. Cline stores the key only locally and only the extension itself uses it (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;). In enterprise deployments, you can enable &lt;strong&gt;Azure AD Identity Authentication&lt;/strong&gt; to skip the API key entirely; Cline automatically uses your Azure credentials (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;). If you are using a managed gateway such as HeFu's OpenAI-compatible endpoint, a single key grants access to every model in your plan; subscription and per-model rates are published on the official pricing page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing and Mapping Models
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Model Configuration&lt;/strong&gt; block is the most easily overlooked part of the form, yet for custom endpoints it is more critical than for built-in providers. Built-in providers auto-populate model lists; a custom endpoint may only accept models you explicitly type. Enter the exact &lt;strong&gt;Model ID&lt;/strong&gt; from your provider's documentation, assign a short custom display name if you manage multiple endpoints, and set an accurate context-window limit so Cline's token accounting matches reality (&lt;a href="https://docs.cline.bot/features/openai-compatible" rel="noopener noreferrer"&gt;Cline docs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;On LiteLLM proxies, for example, the model ID is typically the &lt;code&gt;model_name&lt;/code&gt; you defined in &lt;code&gt;config.yaml&lt;/code&gt; rather than the upstream provider's name (&lt;a href="https://docs.litellm.ai/docs/providers/openai_compatible" rel="noopener noreferrer"&gt;LiteLLM docs&lt;/a&gt;). On HeFu's gateway, enter the exact IDs from the official model catalog; as of May 2026, the current model list and rates are published on the official models and pricing pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Settings: Timeouts, Headers, and Proxy
&lt;/h2&gt;

&lt;p&gt;Depending on your network, you may need to adjust several optional parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom HTTP headers&lt;/strong&gt;: some corporate gateways require extra tokens, such as a governance header like &lt;code&gt;X-Coder-AI-Governance-Token&lt;/code&gt; (&lt;a href="https://coder.com/docs/v2.36.3" rel="noopener noreferrer"&gt;Coder docs v2.36.3&lt;/a&gt;). Cline passes your provider-defined headers with each request, and the receiving gateway can enforce policy on them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request timeouts&lt;/strong&gt;: reasoning models can take minutes on complex edits; if your endpoint is slow, increase the timeout in Cline's advanced settings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proxy support&lt;/strong&gt;: in restricted networks, configure the corporate proxy in VS Code's settings so Cline's outbound requests to your Base URL route correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Testing the Connection with a Simple Prompt
&lt;/h2&gt;

&lt;p&gt;Send a minimal prompt such as &lt;code&gt;Reply with OK&lt;/code&gt; in the Cline chat panel. A successful response confirms that your Base URL, key, model ID, and headers are all correct. If the panel returns an error, test the endpoint independently with &lt;code&gt;curl&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://your-gateway/v1/chat/completions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"model":"your-model-id","messages":[{"role":"user","content":"OK"}]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isolates whether the problem is in Cline or in the endpoint itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting Common Setup Errors
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Likely cause&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;401 Unauthorized&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wrong API key, or key lacks permission for the model&lt;/td&gt;
&lt;td&gt;Regenerate the key; verify model access; check &lt;code&gt;$ENV_VAR&lt;/code&gt; value&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;404 Not Found&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Base URL missing &lt;code&gt;/v1&lt;/code&gt;, or wrong path&lt;/td&gt;
&lt;td&gt;Re-read provider docs; remove trailing slash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Connection timeout&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Firewall, proxy, or unreachable host&lt;/td&gt;
&lt;td&gt;Test with &lt;code&gt;curl&lt;/code&gt;; configure proxy; check regional blocks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Model not found&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Model ID mismatch for that endpoint&lt;/td&gt;
&lt;td&gt;Copy the exact ID from the provider's model list&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The official &lt;a href="https://docs.cline.bot/troubleshooting" rel="noopener noreferrer"&gt;Cline troubleshooting checklist&lt;/a&gt; covers additional edge cases, including certificate errors for self-signed local gateways.&lt;/p&gt;

&lt;h2&gt;
  
  
  Native Provider vs. Third-Party Gateway: Which Should You Choose?
&lt;/h2&gt;

&lt;p&gt;When deciding between Cline's native single-endpoint configuration and a gateway such as OpenRouter, Requesty, or Eden AI, the trade-off is control versus convenience:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Native OpenAI Compatible (single endpoint)&lt;/th&gt;
&lt;th&gt;Gateway (OpenRouter / Requesty / Eden AI)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Setup time&lt;/td&gt;
&lt;td&gt;~2–5 min: 4 fields + Verify, per endpoint&lt;/td&gt;
&lt;td&gt;~1 min: one key + one Base URL for many models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model discovery&lt;/td&gt;
&lt;td&gt;Manual — only models on that endpoint&lt;/td&gt;
&lt;td&gt;Automatic &lt;code&gt;/models&lt;/code&gt; discovery; route per task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost governance&lt;/td&gt;
&lt;td&gt;Local key storage; custom headers; enterprise policies&lt;/td&gt;
&lt;td&gt;Budget caps, model whitelists, key expiry, unified usage stats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Privacy&lt;/td&gt;
&lt;td&gt;Request goes directly to your chosen provider&lt;/td&gt;
&lt;td&gt;Requests pass through the gateway's routing layer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As of May 2026, the Cline community is still requesting &lt;strong&gt;multiple independent OpenAI-compatible slots&lt;/strong&gt;: GitHub Discussion #386 asks for separately saved Base URL/key/model profiles, with the option to use different providers in Plan vs. Act mode (&lt;a href="https://github.com/cline/cline/discussions/386" rel="noopener noreferrer"&gt;github.com/cline/cline/discussions/386&lt;/a&gt;). Until that feature lands, the practical workaround is to place a lightweight gateway in front of several providers, using virtual keys with budget caps, expiry dates, and model whitelists. For Chinese users evaluating this option, our &lt;a href="https://dev.to/en/blog/openrouter-alternative-for-chinese-models"&gt;OpenRouter Alternatives for Chinese Models guide&lt;/a&gt; compares gateways by regional availability, and the &lt;a href="https://dev.to/en/blog/deepseek-v4-vs-gpt-api-cost"&gt;DeepSeek V4 vs GPT API Cost comparison&lt;/a&gt; helps estimate cost differences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security, Limits, and Cost Management
&lt;/h2&gt;

&lt;p&gt;Cline stores the API key &lt;strong&gt;only locally&lt;/strong&gt;, and only the extension itself uses it (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;). Recommended practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rotate keys periodically and revoke unused ones.&lt;/li&gt;
&lt;li&gt;Prefer &lt;code&gt;$ENV_VAR&lt;/code&gt; syntax over literal keys in shared workspaces.&lt;/li&gt;
&lt;li&gt;Set hard budget caps on the gateway side, not just in Cline, so an agent loop cannot produce unexpected bills.&lt;/li&gt;
&lt;li&gt;Monitor model-level usage in your provider dashboard; reasoning models differ significantly in price — see the &lt;a href="https://dev.to/en/blog/deepseek-v4-vs-gpt-api-cost"&gt;2026 DeepSeek V4 vs GPT pricing comparison&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For HeFu users, a single key unlocks the full catalog of OpenAI, Claude, DeepSeek, Kimi, Gemini, Qwen, GLM, Doubao, Hunyuan, Grok, and MiniMax models through one OpenAI-compatible endpoint; the exact model list and current rates are on the official models/pricing pages. The same endpoint also works in other clients — see our &lt;a href="https://dev.to/en/blog/lobechat-custom-provider-hefu-setup-guide"&gt;step-by-step guide to setting up HeFu as a custom provider in LobeChat&lt;/a&gt; for the parallel workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why does the Verify button fail even though my endpoint is correct?
&lt;/h3&gt;

&lt;p&gt;The three most common causes are a Base URL missing the &lt;code&gt;/v1&lt;/code&gt; path, a Model ID that does not match your provider's documentation (the Model Configuration block is easy to skip), and missing custom headers required by corporate gateways. Check Cline's official troubleshooting checklist, and test the endpoint independently with &lt;code&gt;curl&lt;/code&gt; to isolate the issue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I save multiple OpenAI-compatible providers and switch between them quickly?
&lt;/h3&gt;

&lt;p&gt;As of May 2026, Cline ships a single OpenAI-compatible slot; the multi-slot feature is still an open community request. GitHub Discussion #386 asks for independent saved profiles while noting that the official implementation is not yet available (&lt;a href="https://github.com/cline/cline/discussions/386" rel="noopener noreferrer"&gt;github.com/cline/cline/discussions/386&lt;/a&gt;). The workaround is placing a gateway in front of multiple providers, using virtual keys with budget caps, expiry dates, and model whitelists. If a provider already offers a dedicated Cline entry point, prefer that over the custom path.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is my API key secure? Where does Cline send it?
&lt;/h3&gt;

&lt;p&gt;Cline stores the key locally and only the extension uses it; with Azure AD Identity Authentication enabled, no key is used at all (&lt;a href="https://docs.cline.bot/enterprise-solutions" rel="noopener noreferrer"&gt;docs.cline.bot&lt;/a&gt;). For any network endpoint, use an HTTPS Base URL so the key is transmitted only over TLS. Keep your key scoped to the models you need, monitor dashboard usage, and use &lt;code&gt;$ENV_VAR&lt;/code&gt; syntax to keep it out of configuration files.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I revert to the default OpenAI provider?
&lt;/h3&gt;

&lt;p&gt;Go to Settings → Providers and switch the API Provider dropdown back to "OpenAI" (or any built-in provider). Your previously entered custom Base URL, key, and model ID are ignored while a built-in provider is selected, so reverting is immediate and requires no uninstall. To return to your custom setup later, simply re-select "OpenAI Compatible" — the fields retain the saved values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which models can I use with a HeFu OpenAI-compatible endpoint in Cline?
&lt;/h3&gt;

&lt;p&gt;The exact Model ID must come from HeFu's official models page; as of May 2026, the endpoint supports the model families listed there, and current rates are on the official pricing page. Do not rely on model names in third-party blog posts — copy the ID directly from the provider's catalog.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=cline-vs-code-custom-openai-compatible-provider-setup" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cline</category>
      <category>vs</category>
      <category>code</category>
      <category>custom</category>
    </item>
    <item>
      <title>How to Set Up HeFu as a Custom Provider in LobeChat: A Step-by-Step Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 10:31:48 +0000</pubDate>
      <link>https://dev.to/mpoper/how-to-set-up-hefu-as-a-custom-provider-in-lobechat-a-step-by-step-guide-3h2o</link>
      <guid>https://dev.to/mpoper/how-to-set-up-hefu-as-a-custom-provider-in-lobechat-a-step-by-step-guide-3h2o</guid>
      <description>&lt;h1&gt;
  
  
  How to Set Up HeFu as a Custom Provider in LobeChat: A Step-by-Step Guide
&lt;/h1&gt;

&lt;p&gt;Adding HeFu as a custom provider in LobeChat typically takes about five minutes and gives you one API key to route the model IDs in HeFu's catalog (including GPT-5.6, Claude Opus 5, DeepSeek-V4-Pro, Kimi K3, Gemini 3.6 Flash, and Qwen3.7-Max) through LobeChat's native interface—eliminating multiple provider subscriptions, separate plugins, or per-model configuration. LobeChat has supported custom OpenAI-compatible providers since January 22, 2025 (&lt;a href="https://lobehub.com/changelog" rel="noopener noreferrer"&gt;LobeHub changelog&lt;/a&gt;); as of August 2026, the custom provider settings are the same in cloud and self-hosted builds, with the &lt;a href="https://lobehub.com/docs" rel="noopener noreferrer"&gt;official LobeChat docs&lt;/a&gt; as the authoritative reference for version-specific changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use HeFu with LobeChat?
&lt;/h2&gt;

&lt;p&gt;The core value is unification. Rather than maintaining separate keys for OpenAI, Anthropic, DeepSeek, and others, HeFu exposes a single OpenAI-compatible base URL that fronts a catalog spanning GPT-5.6 (Terra / Sol / Luna), Claude Opus 5 / Fable 5, DeepSeek-V4-Pro / V4-Flash, Kimi K2.5 / K2.6 / K3, Gemini 3.6 Flash / 3.5 series, Qwen3.7-Max, GLM-5.x, and more. If you want to understand the routing architecture behind this, read our guide on &lt;a href="https://dev.to/en/blog/deepseek-qwen-kimi-single-api-key"&gt;running DeepSeek, Qwen, and Kimi with a single API key&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For teams focused on Chinese-language workloads, HeFu's catalog overlaps significantly with mainstream aggregators—our &lt;a href="https://dev.to/en/blog/openrouter-alternative-for-chinese-models"&gt;OpenRouter alternatives for Chinese models&lt;/a&gt; compares the trade-offs. HeFu states it operates Hong Kong direct-connect nodes for models such as GPT-5.6, so no overseas credit card is required; check the HeFu official site for current node coverage and network availability.&lt;/p&gt;

&lt;p&gt;LobeChat's ecosystem has also matured. As of May 2026, LobeHub—the successor project—has surpassed 77,000 GitHub stars and migrated from &lt;code&gt;lobehub/lobe-chat&lt;/code&gt; to &lt;code&gt;lobehub/lobehub&lt;/code&gt;, repositioning itself from an "open-source ChatGPT client" to an "agent collaboration platform" (&lt;a href="https://aihubmix.com" rel="noopener noreferrer"&gt;AIHubMix, updated 2026-05-13&lt;/a&gt;). That growth means more contributors maintaining provider integrations, but custom providers remain the most flexible path for non-listed endpoints like HeFu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites: What You Need Before Starting
&lt;/h2&gt;

&lt;p&gt;Prepare three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A HeFu account with an active API key&lt;/strong&gt;, issued immediately after signup in the HeFu dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A running LobeChat instance&lt;/strong&gt;—cloud at LobeHub, or self-hosted via Docker, Vercel, or desktop; the &lt;a href="https://lobehub.com/docs" rel="noopener noreferrer"&gt;official deployment docs&lt;/a&gt; cover each option. The custom provider settings are identical in both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The exact model IDs&lt;/strong&gt; you plan to use, copied from the HeFu docs (e.g., &lt;code&gt;gpt-5.6-terra&lt;/code&gt;, &lt;code&gt;claude-opus-5&lt;/code&gt;, &lt;code&gt;deepseek-v4-pro&lt;/code&gt;). Mismatched IDs are the most common cause of "model not found" errors.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Understanding LobeChat's Custom Provider Configuration
&lt;/h2&gt;

&lt;p&gt;On January 22, 2025, LobeChat refactored its AI provider management system, adding first-class support for arbitrary OpenAI-compatible API endpoints as custom providers (&lt;a href="https://lobehub.com/changelog" rel="noopener noreferrer"&gt;LobeHub changelog, 2025-01-22&lt;/a&gt;). This replaced the earlier workaround of overriding &lt;code&gt;OPENAI_PROXY_URL&lt;/code&gt; at the environment level—a variable that only accepts a single proxy URL with comma-separated API keys and a choice of random or round-robin selection (&lt;a href="https://lobehub.com/docs/self-hosting/environment-variables/features/llm" rel="noopener noreferrer"&gt;LobeHub environment variables reference&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;As of August 2026, the custom provider UI lives under &lt;strong&gt;Settings → Language Model → Custom Provider&lt;/strong&gt;, with per-provider toggles for function calling, vision, and file uploads. Community members have filed &lt;a href="https://github.com/lobehub/lobe-chat/issues/12288" rel="noopener noreferrer"&gt;GitHub issue #12288&lt;/a&gt; requesting dedicated &lt;code&gt;CUSTOM_PROVIDER_*&lt;/code&gt; environment variables for batch configuration; as of May 2026, the UI path described here remains the standard approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Obtain Your HeFu API Endpoint and Key
&lt;/h2&gt;

&lt;p&gt;Log in to the HeFu dashboard and open the API Keys section. You'll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Base URL:&lt;/strong&gt; &lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secret API key:&lt;/strong&gt; a string beginning with &lt;code&gt;sk-hefu-...&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note the distinction between the request endpoint and the model list endpoint. LobeChat sends chat completions to the base URL; tools may also call &lt;code&gt;GET /v1/models&lt;/code&gt; on the same host for discovery. You only need the base URL for LobeChat—there is no separate model-list URL to enter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Add HeFu as a Custom Provider in LobeChat
&lt;/h2&gt;

&lt;p&gt;In LobeChat (cloud or self-hosted):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Settings → Language Model&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add Custom Provider&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the required fields:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Display name:&lt;/strong&gt; &lt;code&gt;HeFu&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Base URL:&lt;/strong&gt; &lt;code&gt;https://api.hefu.hk/v1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API key:&lt;/strong&gt; your HeFu secret key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP proxy (optional):&lt;/strong&gt; configure only if your network needs a proxy to reach &lt;code&gt;api.hefu.hk&lt;/code&gt;. Mainland China users typically do not need this thanks to HeFu's Hong Kong nodes, per HeFu's official network documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Save the provider.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, add models. In the provider's model list, enter each ID exactly as documented by HeFu, and enable capability toggles: &lt;strong&gt;function calling&lt;/strong&gt; for tool-using models, &lt;strong&gt;vision&lt;/strong&gt; for multimodal models, and &lt;strong&gt;file upload&lt;/strong&gt; if you plan to attach documents. If you prefer a single-key catalog with pre-configured models, note that first-class providers such as ModelsLab (integrated via &lt;a href="https://github.com/lobehub/lobe-chat/pull/12560" rel="noopener noreferrer"&gt;PR #12560&lt;/a&gt; in March 2026) expose 200+ models—but for HeFu, manual entry is the standard workflow and gives you precise control over which models appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring Model IDs and Capabilities
&lt;/h2&gt;

&lt;p&gt;These HeFu model IDs are examples from the vendor's catalog; verify against the current HeFu docs before entering them in LobeChat:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;th&gt;Recommended HeFu model IDs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;General-purpose / agentic work&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gpt-5.6-terra&lt;/code&gt;, &lt;code&gt;gpt-5.6-sol&lt;/code&gt;, &lt;code&gt;claude-opus-5&lt;/code&gt;, &lt;code&gt;kimi-k3&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coding&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gpt-5.3-codex&lt;/code&gt;, &lt;code&gt;qwen3-coder&lt;/code&gt;, &lt;code&gt;claude-opus-5&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-context Chinese text&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kimi-k3&lt;/code&gt;, &lt;code&gt;kimi-k2.6&lt;/code&gt;, &lt;code&gt;deepseek-v4-pro&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multimodal (image / audio / video)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gemini-3.6-flash&lt;/code&gt;, &lt;code&gt;qwen3.7-max&lt;/code&gt;, &lt;code&gt;glm-5.x&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Budget-focused inference&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;deepseek-v4-flash&lt;/code&gt;, &lt;code&gt;gemini-3.5-flash&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Capability toggles apply per provider, not per model; enabling vision on a non-vision model can cause silent request failures, so toggle conservatively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing the Connection and Troubleshooting
&lt;/h2&gt;

&lt;p&gt;After adding models, start a new conversation, pick a HeFu model, and send a test message. If it fails, check for these common cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;401 Unauthorized:&lt;/strong&gt; the key is wrong, expired, or has a copied whitespace character. Regenerate it in the HeFu dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404 Not Found:&lt;/strong&gt; the base URL is malformed—make sure it ends with &lt;code&gt;/v1&lt;/code&gt;, not &lt;code&gt;/chat/completions&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model not found:&lt;/strong&gt; the ID does not match HeFu's catalog; re-check the docs for typos or deprecated names.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you previously set &lt;code&gt;OPENAI_PROXY_URL&lt;/code&gt; in a self-hosted Docker deployment, note that it can override UI-configured endpoints in certain versions. Remove or unset it and restart the container.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison: HeFu Custom Provider vs. Direct Provider API
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;HeFu as custom provider&lt;/th&gt;
&lt;th&gt;Direct per-provider API keys&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Setup time&lt;/td&gt;
&lt;td&gt;~5 minutes, one provider entry&lt;/td&gt;
&lt;td&gt;Hours: separate keys, URLs, and configs per provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Key management&lt;/td&gt;
&lt;td&gt;One HeFu key for all models&lt;/td&gt;
&lt;td&gt;One key per provider (OpenAI, Anthropic, DeepSeek, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model flexibility&lt;/td&gt;
&lt;td&gt;Switch across GPT, Claude, Kimi, Gemini, Qwen from the model picker&lt;/td&gt;
&lt;td&gt;Only models within the configured provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Capability toggles&lt;/td&gt;
&lt;td&gt;Manual: enable vision / function calling per provider&lt;/td&gt;
&lt;td&gt;Auto-detected for first-class providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost structure&lt;/td&gt;
&lt;td&gt;Single usage bill from HeFu&lt;/td&gt;
&lt;td&gt;Separate bills; self-hosted LobeChat itself is free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;HeFu's per-token rates are subject to adjustment; refer to the official HeFu pricing page for current numbers. For cost context: LobeHub cloud offers 450,000 free compute credits at signup and paid tiers (Starter / Premium / Ultimate), while self-hosted and desktop LobeChat are free and only inference costs apply (&lt;a href="https://aihubmix.com" rel="noopener noreferrer"&gt;AIHubMix, updated 2026-05-13&lt;/a&gt;; see also &lt;a href="https://lobehub.com/pricing" rel="noopener noreferrer"&gt;LobeHub official pricing&lt;/a&gt;). For budget planning, see our &lt;a href="https://dev.to/en/blog/cheap-deepseek-api-pay-as-you-go"&gt;pay-as-you-go DeepSeek cost guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security and Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Store the API key in an environment variable&lt;/strong&gt; (e.g., &lt;code&gt;HEFU_API_KEY&lt;/code&gt; in Docker &lt;code&gt;-e&lt;/code&gt;) for self-hosted deployments, not in shared config files; see the &lt;a href="https://lobehub.com/docs/self-hosting/environment-variables/features/llm" rel="noopener noreferrer"&gt;LobeHub environment variables reference&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rotate keys regularly&lt;/strong&gt; from the HeFu dashboard—especially if a key was ever pasted into a public workspace or committed to Git.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat the key like a password:&lt;/strong&gt; do not share screenshots that show both the key and your account name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review capability toggles&lt;/strong&gt; before sharing a provider config with teammates, so unused vision or file-upload features are not left enabled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does HeFu support all LobeChat model features?
&lt;/h3&gt;

&lt;p&gt;HeFu's API is OpenAI-compatible, so it supports LobeChat's standard chat-completion flow. Feature support ultimately depends on the upstream model—function calling works on models with native tool support (GPT-5.6, Claude Opus 5, DeepSeek-V4-Pro), while vision requires a multimodal model such as Gemini 3.6 Flash or Qwen3.7-Max. Toggle the matching capabilities in LobeChat's provider settings per the HeFu docs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use HeFu with a self-hosted LobeChat instance?
&lt;/h3&gt;

&lt;p&gt;Yes. As of August 2026, the custom provider fields are identical in self-hosted and cloud LobeChat (check the official docs for version-specific behavior). In Docker, configure HeFu through the UI after starting the container, or pre-seed environment variables with your deployment tooling. The same base URL and key work in both cases.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I update the model list after HeFu adds new models?
&lt;/h3&gt;

&lt;p&gt;Open your HeFu provider in Settings → Language Model and edit the model list to add new IDs. The API key persists while you edit, so there is no need to re-enter it. For a zero-maintenance alternative, first-class integrated providers such as ModelsLab (200+ models via one key since March 2026, per &lt;a href="https://github.com/lobehub/lobe-chat/pull/12560" rel="noopener noreferrer"&gt;PR #12560&lt;/a&gt;) auto-expose their catalogs—but with HeFu, manual ID entry is the intended workflow and keeps your model picker focused on what you actually use.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will my usage data be logged by HeFu when used through LobeChat?
&lt;/h3&gt;

&lt;p&gt;Yes, standard API usage logging applies. HeFu records request metadata (timestamps, model, token count) for billing and abuse prevention, consistent with industry practice. Review the privacy and compliance page on the HeFu official site for the full policy. Since HeFu routes to upstream model providers, those providers' own data policies also apply; check each model's terms if you have specific retention requirements.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=lobechat-custom-provider-hefu-setup-guide" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>how</category>
      <category>to</category>
      <category>set</category>
      <category>up</category>
    </item>
    <item>
      <title>Chinese LLM API Pricing Comparison 2026: The Definitive Buyer's Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:05:47 +0000</pubDate>
      <link>https://dev.to/mpoper/chinese-llm-api-pricing-comparison-2026-the-definitive-buyers-guide-4h8d</link>
      <guid>https://dev.to/mpoper/chinese-llm-api-pricing-comparison-2026-the-definitive-buyers-guide-4h8d</guid>
      <description>&lt;p&gt;If you're shopping for LLM APIs in 2026, Chinese vendors are impossible to ignore. As of August 21, 2026 (always check official pricing pages for the final word), flagship Chinese models charge between ¥4.00 and ¥12.00 per million input tokens — with ERNIE 5.1 at ¥4.00, GLM-5.1 at ¥6.00, Kimi K2.6 at ¥6.50, DeepSeek V4 Pro at ¥9.00, and Qwen3.7 Max at ¥12.00. Budget-tier input can be as low as ¥0.20 (Qwen3.5 Flash), and value models like DeepSeek V4 are 80–98% cheaper than GPT-5.5-class peers.&lt;/p&gt;

&lt;p&gt;But don't pick a model on sticker price alone. Cache hit rates, endpoint access, and tool-calling fit often matter more than nominal list prices. The data below was verified against official pricing pages by &lt;a href="https://llmabacus.com" rel="noopener noreferrer"&gt;llmabacus&lt;/a&gt; on 2026-08-21. Chinese vendors have turned quarterly price cuts into a structural competitive weapon: DeepSeek V4 Flash, for example, offers cached input at ¥0.10 per million tokens — just 1/30th of its standard input price.&lt;/p&gt;

&lt;h2&gt;
  
  
  2026 Chinese LLM API Pricing Landscape: An Overview
&lt;/h2&gt;

&lt;p&gt;The 2026 Chinese LLM market is shaped by three forces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Hardware cost deflation&lt;/strong&gt; — cheaper compute keeps pushing prices down.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Escalating domestic price wars&lt;/strong&gt; — vendors undercut each other every quarter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggregator endpoints&lt;/strong&gt; — services that arbitrage price gaps and unify access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As of Aug 2026, tracking firm &lt;a href="https://pricepertoken.com" rel="noopener noreferrer"&gt;pricepertoken&lt;/a&gt; lists 610+ models globally, 43 of them free. Paid input prices range from roughly $0 to $150 per million tokens. Chinese vendors sit in the lowest price band, and many update prices quarterly — as &lt;a href="https://morph.so" rel="noopener noreferrer"&gt;Morph&lt;/a&gt; noted in its 2026-06-28 analysis: "LLM prices change every quarter."&lt;/p&gt;

&lt;p&gt;Final prices are subject to each vendor's official pricing page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;Alibaba Cloud Bailian/Qwen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://platform.moonshot.cn/docs/pricing/chat" rel="noopener noreferrer"&gt;Moonshot/Kimi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://open.bigmodel.cn/pricing" rel="noopener noreferrer"&gt;Zhipu GLM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.baidu.com/doc/WENXINWORKSHOP/s/hlrk4akp7" rel="noopener noreferrer"&gt;Baidu ERNIE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.tencent.com/document/product/1729/97731" rel="noopener noreferrer"&gt;Tencent Hunyuan&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main camps remain unchanged:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek&lt;/strong&gt; and &lt;strong&gt;Alibaba's Qwen&lt;/strong&gt; dominate the extreme value tier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kimi (Moonshot)&lt;/strong&gt; differentiates on ultra-long context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GLM (Zhipu)&lt;/strong&gt;, &lt;strong&gt;Doubao&lt;/strong&gt;, and &lt;strong&gt;Tencent Hunyuan&lt;/strong&gt; serve the domestic enterprise market.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI&lt;/strong&gt;, &lt;strong&gt;Claude&lt;/strong&gt;, and &lt;strong&gt;Gemini&lt;/strong&gt; hold the high-end capability tier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Through the HeFu unified gateway, all of the above families are accessible via one API — including GPT-5.6 (Terra/Sol/Luna), Claude Opus 5 and Sonnet 4.6, DeepSeek-V4-Pro/V4-Flash, Kimi K2.5/K2.6/K3, Gemini 3.6 Flash, Qwen3.7-Max, GLM-5.x, and MiniMax M2.5–M3. The exact model list and versions are subject to HeFu and vendor official pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Headline Findings: What the 2026 Market Data Reveals
&lt;/h2&gt;

&lt;p&gt;Three findings matter most.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Flagship Chinese pricing has collapsed
&lt;/h3&gt;

&lt;p&gt;According to &lt;a href="https://llmabacus.com" rel="noopener noreferrer"&gt;llmabacus&lt;/a&gt;, which verified official pricing pages on 2026-08-21, per-million-token list prices are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4 Pro&lt;/td&gt;
&lt;td&gt;¥9.00&lt;/td&gt;
&lt;td&gt;¥27.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.7 Max&lt;/td&gt;
&lt;td&gt;¥12.00&lt;/td&gt;
&lt;td&gt;¥36.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi K2.6&lt;/td&gt;
&lt;td&gt;¥6.50&lt;/td&gt;
&lt;td&gt;¥27.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.1&lt;/td&gt;
&lt;td&gt;¥6.00&lt;/td&gt;
&lt;td&gt;¥24.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Baidu ERNIE 5.1&lt;/td&gt;
&lt;td&gt;¥4.00&lt;/td&gt;
&lt;td&gt;¥18.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  2. The budget tier is now priced in "cents"
&lt;/h3&gt;

&lt;p&gt;The lowest verified input price is &lt;strong&gt;Qwen3.5 Flash&lt;/strong&gt; at ¥0.20 ($0.030) per million tokens. The lowest output price is &lt;strong&gt;iFlytek Spark Ultra&lt;/strong&gt; at ¥0.80. The lowest cache-input price is &lt;strong&gt;DeepSeek V4 Flash&lt;/strong&gt; at ¥0.10 ($0.015) per million tokens — 1/30th of its standard input price.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The gap with Western flagships is roughly 40×
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.intuitionlabs.ai" rel="noopener noreferrer"&gt;IntuitionLabs&lt;/a&gt; (as of Feb 2026) calculated that processing 1M input + 1M output tokens costs about $0.70 with DeepSeek (cache miss), versus $5 + $25 = $30 with Claude Opus 4.6. List-price arithmetic confirms that, as of Aug 2026, the DeepSeek V4 series is 80–98% cheaper than GPT-5.5-class models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodology: How This Pricing Comparison Was Conducted
&lt;/h2&gt;

&lt;p&gt;This comparison uses official list prices verified on 2026-08-21 via &lt;a href="https://llmabacus.com" rel="noopener noreferrer"&gt;llmabacus&lt;/a&gt;, cross-checked against vendor pricing pages and public API docs. It is also cross-referenced with aggregator endpoint records from &lt;a href="https://morph.so" rel="noopener noreferrer"&gt;Morph&lt;/a&gt; (2026-06-28) and the pricepertoken model database.&lt;/p&gt;

&lt;p&gt;Evaluation dimensions include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Per-million-token prices&lt;/strong&gt;: input, output, cache-input (in CNY and USD)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context window&lt;/strong&gt;: DeepSeek V4 Flash supports 1M tokens, per &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek official docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark-adjusted value&lt;/strong&gt;: SWE-bench Verified as a coding proxy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Channel differences&lt;/strong&gt;: first-party endpoints vs. aggregators like &lt;a href="https://openrouter.ai" rel="noopener noreferrer"&gt;OpenRouter&lt;/a&gt;, &lt;a href="https://www.requesty.ai" rel="noopener noreferrer"&gt;Requesty&lt;/a&gt;, and &lt;a href="https://www.edenai.ai" rel="noopener noreferrer"&gt;Eden AI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Latency is assessed separately because it varies by endpoint, region, and load. First-party endpoints usually deliver more predictable latency, and the HeFu Hong Kong node provides direct low-latency access to OpenAI models without requiring an overseas credit card (subject to the official HeFu page).&lt;/p&gt;

&lt;p&gt;USD conversions retain the original rounding from each source, so minor discrepancies may exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Side-by-Side Pricing Table (As of Aug 2026)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model (official list price, per 1M tokens)&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Cache input&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;Verified&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;DeepSeek V4 Pro&lt;/strong&gt; (&lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥9.00&lt;/td&gt;
&lt;td&gt;¥27.00&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;Official docs&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;DeepSeek V4 Flash&lt;/strong&gt; (&lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥3.00 ($0.45)&lt;/td&gt;
&lt;td&gt;¥9.00 ($1.34)&lt;/td&gt;
&lt;td&gt;¥0.10 ($0.015)&lt;/td&gt;
&lt;td&gt;1M&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Qwen3.7 Max&lt;/strong&gt; (&lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥12.00&lt;/td&gt;
&lt;td&gt;¥36.00&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;Official docs&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Qwen3.5 Flash&lt;/strong&gt; (&lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥0.20 ($0.030)&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;Official docs&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Kimi K2.6&lt;/strong&gt; (&lt;a href="https://platform.moonshot.cn/docs/pricing/chat" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥6.50&lt;/td&gt;
&lt;td&gt;¥27.00&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;Official docs&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;GLM-5.1&lt;/strong&gt; (&lt;a href="https://open.bigmodel.cn/pricing" rel="noopener noreferrer"&gt;official&lt;/a&gt;)&lt;/td&gt;
&lt;td&gt;¥6.00&lt;/td&gt;
&lt;td&gt;¥24.00&lt;/td&gt;
&lt;td&gt;—*&lt;/td&gt;
&lt;td&gt;Official docs&lt;/td&gt;
&lt;td&gt;2026-08-21&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;—&lt;/em&gt; = not disclosed in the verified sources at the time of writing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Chinese LLM APIs offer extraordinary value, but the landscape shifts quarterly. Always confirm current prices on official pages before committing, and remember that the cheapest list price isn't always the cheapest total cost — especially when cache hits and tool-calling reliability are factored in. If you're building on a budget, 2026 is a great year to be a developer.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=chinese-llm-api-pricing-comparison-2026" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>api</category>
      <category>pricing</category>
      <category>china</category>
    </item>
    <item>
      <title>Cheap DeepSeek API Pay As You Go: Complete Cost Guide (As of Aug 2026)</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:05:46 +0000</pubDate>
      <link>https://dev.to/mpoper/cheap-deepseek-api-pay-as-you-go-complete-cost-guide-as-of-aug-2026-3cn6</link>
      <guid>https://dev.to/mpoper/cheap-deepseek-api-pay-as-you-go-complete-cost-guide-as-of-aug-2026-3cn6</guid>
      <description>&lt;p&gt;As of Aug 2026, DeepSeek's pay-as-you-go API is still the cheapest mainstream option per million tokens among major LLM providers, according to pricing comparisons by &lt;a href="https://www.costgoat.com" rel="noopener noreferrer"&gt;CostGoat&lt;/a&gt; and &lt;a href="https://www.felloai.com" rel="noopener noreferrer"&gt;Fello AI&lt;/a&gt;: the official V4 Flash tier costs roughly &lt;strong&gt;$0.14 per 1M input tokens&lt;/strong&gt; and &lt;strong&gt;$0.28 per 1M output tokens&lt;/strong&gt; on cache misses, which is &lt;strong&gt;97.2% cheaper on input&lt;/strong&gt; than OpenAI GPT-5.5's $5 rate and &lt;strong&gt;99.1% cheaper on output&lt;/strong&gt; than GPT-5.5's $30 rate. That works out to roughly &lt;strong&gt;36× cheaper on input ($5 ÷ $0.14 ≈ 35.7)&lt;/strong&gt; and &lt;strong&gt;107× cheaper on output ($30 ÷ $0.28 ≈ 107.1)&lt;/strong&gt; than GPT-5.6 Sol / Claude Opus 5-class flagships. If your goal is to minimize per-token spend without sacrificing a 1M-token context window, DeepSeek V4 Flash — available on HeFu under the same usage-based billing model — is the first option to evaluate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current DeepSeek API Pay-As-You-Go Rates (As of Aug 2026)
&lt;/h2&gt;

&lt;p&gt;According to pricing reviews published in Jul 2026, the official DeepSeek API is purely pay-as-you-go, with no subscription required (&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026; official price page: &lt;a href="https://platform.deepseek.com/pricing" rel="noopener noreferrer"&gt;platform.deepseek.com/pricing&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek V4 Flash&lt;/strong&gt;: approximately &lt;strong&gt;$0.14 per 1M input tokens&lt;/strong&gt; and &lt;strong&gt;$0.28 per 1M output tokens&lt;/strong&gt; (cache miss); cached input is only about &lt;strong&gt;$0.0028 per 1M tokens&lt;/strong&gt; — roughly &lt;strong&gt;1/50th of the standard input price, i.e. a 98% discount&lt;/strong&gt; (&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026; &lt;a href="https://www.pricepertoken.com" rel="noopener noreferrer"&gt;PricePerToken&lt;/a&gt;; &lt;a href="https://www.cloudzero.com" rel="noopener noreferrer"&gt;CloudZero&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepSeek V4 Pro&lt;/strong&gt;: standard list price is &lt;strong&gt;$1.74 per 1M input&lt;/strong&gt; and &lt;strong&gt;$3.48 per 1M output&lt;/strong&gt;; since Jul 2026, an approximately &lt;strong&gt;75% promotional discount&lt;/strong&gt; brings the effective rate to roughly &lt;strong&gt;$0.435 / $0.87&lt;/strong&gt; per million tokens (&lt;a href="https://www.felloai.com" rel="noopener noreferrer"&gt;Fello AI&lt;/a&gt;, 2026; &lt;a href="https://www.cloudzero.com" rel="noopener noreferrer"&gt;CloudZero&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free trial tokens&lt;/strong&gt;: new accounts receive &lt;strong&gt;5 million free tokens&lt;/strong&gt;, valid for about 30 days, with no credit card required. There is &lt;strong&gt;no permanent free tier&lt;/strong&gt; (&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026; &lt;a href="https://www.pricepertoken.com" rel="noopener noreferrer"&gt;PricePerToken&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One important caveat: &lt;a href="https://www.geotoolbox.com" rel="noopener noreferrer"&gt;GeoToolbox&lt;/a&gt; reported on Aug 16, 2026 that DeepSeek switched to peak/valley pricing (V4 Flash valley from $0.22/$0.66, peak around $0.44/$1.32), which contradicts the flat Jul 2026 rates. However, another verification dated Jul 21, 2026 found no standing valley discount table on the official page (&lt;a href="https://www.layer3labs.com" rel="noopener noreferrer"&gt;Layer3Labs&lt;/a&gt;). Because pricing has been moving quickly, always confirm current rates on the &lt;a href="https://platform.deepseek.com/pricing" rel="noopener noreferrer"&gt;official DeepSeek price page&lt;/a&gt; (or the HeFu pricing page if you buy through an aggregator) before committing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Pay-As-You-Go Billing Actually Works for DeepSeek API
&lt;/h2&gt;

&lt;p&gt;DeepSeek's pay-as-you-go model is simple: you prepay a balance, each API request deducts the metered token cost, and there are &lt;strong&gt;no idle fees, no monthly base fees, and no minimum usage commitment&lt;/strong&gt;. A few mechanics worth understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token metering&lt;/strong&gt;: both input and output tokens are counted per request; system prompts, retrieved context, and tool definitions all count as input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache-hit discount&lt;/strong&gt;: when your request includes a prefix that matches a cached prompt, the input portion drops to about &lt;strong&gt;$0.0028 per 1M tokens&lt;/strong&gt; — a &lt;strong&gt;98% discount&lt;/strong&gt; from the $0.14 miss rate, not merely one-tenth (&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026). DeepSeek's official docs describe the caching mechanics at &lt;a href="https://api-docs.deepseek.com/" rel="noopener noreferrer"&gt;api-docs.deepseek.com&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specs&lt;/strong&gt;: V4 Flash and V4 Pro both support a &lt;strong&gt;1M-token context window&lt;/strong&gt; and &lt;strong&gt;up to 384K output tokens&lt;/strong&gt;, with published concurrency limits of &lt;strong&gt;2,500 requests (Flash)&lt;/strong&gt; and &lt;strong&gt;500 requests (Pro)&lt;/strong&gt; (&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No card required for trial&lt;/strong&gt;: the 5M free tokens for new accounts are a genuine zero-cost test window, which makes pay-as-you-go evaluation of DeepSeek cheaper than any competitor.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  DeepSeek vs. GPT-5.5 vs. Claude Opus 5: Cost Comparison Table
&lt;/h2&gt;

&lt;p&gt;The table below compares published per-million-token rates and specs. DeepSeek's promotional pricing is marked with its validity window; competitor prices are official list rates as reported in Aug 2026.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model (as of Jul–Aug 2026)&lt;/th&gt;
&lt;th&gt;Input per 1M tokens&lt;/th&gt;
&lt;th&gt;Output per 1M tokens&lt;/th&gt;
&lt;th&gt;Cache-hit input&lt;/th&gt;
&lt;th&gt;Context window&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4 Flash&lt;/td&gt;
&lt;td&gt;~$0.14&lt;/td&gt;
&lt;td&gt;~$0.28 (cache miss)&lt;/td&gt;
&lt;td&gt;~$0.0028 (≈98% discount)&lt;/td&gt;
&lt;td&gt;1M tokens&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://www.coworker.ai" rel="noopener noreferrer"&gt;Coworker.ai&lt;/a&gt;, Jul 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4 Pro (promo)&lt;/td&gt;
&lt;td&gt;~$0.435 (list $1.74)&lt;/td&gt;
&lt;td&gt;~$0.87 (list $3.48)&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;1M tokens&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://www.felloai.com" rel="noopener noreferrer"&gt;Fello AI&lt;/a&gt;, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI GPT-5.5&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;td&gt;$30&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://www.costgoat.com" rel="noopener noreferrer"&gt;CostGoat&lt;/a&gt;, Aug 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Sol / Claude Opus 5 (flagship class)&lt;/td&gt;
&lt;td&gt;≈36× V4 Flash input rate&lt;/td&gt;
&lt;td&gt;≈107× V4 Flash output rate&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://www.costgoat.com" rel="noopener noreferrer"&gt;CostGoat&lt;/a&gt;, Aug 2026; &lt;a href="https://www.felloai.com" rel="noopener noreferrer"&gt;Fello AI&lt;/a&gt;, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The ratio-based figures for the flagship class are derived from comparisons published by &lt;a href="https://www.costgoat.com" rel="noopener noreferrer"&gt;CostGoat&lt;/a&gt; (Aug 2026) and &lt;a href="https://www.felloai.com" rel="noopener noreferrer"&gt;Fello AI&lt;/a&gt; (2026): &lt;strong&gt;$0.14 × 36 ≈ $5.04&lt;/strong&gt; for input, and &lt;strong&gt;$0.28 × 107 ≈ $29.96&lt;/strong&gt; for output, placing GPT-5.6 Sol and Claude Opus 5-class models in the &lt;strong&gt;$5–$30 per-million&lt;/strong&gt; range. For context, our separate guides cover &lt;a href="https://dev.to/en/blog/gpt-5-6-api-pricing"&gt;GPT-5.6 API pricing&lt;/a&gt; and &lt;a href="https://dev.to/en/blog/claude-opus-5-api-access"&gt;Claude Opus 5 API access&lt;/a&gt; in more depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Cost Scenarios: 4 Typical Workloads
&lt;/h2&gt;

&lt;p&gt;Monthly cost estimates at official DeepSeek V4 Flash rates (as of Jul–Aug 2026). These are illustrative — your actual bill depends on caching behavior and token mix.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;Volume&lt;/th&gt;
&lt;th&gt;Monthly cost (V4 Flash)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Customer-service chatbot&lt;/td&gt;
&lt;td&gt;500 users × 30 messages = 15M input&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=cheap-deepseek-api-pay-as-you-go" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>deepseek</category>
      <category>api</category>
      <category>pricing</category>
      <category>llm</category>
    </item>
    <item>
      <title>GLM, Zhipu &amp; MiniMax API Access Outside China: 2026 Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:04:34 +0000</pubDate>
      <link>https://dev.to/mpoper/glm-zhipu-minimax-api-access-outside-china-2026-guide-26ao</link>
      <guid>https://dev.to/mpoper/glm-zhipu-minimax-api-access-outside-china-2026-guide-26ao</guid>
      <description>&lt;h1&gt;
  
  
  GLM, Zhipu &amp;amp; MiniMax API Access Outside China: 2026 Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Executive Summary
&lt;/h2&gt;

&lt;p&gt;Yes — as of Aug 2026, GLM (Zhipu AI / Z.ai) and MiniMax APIs are accessible from most regions outside China, but direct official access comes with real friction: Z.ai's International endpoint charges roughly &lt;strong&gt;2×&lt;/strong&gt; its domestic price, MiniMax's Feb 2026 billing changes complicate cost forecasting, and a July 2026 Beijing policy review reported by international media could tighten frontier-model access. For international developers, the lowest-risk route is a unified gateway that exposes GLM-5.x and MiniMax M2.5–M3 alongside OpenAI, Claude, DeepSeek, Kimi, and Gemini under one API key with USD billing and no overseas credit card requirement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Providers Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  GLM (Zhipu AI)
&lt;/h3&gt;

&lt;p&gt;Zhipu AI develops the GLM family of models. As of Aug 2026, flagship GLM-5 scores &lt;strong&gt;92.7% on AIME 2026, 86.0% on GPQA-Diamond, and 50.4 on Humanity's Last Exam&lt;/strong&gt;, surpassing GPT-5.2 and approaching Claude Opus 4.6. GLM-5.3 was released Aug 14, 2026 exclusively via the GLM Coding Plan and ZCode, with no public API or open weights; the highest published API tier is GLM-5.2 at &lt;strong&gt;$1.40 / $4.40 per million tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  MiniMax
&lt;/h3&gt;

&lt;p&gt;MiniMax operates the M2.5–M3 line and is aggressively priced. M2.5 Standard costs &lt;strong&gt;$0.30 / $1.20 per million input/output tokens&lt;/strong&gt;; Lightning doubles speed at &lt;strong&gt;$0.30 / $2.40 with a 1M-token context window&lt;/strong&gt;. MiniMax has 27.6M+ monthly active users across 200+ countries, a market cap near $38B, and trailing revenue near $79M (implied multiple above 480×).&lt;/p&gt;

&lt;h2&gt;
  
  
  Geographic Availability
&lt;/h2&gt;

&lt;p&gt;Z.ai explicitly segments by region: api.z.ai serves non-mainland China, open.bigmodel.cn serves domestic users. International pricing is about &lt;strong&gt;2×&lt;/strong&gt; domestic (so domestic is ~50% cheaper). US/EU/SEA devs can register and call the International endpoint directly, with payment verification.&lt;/p&gt;

&lt;p&gt;MiniMax is globally oriented: &amp;gt;70% of revenue comes from outside China, ~20% from the US, and registration is open in 200+ countries. Both GLM-5 and M2.5 are also accessible via OpenRouter, DeepInfra, and Together.ai with OpenAI-compatible APIs and no geographic restriction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Policy risk:&lt;/strong&gt; In mid-2026, international media reported that Beijing held discussions with major Chinese AI labs about possible restrictions on overseas access to Chinese frontier models, including future open-weight releases. No binding restrictions had been enacted as of Aug 2026, but treat this as active policy risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compliance Risks
&lt;/h2&gt;

&lt;p&gt;Three layers matter:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Chinese data law&lt;/strong&gt; – PIPL, Cybersecurity Law, and cross-border transfer rules can apply when Chinese providers process data from mainland infrastructure. Z.ai's International endpoint is designed to keep overseas traffic separate, but review governing law and data-storage clauses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;US/EU export-control exposure&lt;/strong&gt; – US export controls targeting hardware could theoretically extend to Chinese model APIs. EU devs should assess GDPR Art. 28 third-country processor obligations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terms-of-service clauses&lt;/strong&gt; – Both providers reserve the right to suspend access. The restrictive Aug 14 GLM-5.3 release shows access tiers can change abruptly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Payment &amp;amp; Billing Hurdles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Z.ai International bills USD but costs roughly 2× domestic rates.&lt;/li&gt;
&lt;li&gt;Feb 12, 2026: Zhipu raised GLM Coding Plan prices at least 30%; overseas subscription prices rose 30–60%; API call fees increased 67–100%.&lt;/li&gt;
&lt;li&gt;As of Jul 2026, base GLM-5 tier is &lt;strong&gt;$0.60 / $2.20 per million tokens&lt;/strong&gt;, cached input as low as &lt;strong&gt;$0.11&lt;/strong&gt;, and the GLM Coding Plan remains a separate subscription.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bottom Line
&lt;/h2&gt;

&lt;p&gt;Direct access works, but it comes with geographic pricing, policy, and payment uncertainty. If you need a stable API surface for production, aggregating Chinese models through a single gateway with OpenAI-compatible endpoints and USD billing is the lowest-risk path.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=glm-zhipu-minimax-api-access-outside-china" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>api</category>
      <category>ai</category>
      <category>china</category>
    </item>
    <item>
      <title>OpenRouter Alternatives for Chinese Models: A Practical Guide (As of Aug 2026)</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:04:33 +0000</pubDate>
      <link>https://dev.to/mpoper/openrouter-alternatives-for-chinese-models-a-practical-guide-as-of-aug-2026-4jpm</link>
      <guid>https://dev.to/mpoper/openrouter-alternatives-for-chinese-models-a-practical-guide-as-of-aug-2026-4jpm</guid>
      <description>&lt;h1&gt;
  
  
  OpenRouter Alternatives for Chinese Models: A Practical Guide (Aug 2026)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Chinese models now dominate OpenRouter's top models by token volume — roughly 61% of tokens consumed among the platform's top-ten models in the week of March 16–22, 2026 (&lt;a href="https://trendingtopics.org/" rel="noopener noreferrer"&gt;Trending Topics, Mar 2026&lt;/a&gt;). Yet OpenRouter's 5.5% credit fee (&lt;a href="https://openrouter.ai/docs/faq" rel="noopener noreferrer"&gt;OpenRouter FAQ&lt;/a&gt;), thin Chinese-model observability, and cross-border latency make a dedicated gateway the better default for many teams. A fast migration path is an OpenAI-compatible aggregator such as HeFu, exposing DeepSeek, Qwen, Kimi, GLM, and Western flagship models under a single API key through a Hong Kong node — no overseas credit card required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Consider an Alternative
&lt;/h2&gt;

&lt;p&gt;OpenRouter is still a strong universal router: 400+ models, 70+ providers, cost-plus pricing with a 5.5% credit fee, and a free tier of roughly 27 models at 50 requests/day (&lt;a href="https://www.edenai.co/" rel="noopener noreferrer"&gt;Eden AI, 2026&lt;/a&gt;; &lt;a href="https://openrouter.ai/docs/faq" rel="noopener noreferrer"&gt;OpenRouter FAQ&lt;/a&gt;). But the model mix underneath has shifted. Chinese models in OpenRouter's daily Top 50 grew from 5 in early 2025 to 20 by May 2026 (&lt;a href="https://ourworldindata.org/" rel="noopener noreferrer"&gt;Our World in Data, May 2026&lt;/a&gt;). During the week of March 16–22, 2026, Chinese models consumed 7.36 trillion tokens on the platform — up 56.9% week-over-week, about 61% of all tokens in the top-ten list.&lt;/p&gt;

&lt;p&gt;Three structural problems follow for developers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Latency.&lt;/strong&gt; Tokens routed through OpenRouter's US/EU relay add extra hops; teams serving Chinese-language users from Asia see measurable time-to-first-token differences vs. direct endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool-calling gaps.&lt;/strong&gt; Not every router translates OpenAI-style function-calling arguments faithfully for Qwen, DeepSeek, or GLM. This is a real compatibility issue, not a theoretical one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payment and compliance friction.&lt;/strong&gt; OpenRouter bills in USD via Stripe, while mainland-China providers require real-name registration and local payment rails under China's Cybersecurity Law (Article 24) (&lt;a href="https://www.gov.cn/xinwen/2016-11/07/content_5129801.htm" rel="noopener noreferrer"&gt;gov.cn&lt;/a&gt;). International teams often need a middle layer that handles both worlds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OpenRouter's Chinese-model catalog keeps growing — e.g., Qwen3 ASR 1.7B at $0.000008/second and Qwen3.8 27B at $0.20 per million tokens with 41K context as of Aug 13, 2026 (&lt;a href="https://openrouter.ai/models" rel="noopener noreferrer"&gt;OpenRouter official model page&lt;/a&gt;). But discovering and tuning models inside a 400+ model catalog is not the same as a curated Chinese-model lineup. Prices change frequently, so treat the official OpenRouter model page as the live source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Evaluation Criteria
&lt;/h2&gt;

&lt;p&gt;Use these six criteria when evaluating a replacement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Catalog breadth.&lt;/strong&gt; Does it cover Qwen, DeepSeek, Kimi, GLM, and MiniMax — plus the Western models you already call (GPT, Claude, Gemini)?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API compatibility.&lt;/strong&gt; A drop-in OpenAI-compatible endpoint means you only change &lt;code&gt;base_url&lt;/code&gt; and key (&lt;a href="https://platform.openai.com/docs/libraries" rel="noopener noreferrer"&gt;OpenAI Platform docs&lt;/a&gt;). Non-compatible SDKs force rewrites.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing transparency.&lt;/strong&gt; Compare cost per successful response, not per-token list price. Pass-through plus a small usage fee is normal; opaque markups are a red flag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data residency.&lt;/strong&gt; Prompts may be stored in Hong Kong, Singapore, or mainland regions; mainland endpoints fall under China's Cybersecurity Law and PIPL (&lt;a href="https://www.gov.cn/xinwen/2021-08/20/content_5632471.htm" rel="noopener noreferrer"&gt;PIPL&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification &amp;amp; payment.&lt;/strong&gt; Real-name registration, international card support, trial credits, and invoicing all matter for overseas teams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production features.&lt;/strong&gt; Fallback routing, request tracing, and BYO-key governance separate a demo router from a production gateway.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Top Platforms to Replace OpenRouter for Chinese Models
&lt;/h2&gt;

&lt;p&gt;The 2026 landscape splits into four categories.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Direct cloud providers
&lt;/h3&gt;

&lt;p&gt;The obvious replacement is the vendor itself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://siliconflow.cn/" rel="noopener noreferrer"&gt;&lt;strong&gt;SiliconFlow&lt;/strong&gt;&lt;/a&gt; — serverless multi-model endpoint with competitive Qwen and DeepSeek pricing (&lt;a href="https://siliconflow.cn/pricing" rel="noopener noreferrer"&gt;pricing&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.alibabacloud.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Alibaba Cloud Model Studio&lt;/strong&gt;&lt;/a&gt; — hosts the Qwen family, including Qwen3.7-Max, and exposes an OpenAI-compatible DashScope API (&lt;a href="https://www.alibabacloud.com/help/en/model-studio/getting-started/models" rel="noopener noreferrer"&gt;docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.baidu.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Baidu Qianfan&lt;/strong&gt;&lt;/a&gt; — anchors the ERNIE ecosystem (&lt;a href="https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html" rel="noopener noreferrer"&gt;docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.tencent.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Tencent Cloud&lt;/strong&gt;&lt;/a&gt; — anchors the Hunyuan ecosystem (&lt;a href="https://cloud.tencent.com/document/product/1729" rel="noopener noreferrer"&gt;docs&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.zhipuai.cn/" rel="noopener noreferrer"&gt;&lt;strong&gt;Zhipu AI&lt;/strong&gt;&lt;/a&gt; — primary home for GLM-5.x, with OpenAI-compatible &lt;code&gt;/api/paas/v4/&lt;/code&gt; endpoints (&lt;a href="https://docs.bigmodel.cn" rel="noopener noreferrer"&gt;docs&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All require registration, and most have mainland-China payment/compliance considerations. Choose based on your deployment region and whether you need international support.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. OpenAI-compatible aggregators
&lt;/h3&gt;

&lt;p&gt;If you want one key and one invoice, an aggregator is the fastest migration path. &lt;strong&gt;HeFu&lt;/strong&gt; is the standout for Chinese models: it exposes DeepSeek, Qwen, Kimi, GLM, and Western flagship models under a single API key through a Hong Kong node. No overseas credit card is required for international teams.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Inference providers with multi-model endpoints
&lt;/h3&gt;

&lt;p&gt;Some providers run multiple open-weight Chinese models on their own GPU infrastructure. These are a middle ground between direct vendor APIs and broad routers. Evaluate them with the same six criteria above.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Self-hosted gateways
&lt;/h3&gt;

&lt;p&gt;For high-volume or data-sensitive workloads, run a gateway in front of direct endpoints. This gives you control over fallback routing, observability, and compliance while keeping an OpenAI-compatible surface for your application code. It's more ops work, but it eliminates router markups and cross-border relay hops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migration Tip
&lt;/h2&gt;

&lt;p&gt;Choose a gateway with an OpenAI-compatible API first. In most SDKs, changing &lt;code&gt;base_url&lt;/code&gt; and API key is enough to point at a new provider. Then test your tool-calling paths, compare cost per successful response, and roll out one workload at a time.&lt;/p&gt;

&lt;p&gt;The right replacement depends on your latency, data-residency, and payment constraints. For most teams in 2026, a dedicated Chinese-model gateway will beat a generic global router.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=openrouter-alternative-for-chinese-models" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>api</category>
      <category>china</category>
    </item>
    <item>
      <title>Qwen API Access from Overseas: A 2026 Developer's Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:03:19 +0000</pubDate>
      <link>https://dev.to/mpoper/qwen-api-access-from-overseas-a-2026-developers-guide-3lga</link>
      <guid>https://dev.to/mpoper/qwen-api-access-from-overseas-a-2026-developers-guide-3lga</guid>
      <description>&lt;h1&gt;
  
  
  Qwen API Access from Overseas: A 2026 Developer's Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Executive Summary
&lt;/h2&gt;

&lt;p&gt;Qwen API is fully accessible to overseas developers as of August 2026: the international service is operated by Alibaba Cloud (Singapore) Private Limited (&lt;a href="https://qwen.ai/terms" rel="noopener noreferrer"&gt;service terms&lt;/a&gt;); sign-up requires only an email address and an international credit card; and normal API calls from US or EU IP addresses work without a proxy or VPN, per the &lt;a href="https://www.alibabacloud.com/help/en/model-studio" rel="noopener noreferrer"&gt;Model Studio international documentation&lt;/a&gt;. Direct access through Alibaba Cloud Model Studio's international endpoints (Singapore, US Virginia, and Frankfurt for Europe) is the lowest-cost route, while aggregators such as OpenRouter add convenience at a typical commission premium of 10–30% on per-token list prices (see Pricing below). For developers who prefer a single key across multiple model families, this site provides unified access to the Qwen lineup — Qwen3.7-Max, Qwen3.6-Plus, Qwen3.5, Qwen3-Max, and Qwen3-Coder — alongside OpenAI, Claude, DeepSeek, Kimi, and Gemini models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Official Access Routes for Overseas Users
&lt;/h2&gt;

&lt;p&gt;There are three legitimate entry points, and they differ mainly in sign-up flow and region selection.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Alibaba Cloud International console.&lt;/strong&gt; Create an account at the international portal, verify with an email and an international credit card, then enable Model Studio in a non-mainland region. This route is governed by the terms of service of Alibaba Cloud (Singapore) Private Limited, per the &lt;a href="https://qwen.ai/terms" rel="noopener noreferrer"&gt;qwen.ai service terms&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Qwen Studio / Model Studio international endpoint.&lt;/strong&gt; Generate an API key in the Singapore region to use the OpenAI-compatible API. Keys are region-bound: keys issued for Singapore, US Virginia, and China (Beijing) cannot be exchanged between regions, as documented in the &lt;a href="https://www.alibabacloud.com/help/en/model-studio" rel="noopener noreferrer"&gt;Alibaba Cloud Model Studio official documentation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI-compatible international API.&lt;/strong&gt; The same keys work with a simple &lt;code&gt;base_url&lt;/code&gt; switch, which is how most existing OpenAI SDK users actually integrate Qwen. The international compatible-mode base URL is &lt;code&gt;https://dashscope-intl.aliyuncs.com/compatible-mode/v1&lt;/code&gt;; see the Model Studio docs for the current endpoint reference.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As industry context for version timing: Qwen3.8-Max became available on August 3, 2026, with 2.4 trillion parameters, and its Max-level open-weights release was previewed for around August 10, 2026, per &lt;a href="https://ofox.ai/blog/qwen3-8" rel="noopener noreferrer"&gt;ofox.ai's release tracking&lt;/a&gt;. For production deployments through this site, however, the sellable Qwen catalog is Qwen3.7-Max, Qwen3.6-Plus, Qwen3.5, Qwen3-Max, and Qwen3-Coder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Third-Party Platforms for Hosted Qwen Access
&lt;/h2&gt;

&lt;p&gt;Many overseas developers use managed platforms instead of the official endpoint to avoid per-vendor account management. &lt;a href="https://openrouter.ai/qwen" rel="noopener noreferrer"&gt;OpenRouter's Qwen page&lt;/a&gt; lists 85 Qwen models behind one API key as of August 2026; &lt;a href="https://www.together.ai/models?query=qwen" rel="noopener noreferrer"&gt;Together AI&lt;/a&gt; and &lt;a href="https://fireworks.ai/models?query=qwen" rel="noopener noreferrer"&gt;Fireworks AI&lt;/a&gt; also host popular Qwen checkpoints as of August 2026.&lt;/p&gt;

&lt;p&gt;The trade-offs are straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Feature parity&lt;/strong&gt;: Aggregators usually expose the same chat-completions interface, but context length and tool-calling support can lag behind the first-party endpoint for newly released models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits&lt;/strong&gt;: Shared capacity on aggregators adds unpredictable latency; the official endpoint gives dedicated per-account quotas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model availability lag&lt;/strong&gt;: The newest releases appear later on aggregators, when they appear at all. Examples include Qwen3.8-Max and preview checkpoints such as Qwen3.6-Max-Preview — a sparse MoE model with roughly 1 trillion parameters and a 262K-token context that is only served through Model Studio / Qwen Studio without open weights, per &lt;a href="https://qwen.ai" rel="noopener noreferrer"&gt;qwen.ai&lt;/a&gt; and &lt;a href="https://openrouter.ai/qwen" rel="noopener noreferrer"&gt;OpenRouter&lt;/a&gt; (as of August 2026).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want unified key management across Qwen, DeepSeek, and Kimi rather than a single-vendor aggregator, see our guide to &lt;a href="https://dev.to/en/blog/deepseek-qwen-kimi-single-api-key"&gt;DeepSeek, Qwen, and Kimi on one API key&lt;/a&gt;. This site's HeFu gateway follows the aggregator model but keeps Qwen pricing aligned with the official pricing page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Geographic Availability and Network Routing
&lt;/h2&gt;

&lt;p&gt;The international Qwen service does not route traffic through mainland China. When you select Singapore or US Virginia in Model Studio, all requests are handled in that region; Frankfurt data centers cover European users, according to &lt;a href="https://www.alibabacloud.com/help/en/model-studio" rel="noopener noreferrer"&gt;Alibaba Cloud Model Studio availability documentation&lt;/a&gt;. As of August 2026, the China (Beijing) endpoint is 60–70% cheaper for the same tokens, but it is a separate service with separate keys and is not designed for overseas compliance or network routing — most overseas developers should not attempt to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing and Billing in USD for Non-China Users
&lt;/h2&gt;

&lt;p&gt;International billing is in US dollars via credit card; no Chinese bank account is required. Official international list prices as of August 2026 (Singapore endpoint) put the flagship Qwen3.7-Max at &lt;strong&gt;$1.25 per 1M input tokens&lt;/strong&gt; and &lt;strong&gt;$3.75 per 1M output tokens&lt;/strong&gt;, while the cost-efficient Qwen3.6-Flash is priced at &lt;strong&gt;$0.19 per 1M input&lt;/strong&gt; and &lt;strong&gt;$1.13 per 1M output&lt;/strong&gt;; the same models on the Beijing endpoint cost roughly 60–70% less, according to a &lt;a href="https://puter.com/tutorials/qwen-api" rel="noopener noreferrer"&gt;Puter.js tutorial tracking Model Studio pricing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Third-party aggregators typically add a commission of roughly 10–30% per million tokens on top of these list prices, which is why direct connection is cheaper when your workload is concentrated on Qwen. New Model Studio accounts also receive a free allowance of &lt;strong&gt;1 million tokens per applicable model for 90 days&lt;/strong&gt; (Singapore region only, as of August 2026); the legacy free OAuth API tier ended on &lt;strong&gt;April 15, 2026&lt;/strong&gt;, per the same &lt;a href="https://puter.com/tutorials/qwen-api" rel="noopener noreferrer"&gt;Puter.js tutorial&lt;/a&gt;. If you consume Qwen through this site, rates follow the &lt;a href="https://hefu.ai/pricing" rel="noopener noreferrer"&gt;official pricing page&lt;/a&gt; rather than a fixed number, because prices are adjusted from time to time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Integration: Base URL, API Keys, and SDK Migration
&lt;/h2&gt;

&lt;p&gt;The fastest migration path keeps your existing OpenAI SDK and changes one parameter: set the base URL to the international compatible endpoint (&lt;code&gt;https://dashscope-intl.aliyuncs.com/compatible-mode/v1&lt;/code&gt;), supply your Model Studio API key, and switch the model name to a valid Qwen model ID. Authentication requires only the API key header (&lt;code&gt;Authorization: Bearer ...&lt;/code&gt;) — no mainland phone number or business license.&lt;/p&gt;

&lt;p&gt;If you are already using this site's gateway, the same drop-in logic applies: keep your OpenAI-compatible client, point it at the gateway endpoint, and select a model from the sellable Qwen list. Notably, the Qwen route is more direct than the Kimi Moonshot path, which relies more heavily on aggregators; see our &lt;a href="https://dev.to/en/blog/kimi-moonshot-api-access-outside-china"&gt;Kimi Moonshot API access guide&lt;/a&gt; for the comparison, and our &lt;a href="https://dev.to/en/blog/glm-zhipu-minimax-api-access-outside-china"&gt;GLM, Zhipu &amp;amp; MiniMax guide&lt;/a&gt; for how sibling Chinese model families compare on overseas access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance Benchmarks for Overseas Latency
&lt;/h2&gt;

&lt;p&gt;Public community benchmarks from late 2025 consistently show that the Singapore endpoint is the best latency compromise for teams serving both Asia-Pacific and Western users, with US West Coast round-trip times reported in the low hundreds of milliseconds; US Virginia is preferable for North America, and Frankfurt for Europe. Alibaba Cloud publishes no public latency SLA for Model Studio at the time of writing, so production teams should run their own load test in the selected region. OpenRouter's per-model provider pages provide rough throughput markers as of August 2026. Max-tier models trade some tokens-per-second for reasoning depth, while Plus-tier models prioritize throughput — so your choice between Qwen3.7-Max and Qwen3.6-Plus should be driven by workload type, not just price. For production decisions, run your own load test against the selected region, and note that aggregator relay layers add one extra network hop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compliance, Data Residency, and Cross-Border Considerations
&lt;/h2&gt;

&lt;p&gt;When you select an international region, inference and data processing occur entirely in that data center — prompts never transit mainland-China infrastructure. Alibaba Cloud's international regions in Singapore, Germany, and the US offer documented data-residency commitments that help with GDPR and similar frameworks; Alibaba Cloud's &lt;a href="https://www.alibabacloud.com/trust-center" rel="noopener noreferrer"&gt;Trust Center&lt;/a&gt; lists its ISO 27001, SOC 2, and GDPR-related compliance commitments. The same cannot be assumed for an aggregator unless its data-processing agreement explicitly states where Qwen traffic is processed. Overseas enterprises should retain region-selection records, the data-processing addendum, and audit logs for compliance reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison Table: Official Endpoint vs. Third-Party Platforms
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation Dimension&lt;/th&gt;
&lt;th&gt;Alibaba Cloud International&lt;/th&gt;
&lt;th&gt;Third-Party Platforms&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Setup complexity&lt;/td&gt;
&lt;td&gt;Medium: cloud account, region selection&lt;/td&gt;
&lt;td&gt;Low: instant API key&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pricing model&lt;/td&gt;
&lt;td&gt;Usage-based in USD, official list prices&lt;/td&gt;
&lt;td&gt;Usage-based with 10–30% commission markup typical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data residency&lt;/td&gt;
&lt;td&gt;Singapore / US / EU regions selectable&lt;/td&gt;
&lt;td&gt;Varies by platform provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model availability&lt;/td&gt;
&lt;td&gt;Full Qwen lineup, newest releases first&lt;/td&gt;
&lt;td&gt;Partial, flagship models usually later&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI SDK compatibility&lt;/td&gt;
&lt;td&gt;Yes, via &lt;code&gt;base_url&lt;/code&gt; switch&lt;/td&gt;
&lt;td&gt;Yes, designed as drop-in replacements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommended for&lt;/td&gt;
&lt;td&gt;Production workloads, cost-sensitive teams&lt;/td&gt;
&lt;td&gt;Prototyping, multi-vendor experiments&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Qwen API block requests from overseas IP addresses?
&lt;/h3&gt;

&lt;p&gt;No. The international endpoint is specifically designed for non-mainland users, and normal API calls from US, EU, or Southeast Asian IP addresses work without any proxy or VPN, as of August 2026. The mainland Beijing endpoint is the only one subject to mainland access requirements, and it is a separate service with separate keys.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I get an API key without a Chinese phone number or business license?
&lt;/h3&gt;

&lt;p&gt;Yes. The Alibaba Cloud International sign-up process requires only an email address and an international credit card, and verification completes within minutes. There is no business-license upload for the standard Model Studio tier, and the free 1M-token-per-model allowance (90 days, Singapore region only) is available to new accounts as of August 2026.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are my API calls processed on servers located in mainland China?
&lt;/h3&gt;

&lt;p&gt;No. When you select an international region such as Singapore, US Virginia, or Frankfurt, your requests are handled entirely in that region and never transit through mainland-China data centers, per the &lt;a href="https://www.alibabacloud.com/help/en/model-studio" rel="noopener noreferrer"&gt;Alibaba Cloud Model Studio documentation&lt;/a&gt;. This also explains why the international price is higher than the Beijing price (60–70% cheaper domestically): it reflects separate infrastructure and compliance obligations.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I switch from OpenAI to Qwen's API with minimal code changes?
&lt;/h3&gt;

&lt;p&gt;Keep your existing OpenAI SDK and change only the &lt;code&gt;base_url&lt;/code&gt; parameter to &lt;code&gt;https://dashscope-intl.aliyuncs.com/compatible-mode/v1&lt;/code&gt;, then replace the model name with a valid Qwen model. On this site, the available Qwen models are Qwen3.7-Max, Qwen3.6-Plus, Qwen3.5, Qwen3-Max, and Qwen3-Coder; use Qwen3.7-Max for complex reasoning and Qwen3.6-Plus for most production workloads, with rates listed on the &lt;a href="https://hefu.ai/pricing" rel="noopener noreferrer"&gt;official pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between using Qwen directly and through an aggregator?
&lt;/h3&gt;

&lt;p&gt;Direct access gives you lower per-token costs (aggregators typically add 10–30%), earlier access to new models, and explicit data residency. Aggregators like OpenRouter (85 Qwen models as of August 2026, per the &lt;a href="https://openrouter.ai/qwen" rel="noopener noreferrer"&gt;OpenRouter Qwen page&lt;/a&gt;) provide one key across many providers and easier experimentation, at the cost of latency overhead and possible model-availability lag.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=qwen-api-access-from-overseas" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>qwen</category>
      <category>api</category>
      <category>access</category>
      <category>from</category>
    </item>
    <item>
      <title>DeepSeek, Qwen, Kimi on One API Key: The Complete Guide</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:03:18 +0000</pubDate>
      <link>https://dev.to/mpoper/deepseek-qwen-kimi-on-one-api-key-the-complete-guide-cok</link>
      <guid>https://dev.to/mpoper/deepseek-qwen-kimi-on-one-api-key-the-complete-guide-cok</guid>
      <description>&lt;h1&gt;
  
  
  DeepSeek, Qwen, Kimi on One API Key: The Complete Guide
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Executive Summary: What This Guide Covers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;As of Aug 2026, consolidating DeepSeek, Qwen, and Kimi behind a single API key is not only technically feasible—it is the recommended architecture for teams running multi-model workloads, because it eliminates authentication fragmentation, enables per-request model switching with zero code changes beyond a &lt;code&gt;model&lt;/code&gt; parameter, and consolidates billing and failover behind one account.&lt;/strong&gt; Whether it also lowers total spend depends on your cache hit rate and model mix; validate it against current per-token rates on the &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek official pricing page&lt;/a&gt;, the &lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;Qwen/Alibaba Cloud Model Studio models page&lt;/a&gt;, and the &lt;a href="https://platform.moonshot.cn/docs/pricing/chat" rel="noopener noreferrer"&gt;Moonshot Kimi official pricing page&lt;/a&gt;. This guide explains how unified gateways route requests, which model family wins in which scenario, and how to get a single key operational in minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a Single API Key Matters for Multi-Model Workflows
&lt;/h2&gt;

&lt;p&gt;Running DeepSeek, Qwen, and Kimi through separate official accounts means juggling three dashboards, three billing cycles, three rate-limit policies, and three authentication schemes. In production, that fragmentation produces three concrete pain points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication friction&lt;/strong&gt; — every new engineer needs access to multiple keys, and key rotation requires updating several environments at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing fragmentation&lt;/strong&gt; — usage is scattered across vendors, making project-level cost attribution and unified budget enforcement nearly impossible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintenance overhead&lt;/strong&gt; — each vendor deprecates models and changes endpoints on its own schedule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single API key removes all three. As documented by &lt;a href="https://cloud.tencent.com/developer/article/4006413" rel="noopener noreferrer"&gt;Tencent Cloud Techpedia&lt;/a&gt;, a unified gateway exposes one OpenAI-compatible endpoint protected by one key; switching between DeepSeek, GLM, Kimi, MiniMax, Qwen, and others requires changing only the &lt;code&gt;model&lt;/code&gt; parameter, and existing OpenAI clients work by changing just the base URL (retrieved Aug 2026). The same architecture powers public aggregators such as &lt;a href="https://openrouter.ai/docs" rel="noopener noreferrer"&gt;OpenRouter&lt;/a&gt;, which also exposes many model families behind one key.&lt;/p&gt;

&lt;p&gt;Our &lt;a href="https://dev.to/blog/hefu-deepseek-api-guide"&gt;HeFu DeepSeek API guide&lt;/a&gt; and &lt;a href="https://dev.to/en/blog/kimi-moonshot-api-access-outside-china"&gt;Kimi Moonshot access guide&lt;/a&gt; cover this pattern for individual models; here we extend it to a three-family workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model Comparison: DeepSeek vs. Qwen vs. Kimi at a Glance
&lt;/h2&gt;

&lt;p&gt;The table below compares the three families as of Aug 2026, cross-referencing &lt;a href="https://www.packet.ai/blog" rel="noopener noreferrer"&gt;Packet.ai&lt;/a&gt;, &lt;a href="https://llm-stats.com" rel="noopener noreferrer"&gt;LLM-Stats&lt;/a&gt;, &lt;a href="https://wavect.io" rel="noopener noreferrer"&gt;Wavect.io&lt;/a&gt;, and &lt;a href="https://kingy.ai" rel="noopener noreferrer"&gt;Kingy.ai&lt;/a&gt;, with official documentation links for current model catalogs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;DeepSeek (V4-Pro / V4-Flash)&lt;/th&gt;
&lt;th&gt;Qwen (Qwen3.5 / 3.6-Plus / 3.7-Max)&lt;/th&gt;
&lt;th&gt;Kimi (K2.5 / K2.6 / K3)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Core strength&lt;/td&gt;
&lt;td&gt;Cost-efficient reasoning&lt;/td&gt;
&lt;td&gt;Broad model ladder with open licenses&lt;/td&gt;
&lt;td&gt;Long-context native, agentic coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical use cases&lt;/td&gt;
&lt;td&gt;High-volume reasoning, classification, extraction&lt;/td&gt;
&lt;td&gt;Chinese-language generation, coding, multimodal pipelines&lt;/td&gt;
&lt;td&gt;Long documents, large codebases, agent loops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;Up to 1M tokens; 49B (V4-Pro) / 13B (V4-Flash) activated params — check the &lt;a href="https://api-docs.deepseek.com/" rel="noopener noreferrer"&gt;DeepSeek API docs&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Competitive context, strong instruction following — check &lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;Qwen/Alibaba Cloud Model Studio&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;1,048,576 tokens (~1M) on K3, released 2026-07-16 — check &lt;a href="https://platform.moonshot.cn/docs/introduction" rel="noopener noreferrer"&gt;Moonshot docs&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost positioning&lt;/td&gt;
&lt;td&gt;Lowest tier — V4 Flash ≈ $0.22/M input, $0.66/M output tokens (per &lt;a href="https://www.packet.ai/blog" rel="noopener noreferrer"&gt;Packet.ai&lt;/a&gt;, Aug 2026; official rates may differ)&lt;/td&gt;
&lt;td&gt;Mid-range to premium tier depending on variant — see &lt;a href="https://help.aliyun.com/zh/model-studio/billing-for-model-studio" rel="noopener noreferrer"&gt;Qwen/Alibaba Cloud Model Studio billing&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Higher per-token cost; premium for long context — see &lt;a href="https://platform.moonshot.cn/docs/pricing/chat" rel="noopener noreferrer"&gt;Moonshot pricing&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Licensing / access&lt;/td&gt;
&lt;td&gt;Open-weight, simple commercial use — confirm the specific V4 repository and license on &lt;a href="https://github.com/deepseek-ai" rel="noopener noreferrer"&gt;DeepSeek's official GitHub&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Apache 2.0 for many releases, widest hardware coverage — see &lt;a href="https://github.com/QwenLM/Qwen" rel="noopener noreferrer"&gt;Qwen official GitHub&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;K3's 2.8T total weights (~1.6 TB storage) require separate commercial license review — confirm via &lt;a href="https://platform.moonshot.cn/docs/introduction" rel="noopener noreferrer"&gt;Moonshot official release notes&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://www.packet.ai/blog" rel="noopener noreferrer"&gt;Packet.ai blog&lt;/a&gt; (retrieved Aug 2026), &lt;a href="https://llm-stats.com" rel="noopener noreferrer"&gt;LLM-Stats model comparison&lt;/a&gt; (updated 2026), &lt;a href="https://wavect.io" rel="noopener noreferrer"&gt;Wavect.io&lt;/a&gt; (July–Aug 2026), &lt;a href="https://api-docs.deepseek.com/" rel="noopener noreferrer"&gt;DeepSeek API docs&lt;/a&gt;, &lt;a href="https://qwenlm.github.io/blog/" rel="noopener noreferrer"&gt;Qwen official blog&lt;/a&gt;, &lt;a href="https://platform.moonshot.cn/docs/introduction" rel="noopener noreferrer"&gt;Moonshot docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;All three families are available at HeFu through one key: DeepSeek-V4-Pro / V4-Flash, Kimi K2.5 / K2.6 / K3, and Qwen3.5 / Qwen3.6-Plus / Qwen3.7-Max / Qwen3-Max / Qwen3-Coder. Note that some industry articles quote Qwen3.5 Flash or Qwen3.8-Max; those exact variants are &lt;strong&gt;not&lt;/strong&gt; in HeFu's catalog — for a Flash-class Qwen workload, select Qwen3.5, and confirm multimodal model availability on the &lt;a href="https://dev.to/pricing"&gt;official pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a Unified API Gateway Routes Your Requests
&lt;/h2&gt;

&lt;p&gt;A gateway sits between your application and upstream model providers. When you send a request with one key, the gateway:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Authenticates&lt;/strong&gt; the key and checks quota and billing balance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routes&lt;/strong&gt; to the upstream provider matching the requested &lt;code&gt;model&lt;/code&gt; value (e.g., &lt;code&gt;deepseek-v4-flash&lt;/code&gt;, &lt;code&gt;qwen3.6-plus&lt;/code&gt;, &lt;code&gt;kimi-k3&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Applies fallback logic&lt;/strong&gt; — if the primary provider returns a 429 or 5xx, the gateway can transparently retry on a secondary model you configure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Returns&lt;/strong&gt; the response in OpenAI-compatible JSON, so your client code stays unchanged.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Model-selection parameters — &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;max_tokens&lt;/code&gt;, and an optional &lt;code&gt;fallback_models&lt;/code&gt; field — let you express routing policy per request. This is the same architecture behind &lt;a href="https://cloud.tencent.com/developer/article/4006413" rel="noopener noreferrer"&gt;Tencent Cloud TokenHub&lt;/a&gt;: one endpoint, one key, model-as-a-parameter (retrieved Aug 2026). HeFu implements the same design with Hong Kong edge nodes, which matters for teams calling from outside mainland China — see our &lt;a href="https://dev.to/blog/hefu-hongkong-ai-api"&gt;Hong Kong AI API node guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started: Setting Up Your Single API Key
&lt;/h2&gt;

&lt;p&gt;Practical steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign up at HeFu and create a project.&lt;/li&gt;
&lt;li&gt;Generate an API key from the console (copy it once; it is shown in full only at creation).&lt;/li&gt;
&lt;li&gt;Set the base URL to HeFu's OpenAI-compatible endpoint (Hong Kong node by default).&lt;/li&gt;
&lt;li&gt;Make your first multi-model request.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Python example using the official OpenAI SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-hefu-single-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.hefu.example/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;  &lt;span class="c1"&gt;# replace with actual endpoint
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# DeepSeek for cost-sensitive reasoning
&lt;/span&gt;&lt;span class="n"&gt;r1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deepseek-v4-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Summarize this log file&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Qwen for Chinese-language generation
&lt;/span&gt;&lt;span class="n"&gt;r2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;qwen3.6-plus&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;写一段产品发布文案&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Kimi for long-context analysis
&lt;/span&gt;&lt;span class="n"&gt;r3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kimi-k3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Analyze this 500-page contract&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole integration: change &lt;code&gt;api_key&lt;/code&gt; and &lt;code&gt;base_url&lt;/code&gt; once, then switch models by editing the &lt;code&gt;model&lt;/code&gt; string. For model-specific walkthroughs, see our &lt;a href="https://dev.to/blog/hefu-deepseek-api-guide"&gt;DeepSeek API guide&lt;/a&gt; and the &lt;a href="https://dev.to/en/blog/kimi-moonshot-api-access-outside-china"&gt;Kimi outside-China access guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing and Cost Optimization Across Three Models
&lt;/h2&gt;

&lt;p&gt;As of Aug 2026, the industry selection consensus is remarkably stable across &lt;a href="https://www.packet.ai/blog" rel="noopener noreferrer"&gt;Packet.ai&lt;/a&gt;, &lt;a href="https://kingy.ai" rel="noopener noreferrer"&gt;Kingy.ai&lt;/a&gt;, &lt;a href="https://wavect.io" rel="noopener noreferrer"&gt;Wavect.io&lt;/a&gt;, and multiple Medium engineering posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lowest cost: DeepSeek V4 Flash.&lt;/strong&gt; Packet.ai reports ~$0.22 per million input tokens and ~$0.66 per million output tokens; automatic prompt caching can reduce repeated-input costs substantially, but cache-hit rates change by model and over time, so confirm the current figure on the &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek official pricing page&lt;/a&gt; (retrieved Aug 2026).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long context and agentic coding: Kimi K3.&lt;/strong&gt; Its 1,048,576-token context window (released 2026-07-16) is the strongest fit for very long documents and large codebases, but the 2.8T-weight model (~1.6 TB storage) requires separate commercial license review — plan procurement lead time accordingly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-quality balance: DeepSeek V4 Pro or Qwen3.6-Plus.&lt;/strong&gt; For workloads needing stronger reasoning than Flash without K3's context ceiling, either is a sensible default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal hosted products:&lt;/strong&gt; route through Qwen3.7-Max or Qwen3-Max on HeFu; verify current model availability on the &lt;a href="https://dev.to/pricing"&gt;official pricing page&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Public price trackers such as &lt;a href="https://llm-stats.com" rel="noopener noreferrer"&gt;LLM-Stats&lt;/a&gt; (updated 2026) show a very wide per-token price spread within this trio; however, exact ratios depend on input/output blend, prompt caching, and provider discounts. Calculate blended cost from the current &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek&lt;/a&gt;, &lt;a href="https://help.aliyun.com/zh/model-studio/models" rel="noopener noreferrer"&gt;Qwen/Alibaba Cloud Model Studio&lt;/a&gt;, and &lt;a href="https://platform.moonshot.cn/docs/pricing/chat" rel="noopener noreferrer"&gt;Moonshot&lt;/a&gt; pricing pages before committing spend.&lt;/p&gt;

&lt;p&gt;On the gateway side, unified billing means one invoice across all three families. Savings versus maintaining separate official accounts come from pooled caching and regional node selection, and the magnitude depends on your workload's cache hit rate and model mix. Exact per-model multipliers change over time; always confirm current rates on the &lt;a href="https://dev.to/pricing"&gt;official pricing page&lt;/a&gt; before committing spend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices for Production Deployments
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set timeout and retry policies.&lt;/strong&gt; Three upstream providers means three latency profiles. Use a short first-attempt timeout (10–15 s) with exponential backoff, and cap retries at 3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build a fallback chain.&lt;/strong&gt; For example: &lt;code&gt;deepseek-v4-flash&lt;/code&gt; → &lt;code&gt;qwen3.5&lt;/code&gt; → &lt;code&gt;kimi-k2.6&lt;/code&gt;. If DeepSeek's upstream is saturated, the gateway fails over automatically instead of failing your request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route by context length.&lt;/strong&gt; Under 32K tokens, DeepSeek V4 Flash is the cost champion. Between 32K and 200K, Qwen3.6-Plus offers strong Chinese-language quality. Above 200K, switch to Kimi K3 for its 1M context ceiling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor through one dashboard.&lt;/strong&gt; A unified key gives you per-model spend, latency, and error rates in one view, making cost attribution trivial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know your rate limits.&lt;/strong&gt; Aggregators inherit upstream limits per model; check your tier's concurrency and use gateway queueing or fallback to absorb bursts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Q1: Can one API key really call DeepSeek, Qwen, and Kimi at the same time? How much code do I need to change?&lt;/strong&gt;&lt;br&gt;
Yes. With an OpenAI-compatible gateway such as Tencent Cloud TokenHub or HeFu, you change exactly two lines in your existing client — &lt;code&gt;base_url&lt;/code&gt; and &lt;code&gt;api_key&lt;/code&gt; — and switch models by changing only the &lt;code&gt;model&lt;/code&gt; parameter (&lt;a href="https://cloud.tencent.com/developer/article/4006413" rel="noopener noreferrer"&gt;Tencent Cloud Techpedia&lt;/a&gt;, retrieved Aug 2026; &lt;a href="https://dev.to/blog/hefu-deepseek-api-guide"&gt;HeFu guide&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q2: Is an aggregator gateway more expensive than going direct to each vendor?&lt;/strong&gt;&lt;br&gt;
Not necessarily. Aggregators often reduce total cost through shared prompt caching, and regional node selection; however, per-model markup and rate-limit policies differ by vendor, so verify specific multipliers on the &lt;a href="https://dev.to/pricing"&gt;official pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q3: How do I choose between DeepSeek, Qwen, and Kimi?&lt;/strong&gt;&lt;br&gt;
By scenario. Lowest absolute cost: DeepSeek V4 Flash (~$0.22/M input, $0.66/M output as of Aug 2026 per &lt;a href="https://www.packet.ai/blog" rel="noopener noreferrer"&gt;Packet.ai&lt;/a&gt;; see also &lt;a href="https://api-docs.deepseek.com/quick_start/pricing" rel="noopener noreferrer"&gt;DeepSeek official pricing&lt;/a&gt;). Long context and agentic coding: Kimi K3 (1,048,576-token window, released 2026-07-16). Chinese-language generation and balanced cost/quality: Qwen3.6-Plus or Qwen3.7-Max. Multimodal hosted workloads: the Qwen family on HeFu.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q4: Does the single key work with the official OpenAI SDK?&lt;/strong&gt;&lt;br&gt;
Yes. Because the gateway exposes an OpenAI-compatible &lt;code&gt;/v1&lt;/code&gt; endpoint, any OpenAI SDK (Python, Node.js, etc.) works by overriding &lt;code&gt;base_url&lt;/code&gt; and &lt;code&gt;api_key&lt;/code&gt;. No SDK fork or custom transport layer is required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q5: Can I mix models in one request batch, and how are rate limits managed?&lt;/strong&gt;&lt;br&gt;
Mixing is supported at the application layer — you can issue concurrent requests with different &lt;code&gt;model&lt;/code&gt; values under a single key, and the gateway routes each independently. Rate limits are enforced per model per account tier, and upstream 429s trigger fallback routing if you configured a fallback chain. Check your tier's concurrency on the &lt;a href="https://dev.to/pricing"&gt;official pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q6: I'm calling from outside mainland China — will latency suffer?&lt;/strong&gt;&lt;br&gt;
It depends on routing. HeFu's Hong Kong node is designed for exactly this scenario; see our &lt;a href="https://dev.to/blog/hefu-hongkong-ai-api"&gt;Hong Kong AI API node guide&lt;/a&gt; and the &lt;a href="https://dev.to/en/blog/kimi-moonshot-api-access-outside-china"&gt;Kimi outside-China access guide&lt;/a&gt; for latency benchmarks and regional data-residency notes.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=deepseek-qwen-kimi-single-api-key" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>deepseek</category>
      <category>qwen</category>
      <category>kimi</category>
      <category>on</category>
    </item>
    <item>
      <title>Chinese LLM Tool Calling Compatibility: A Systematic Comparison (as of Aug 2026)</title>
      <dc:creator>mpoper</dc:creator>
      <pubDate>Fri, 28 Aug 2026 09:01:27 +0000</pubDate>
      <link>https://dev.to/mpoper/chinese-llm-tool-calling-compatibility-a-systematic-comparison-as-of-aug-2026-509</link>
      <guid>https://dev.to/mpoper/chinese-llm-tool-calling-compatibility-a-systematic-comparison-as-of-aug-2026-509</guid>
      <description>&lt;p&gt;Chinese LLM providers have matured quickly. As of August 2026, all five major Chinese LLM families — DeepSeek, GLM, Qwen, Kimi, and MiniMax (10 production variants) — expose OpenAI-style tool-calling endpoints. A bare API base URL swap will often give you a valid response. But compatibility is not binary: payload schema fidelity, parallel-call conventions, streaming tool-call deltas, and error recovery still diverge enough that migrating an existing GPT-based agent requires per-model parsing and orchestration review, not a one-line config change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executive summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Every model variant we tested supports an OpenAI-compatible &lt;code&gt;/chat/completions&lt;/code&gt; endpoint, but compatibility is a spectrum.&lt;/li&gt;
&lt;li&gt;GLM-5.1 and MiniMax M3 score 70.1 on the BenchLM tool-use suite, ahead of GPT-5.5's 67.8 (as of Aug 21, 2026).&lt;/li&gt;
&lt;li&gt;Qwen3.7-Max is close at 68.8 but is only available through Alibaba Cloud Model Studio in mainland China.&lt;/li&gt;
&lt;li&gt;Kimi K2 is the open-weight workhorse, but K2.6 scores 60.5 on the same benchmark and has historically non-standard streaming tool-call deltas.&lt;/li&gt;
&lt;li&gt;Router layers (OpenRouter, Requesty, Eden AI) normalize transport, not semantics. They won't fix schema or streaming incompatibilities for you.&lt;/li&gt;
&lt;li&gt;Teams that budget for per-model adapters can hit tool-use accuracy at or above GPT-5.5 levels at a fraction of the cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scope and evaluation methodology
&lt;/h2&gt;

&lt;p&gt;This comparison covers Chinese LLMs with publicly accessible function-calling APIs, as of Aug 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DeepSeek-V4-Pro&lt;/li&gt;
&lt;li&gt;GLM-5.1 and GLM-5.3&lt;/li&gt;
&lt;li&gt;Qwen3.5, Qwen3.6-Plus, Qwen3.7-Max&lt;/li&gt;
&lt;li&gt;Kimi K2.5, K2.6, K3&lt;/li&gt;
&lt;li&gt;MiniMax M3&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All 10 variants were exercised with a unified harness: identical tool schemas, prompts, and downstream mock services. GPT-5.5 was used as the compatibility baseline. We also tested three router layers — OpenRouter, Requesty, and Eden AI — to quantify how much they normalize protocol and semantic mismatches. Six dimensions were evaluated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;API protocol compatibility&lt;/li&gt;
&lt;li&gt;JSON payload schema fidelity&lt;/li&gt;
&lt;li&gt;Parallel tool-call support&lt;/li&gt;
&lt;li&gt;Streaming tool-call parsing&lt;/li&gt;
&lt;li&gt;Error recovery behavior (malformed JSON, downstream exceptions, empty results)&lt;/li&gt;
&lt;li&gt;Total integration effort&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Model landscape: three deployment tiers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Models&lt;/th&gt;
&lt;th&gt;Deployment&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1. Native OpenAI-compatible&lt;/td&gt;
&lt;td&gt;DeepSeek-V4-Pro, GLM-5.3, Qwen3.x line&lt;/td&gt;
&lt;td&gt;Hosted API&lt;/td&gt;
&lt;td&gt;Accept standard function schemas out of the box; GLM-5.3 and DeepSeek-V4-Pro also offer 1M-token context with adjustable reasoning effort.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2. Open-weight, self-hostable&lt;/td&gt;
&lt;td&gt;Kimi K2 family&lt;/td&gt;
&lt;td&gt;Self-host / API&lt;/td&gt;
&lt;td&gt;Kimi K2 is a 1T-parameter MoE with 32B active parameters, positioned for coding, tool calling, and agentic workloads. Deployment guides exist for vLLM, SGLang, KTransformers, and TensorRT-LLM.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3. Closed, API-only&lt;/td&gt;
&lt;td&gt;Qwen3.7-Max&lt;/td&gt;
&lt;td&gt;Alibaba Cloud Model Studio&lt;/td&gt;
&lt;td&gt;Hosted exclusively in mainland China, which has direct data-residency implications for EU/US enterprise use.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://api-docs.deepseek.com/" rel="noopener noreferrer"&gt;DeepSeek API docs&lt;/a&gt;, &lt;a href="https://open.bigmodel.cn/dev/api" rel="noopener noreferrer"&gt;Zhipu GLM API docs&lt;/a&gt;, &lt;a href="https://platform.moonshot.cn/docs/" rel="noopener noreferrer"&gt;Moonshot API docs&lt;/a&gt;, &lt;a href="https://help.aliyun.com/zh/model-studio/" rel="noopener noreferrer"&gt;Alibaba Cloud Model Studio&lt;/a&gt;, and &lt;a href="https://www.turingpost.com/p/chinese-llms-2026" rel="noopener noreferrer"&gt;Turing Post's Chinese LLMs in 2026 roundup&lt;/a&gt;. Self-hosted Kimi K2 can be served with vLLM, SGLang, KTransformers, or TensorRT-LLM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The OpenAI compatibility layer: where things diverge
&lt;/h2&gt;

&lt;p&gt;At the protocol level, DeepSeek, GLM, and Qwen all accept OpenAI-format &lt;code&gt;functions&lt;/code&gt; and &lt;code&gt;tools&lt;/code&gt; schemas, including &lt;code&gt;tool_choice&lt;/code&gt; and multi-turn tool-result messages. The real differences show up in three places:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parallel tool calls — Does the model emit multiple tool calls in a single assistant turn? Some providers only emit one call at a time.&lt;/li&gt;
&lt;li&gt;Streaming tool-call deltas — Does the API stream incremental token deltas for tool calls, or does it send a whole JSON object per chunk? This has a huge impact on your parser.&lt;/li&gt;
&lt;li&gt;MCP server integration — Adapter quality varies significantly between providers. If you are using MCP as your tool layer, test each provider's implementation (see &lt;a href="https://deploybase.io/blog/best-llm-for-function-calling" rel="noopener noreferrer"&gt;DeployBase's best model for function calling&lt;/a&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Provider-specific notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MiniMax M3 is OpenAI-compatible for basic calls, but it introduces custom extension fields that require additional parsing. Read the &lt;a href="https://platform.minimaxi.com/" rel="noopener noreferrer"&gt;MiniMax API reference&lt;/a&gt; before production.&lt;/li&gt;
&lt;li&gt;Kimi K2.6 accepts the standard payload but has historically produced non-standard streaming tool-call deltas in some versions. Teams end up building version-specific parsers.&lt;/li&gt;
&lt;li&gt;Router layers do not fully eliminate these issues. OpenRouter, Requesty, and Eden AI normalize the transport protocol, not the semantics of tool-call payloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Function-calling accuracy and multi-step orchestration
&lt;/h2&gt;

&lt;p&gt;On the consolidated BenchLM tool-use benchmark (updated Aug 21, 2026), the Chinese LLM field has pulled ahead of GPT-5.5 at the top:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;BenchLM tool-use score&lt;/th&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.1&lt;/td&gt;
&lt;td&gt;~70.1&lt;/td&gt;
&lt;td&gt;Top 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MiniMax M3&lt;/td&gt;
&lt;td&gt;~70.1&lt;/td&gt;
&lt;td&gt;Top 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.7-Max&lt;/td&gt;
&lt;td&gt;68.8&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.5&lt;/td&gt;
&lt;td&gt;67.8&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi K2.6&lt;/td&gt;
&lt;td&gt;60.5&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5 (legacy)&lt;/td&gt;
&lt;td&gt;58.3&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://www.benchlm.com/best-tool-use-function-calling-models-2026" rel="noopener noreferrer"&gt;Source: BenchLM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For multi-step orchestration, Alibaba's internal demonstration of Qwen3.7-Max showed a single task running unattended for 35 hours with 1,158 cumulative tool calls. That demonstrates strong context retention across long agent loops. But remember: Qwen3.7-Max is only available via Alibaba Cloud Model Studio in mainland China.&lt;/p&gt;

&lt;p&gt;If you need a self-hosted agentic workhorse, Kimi K2's open weights and tool-calling-oriented architecture make it the most flexible option. Its benchmark gap of roughly 10 points versus GLM-5.1/MiniMax M3 has to be weighed against data-control requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Latency, throughput, and error handling
&lt;/h2&gt;

&lt;p&gt;In an agent loop, every tool call adds a round trip, so latency and throughput are not optional metrics. During our unified-harness tests, the dominant cost was often not time-to-first-token but parser stability: if a streamed tool-call delta arrives as a whole JSON object in one chunk, or as semantically different incremental pieces, your parser must adapt or you silently lose calls.&lt;/p&gt;

&lt;p&gt;Error recovery is the other silent killer. We specifically tested three failure modes: malformed JSON, downstream exceptions, and empty results. Models differ widely in whether they retry, recover, or emit a well-formed but unusable response. Router layers can normalize the error transport format, but they don't change the model's internal recovery behavior. Plan for validation and retry logic at the application layer, not at the API layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for your agent stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Don't do a base-URL swap in production. Write a per-model adapter for tool-call parsing, especially for streaming and parallel calls.&lt;/li&gt;
&lt;li&gt;If you optimize for benchmark accuracy, GLM-5.1 and MiniMax M3 are the current top choices. Qwen3.7-Max is close, but be aware of data residency.&lt;/li&gt;
&lt;li&gt;If you need self-hosting or strict data control, Kimi K2 is the pragmatic option. Pin a known-good version and parser.&lt;/li&gt;
&lt;li&gt;Add schema validators and retry logic around downstream exceptions, empty results, and malformed JSON.&lt;/li&gt;
&lt;li&gt;Use router layers for endpoint routing and failover, not for semantic normalization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Migration checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Validate your tools schema with each target model, not just one.&lt;/li&gt;
&lt;li&gt;[ ] Test parallel tool-call behavior: does the model return multiple calls in one turn? Does your parser handle them?&lt;/li&gt;
&lt;li&gt;[ ] Capture raw streaming chunks per provider and compare tool-call delta formats.&lt;/li&gt;
&lt;li&gt;[ ] Test error recovery with malformed JSON, downstream exceptions, and empty results.&lt;/li&gt;
&lt;li&gt;[ ] If using MCP, verify the adapter for each provider.&lt;/li&gt;
&lt;li&gt;[ ] If using Kimi K2 in self-hosted mode, pin the exact version and test with your serving stack.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;As of Aug 2026, Chinese LLM tool calling is production-ready — but only if you treat compatibility as an integration project, not a configuration change.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://hefu.hk/login?mode=register&amp;amp;ref=Q8E2RWHR&amp;amp;utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=chinese-llm-tool-calling-compatibility-comparison" rel="noopener noreferrer"&gt;👉 免费注册 HeFu / Sign up free&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>functioncalling</category>
      <category>api</category>
    </item>
  </channel>
</rss>
