<?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: AIHubMix</title>
    <description>The latest articles on DEV Community by AIHubMix (@aihubmix).</description>
    <link>https://dev.to/aihubmix</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%2F3926159%2Fb406b2d2-62da-447b-afeb-febff1b99896.jpg</url>
      <title>DEV Community: AIHubMix</title>
      <link>https://dev.to/aihubmix</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aihubmix"/>
    <language>en</language>
    <item>
      <title>DeepSeek V4.1 Flash API Pricing: AIHubMix vs. OpenRouter</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Sun, 20 Sep 2026 14:23:50 +0000</pubDate>
      <link>https://dev.to/aihubmix/deepseek-v41-flash-api-pricing-aihubmix-vs-openrouter-1pnb</link>
      <guid>https://dev.to/aihubmix/deepseek-v41-flash-api-pricing-aihubmix-vs-openrouter-1pnb</guid>
      <description>&lt;p&gt;If you are building an AI coding assistant or agent, model capability is only half the decision. The API route can change your cost, fallback behavior, and operational flexibility just as much.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aihubmix.com/model/deepseek-v4.1-flash" rel="noopener noreferrer"&gt;DeepSeek V4.1 Flash&lt;/a&gt; is now available through AIHubMix and OpenRouter. It combines a roughly 1M-token context window with native image understanding, tool calling, structured JSON output, and agent-oriented workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing comparison
&lt;/h2&gt;

&lt;p&gt;Prices checked on September 20, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Cache read&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;$0.13 / 1M&lt;/td&gt;
&lt;td&gt;$0.52 / 1M&lt;/td&gt;
&lt;td&gt;$0.0026 / 1M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AIHubMix — ByteDance off-peak&lt;/td&gt;
&lt;td&gt;$0.0986 / 1M&lt;/td&gt;
&lt;td&gt;$0.3942 / 1M&lt;/td&gt;
&lt;td&gt;$0.002 / 1M&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The AIHubMix figures include a current 30% promotion, reducing the regular off-peak input price from $0.1408 to $0.0986 per 1M tokens and output from $0.5632 to $0.3942. The promotion is currently listed through September 27, 2026, so verify the live &lt;a href="https://aihubmix.com/model/deepseek-v4.1-flash" rel="noopener noreferrer"&gt;model page&lt;/a&gt; before committing production traffic.&lt;/p&gt;

&lt;p&gt;For 10M input tokens and 2M output tokens, the discounted off-peak route costs about $1.7756. The comparable peak route is about $3.548, while the same off-peak workload before the discount would be about $2.9764.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes DeepSeek V4.1 Flash useful?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1M-token context
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aihubmix.com/model/deepseek-v4.1-flash" rel="noopener noreferrer"&gt;DeepSeek V4.1 Flash&lt;/a&gt; supports approximately 1,048,576 tokens of context. This is useful for large repositories, long technical documents, multi-step research, browser workflows, and large log or business-data inputs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Native image understanding
&lt;/h3&gt;

&lt;p&gt;The model accepts both text and images and returns text. That supports visual document analysis, chart interpretation, screenshot-aware coding, and image-aware customer-support workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tool calling and structured output
&lt;/h3&gt;

&lt;p&gt;It supports tool calling, tool_choice, and JSON Schema-based structured output. A typical agent loop can therefore look like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The model interprets the task.&lt;/li&gt;
&lt;li&gt;It selects a tool and returns structured arguments.&lt;/li&gt;
&lt;li&gt;Your application executes the tool.&lt;/li&gt;
&lt;li&gt;The result is sent back to the model for the next step.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  AIHubMix vs. OpenRouter
&lt;/h2&gt;

&lt;p&gt;AIHubMix provides an OpenAI-compatible API, a unified model ID, multiple provider routes, peak and off-peak pricing, provider monitoring, retries, fallback, streaming, tool calling, structured output, and multimodal input.&lt;/p&gt;

&lt;p&gt;OpenRouter exposes the model as deepseek/deepseek-v4.1-flash, with provider selection and exclusion, automatic failover, and public provider-level pricing and performance data.&lt;/p&gt;

&lt;p&gt;The practical choice depends on your priorities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose OpenRouter if provider selection and a broad routing layer are central to your workflow.&lt;/li&gt;
&lt;li&gt;Choose AIHubMix if you want an OpenAI-compatible endpoint, scheduled pricing, and the current discount on the eligible route.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick start with AIHubMix
&lt;/h2&gt;

&lt;p&gt;The endpoint is OpenAI-compatible:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ[AIHUBMIX_API_KEY],
    base_url=https://aihubmix.com/v1,
)

response = client.chat.completions.create(
    model=deepseek-v4.1-flash,
    messages=[
        {role: user, content: Analyze this codebase and identify the highest-priority reliability risks.}
    ],
    max_tokens=1024,
    stream=False,
)

print(response.choices[0].message.content)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The AIHubMix model ID is deepseek-v4.1-flash; the OpenRouter model ID is deepseek/deepseek-v4.1-flash.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best-fit workloads
&lt;/h2&gt;

&lt;p&gt;The model is a good fit for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coding assistants and repository-level code analysis&lt;/li&gt;
&lt;li&gt;Terminal, browser, and computer-use agents&lt;/li&gt;
&lt;li&gt;Document and chart understanding&lt;/li&gt;
&lt;li&gt;Structured extraction&lt;/li&gt;
&lt;li&gt;Research agents&lt;/li&gt;
&lt;li&gt;Multi-step automation with repeated tool calls&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aihubmix.com/model/deepseek-v4.1-flash" rel="noopener noreferrer"&gt;DeepSeek V4.1 Flash&lt;/a&gt; combines long context, vision, tool calling, and structured output at a relatively low per-token cost.&lt;/p&gt;

&lt;p&gt;Before estimating production spend, check the current provider route, the GMT+9 peak/off-peak schedule, and whether the promotion is still active. Prices and availability can change.&lt;/p&gt;

&lt;p&gt;Source: &lt;a href="https://aihubmix.com/blog/zh-CN/deepseek-v4-1-flash-api-pricing-compared-aihubmix-30-off-vs-openrouter" rel="noopener noreferrer"&gt;AIHubMix pricing comparison&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
    <item>
      <title>Why did Gemini turn Chinese for no reason?</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Sun, 20 Sep 2026 08:31:47 +0000</pubDate>
      <link>https://dev.to/aihubmix/why-did-gemini-turn-chinese-for-no-reason-5811</link>
      <guid>https://dev.to/aihubmix/why-did-gemini-turn-chinese-for-no-reason-5811</guid>
      <description>&lt;p&gt;Gemini can occasionally return Chinese text in its reasoning content or final response even when the expected language is English. The most useful diagnosis is usually multilingual language-control drift—not an automatic switch to a separate Chinese model, and not an effect caused by response streaming.&lt;/p&gt;

&lt;p&gt;This article explains the behavior, the likely context signals, and the limits of what can be concluded from a single unexpected response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem statement
&lt;/h2&gt;

&lt;p&gt;Consider a multi-turn workflow with these characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The current prompt is written in English.&lt;/li&gt;
&lt;li&gt;The expected response language is English.&lt;/li&gt;
&lt;li&gt;The context includes Chinese sources, quotes, entities, or earlier messages.&lt;/li&gt;
&lt;li&gt;Gemini returns some &lt;code&gt;chinese&lt;/code&gt; text during reasoning or in the final answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgb85pb2lbuovd1owwjmc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgb85pb2lbuovd1owwjmc.png" alt=" " width="800" height="826"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The failure is observable, but its cause is not directly exposed. A language change alone cannot establish that the serving system selected a different model.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical model of the behavior
&lt;/h2&gt;

&lt;p&gt;Gemini is multilingual and generates output token by token. The next token is conditioned on the available conversation context, which can contain competing language signals.&lt;/p&gt;

&lt;p&gt;At a high level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;system and task instructions
        +
conversation history
        +
retrieved sources and quotations
        +
current user turn
        ↓
context-conditioned generation
        ↓
response language
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The intended language may be English, while nearby source material is Chinese. In sufficiently long, complex, or retrieval-heavy contexts, those signals can reduce language consistency. This is a conceptual explanation, not a disclosed description of Gemini's internal routing or implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Likely contributing factors
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Chinese source material
&lt;/h3&gt;

&lt;p&gt;Chinese webpages, product information, and source documents supply vocabulary and sentence patterns that may influence the generated continuation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conversation history
&lt;/h3&gt;

&lt;p&gt;Language state can carry across turns. A prior Chinese quote or answer may influence a later English &lt;code&gt;turn&lt;/code&gt;; the final instruction is not the only text shaping how the model will &lt;code&gt;respond&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Token-by-token multilingual generation
&lt;/h3&gt;

&lt;p&gt;Language selection should not be treated as an absolute binary switch. A strong English instruction can coexist with local Chinese signals in the prompt context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Context complexity
&lt;/h3&gt;

&lt;p&gt;Long-context reasoning and retrieval-based tasks require the model to reconcile more text and more linguistic cues. The supplied project note identifies these scenarios as places where consistency may decrease.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;stream&lt;/code&gt; does—and does not do
&lt;/h2&gt;

&lt;p&gt;The API-style distinction is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stream=true   → return the response incrementally
stream=false  → return the response all at once
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither value is a language parameter. It controls response delivery, not whether Gemini uses English or Chinese. If Chinese text appears during a streamed response, disabling streaming does not address the underlying language-control issue.&lt;/p&gt;

&lt;p&gt;Correlation in one request is not causation: a streamed response can drift, but the streaming setting does not directly determine the language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mitigation checklist
&lt;/h2&gt;

&lt;p&gt;When reproducible language consistency matters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inspect the full context, not only the latest message.&lt;/li&gt;
&lt;li&gt;Identify Chinese sources, quotations, named entities, and earlier turns.&lt;/li&gt;
&lt;li&gt;Place the output-language requirement close to the current task.&lt;/li&gt;
&lt;li&gt;Use an explicit instruction such as:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Respond only in English, including the final answer.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Retry in a clean conversation when the existing context is long or multilingual.&lt;/li&gt;
&lt;li&gt;Keep &lt;code&gt;stream&lt;/code&gt; configured for delivery needs, not as a language-control workaround.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are context-management measures inferred from the likely causes. They reduce relevant sources of ambiguity but should not be represented as a guarantee.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduction and diagnosis limits
&lt;/h2&gt;

&lt;p&gt;A useful incident record should preserve the prompt, preceding turns, retrieved content, language instruction, &lt;code&gt;stream&lt;/code&gt; value, and exact output. Without that context, a screenshot of one Chinese phrase is insufficient to identify the cause.&lt;/p&gt;

&lt;p&gt;Public users have reported unexpected changes involving Chinese, Japanese, and Portuguese. The reports support the existence of a broader multilingual symptom, but community anecdotes cannot reveal internal implementation details or prove the cause of a particular request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Treat unexpected Chinese output as a language-consistency failure first. Separate the generation problem from the transport setting, audit every relevant &lt;code&gt;turn&lt;/code&gt;, and make the desired response language explicit. The evidence described here supports multilingual drift as the more consistent explanation; it does not support claiming that Gemini switched to a dedicated Chinese model.&lt;/p&gt;

&lt;p&gt;References: &lt;a href="https://www.reddit.com/r/GoogleGeminiAI/s/HYWKEeHeke" rel="noopener noreferrer"&gt;community case 1&lt;/a&gt; and &lt;a href="https://www.reddit.com/r/GeminiAI/s/z121ef8R3q" rel="noopener noreferrer"&gt;community case 2&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>gemini</category>
      <category>chinese</category>
      <category>turn</category>
      <category>response</category>
    </item>
    <item>
      <title>Exploring Jev: A Hands-On Look at TypeSafe AI’s New Decision Model</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Fri, 18 Sep 2026 07:19:53 +0000</pubDate>
      <link>https://dev.to/aihubmix/exploring-jev-a-hands-on-look-at-typesafe-ais-new-decision-model-ofa</link>
      <guid>https://dev.to/aihubmix/exploring-jev-a-hands-on-look-at-typesafe-ais-new-decision-model-ofa</guid>
      <description>&lt;p&gt;Jev is one of those models that makes more sense once you stop comparing it with chatbots.&lt;/p&gt;

&lt;p&gt;It does not generate prose. It takes some application state, evaluates questions you define, and returns typed answers with probabilities. That makes it less like a writing assistant and more like an AI decision function you can drop into a workflow.&lt;/p&gt;

&lt;p&gt;In this article, we will take a first look at the API, run through the LangChain integration, and explore a few places where this new model could be useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jev in plain English
&lt;/h2&gt;

&lt;p&gt;Jev is a new model from TypeSafe AI and the company’s first “System One Model.” You send it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;code&gt;state&lt;/code&gt;: the context it needs to read.&lt;/li&gt;
&lt;li&gt;A set of &lt;code&gt;questions&lt;/code&gt;: the decisions you want it to make.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It sends back probabilities, choices, and scores that code can use directly. There is no free-form completion to parse.&lt;/p&gt;

&lt;p&gt;A good mental model is an AI-powered &lt;code&gt;if&lt;/code&gt; statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;messy real-world context
    -&amp;gt; Jev understands the context
    -&amp;gt; typed decision + probability
    -&amp;gt; your code chooses the next action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a drop-in replacement for an LLM. It is a different building block for classification, routing, scoring, verification, and guardrails.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three question types
&lt;/h2&gt;

&lt;p&gt;Jev exposes three decision primitives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Noul&lt;/code&gt;: evaluates a yes-or-no statement and returns the probability that it is true.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Choice&lt;/code&gt;: selects from predefined options and returns a probability distribution plus confidence.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Score&lt;/code&gt;: rates ordered levels and returns a continuous score, its distribution, and confidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model evaluates multiple questions in a request in parallel. That is useful when one piece of state needs several independent judgments. For example, a support ticket might need a category, severity score, abuse flag, and human-review flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the API shape is useful
&lt;/h2&gt;

&lt;p&gt;Jev’s functional advantage is not only speed. The interface removes several pieces of glue code that usually sit around a generative model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema-first output:&lt;/strong&gt; developers define the allowed structure in advance. TypeSafe says Jev cannot invent extra fields, return malformed JSON, or swap an expected value for the wrong data type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel decisions:&lt;/strong&gt; several independent questions can share one state and one request instead of becoming a chain of separate generations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Probabilities as control signals:&lt;/strong&gt; an application can use thresholds to execute, escalate to an LLM, or request human review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clear division of labor:&lt;/strong&gt; Jev handles classification, scoring, routing, and risk checks while generative models keep the open-ended reasoning and writing work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a stronger software contract, not a guarantee that every decision is correct. Jev can still select the wrong valid option. The advantage is that your application receives a predictable value and can decide how much trust to place in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the LangChain integration
&lt;/h2&gt;

&lt;p&gt;You need Python, TypeSafe API access, and &lt;code&gt;langchain-typesafe&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;pip &lt;span class="nb"&gt;install &lt;/span&gt;langchain-typesafe
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;TYPESAFE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-api-key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the key in an environment variable or secret manager rather than source control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the first decision
&lt;/h2&gt;

&lt;p&gt;Let us start with the simplest question: does this incident need attention right now?&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;langchain_typesafe&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TypeSafeClassifier&lt;/span&gt;

&lt;span class="n"&gt;classifier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TypeSafeClassifier&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;classifier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;state&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;The deploy failed twice and customers are seeing 500s. &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Can someone look now?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;questions&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;urgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Does this need attention right now?&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="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;urgency&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nouls&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;urgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;urgency&lt;/code&gt; is a probability, not a paragraph. Your application can decide what it means:&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="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;urgency&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;page_on_call_engineer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;urgency&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;send_for_review&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;add_to_normal_queue&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those thresholds are examples, not universal defaults. You should choose them using labeled cases from your own workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Explore several decisions in one request
&lt;/h2&gt;

&lt;p&gt;The more interesting shape is one state with multiple questions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Support ticket state
    |-- Choice: billing, technical, sales, spam
    |-- Score: severity
    |-- Noul: possible abuse?
    `-- Noul: human review required?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Traditional agent code might make several sequential model calls for those judgments. Jev evaluates the questions in parallel. Extra question text still counts toward input, but the design avoids generating a separate written response for every branch.&lt;/p&gt;

&lt;p&gt;This pattern could work well for content checks too: ask whether an answer is relevant, whether it contains sensitive data, whether it follows policy, and whether it needs escalation—all against the same trace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case 1: route work to the right model
&lt;/h2&gt;

&lt;p&gt;One practical use is model routing. A lookup or extraction task may not need the same model as an architecture review. LangChain’s experimental &lt;code&gt;ModelRouterMiddleware&lt;/code&gt; lets Jev choose among models using criteria you define:&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;langchain.agents&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_agent&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_typesafe.experimental.middleware&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;ModelChoice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ModelRouterMiddleware&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;router&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ModelRouterMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;choices&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;fast&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ModelChoice&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;openai:luna&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Direct lookups, extraction, and localized changes.&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;powerful&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ModelChoice&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;openai:sol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Architecture and high-stakes decisions.&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="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Choose the least costly model that can complete the task.&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="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai:gpt-5.6-luna&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;middleware&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The selected model, probabilities, and confidence remain available in agent state. That gives you useful data for checking whether the router actually saves cost without hurting outcomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case 2: check tool calls before they run
&lt;/h2&gt;

&lt;p&gt;Another interesting use is the safety layer around an agent. LangChain’s experimental &lt;code&gt;AutoModeMiddleware&lt;/code&gt; uses Jev to examine proposed tool calls and block actions it classifies as risky:&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;langchain.agents&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_agent&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_typesafe.experimental.middleware&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AutoModeMiddleware&lt;/span&gt;

&lt;span class="n"&gt;guardrail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AutoModeMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tools&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;bash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai:gpt-5.6-luna&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;middleware&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;guardrail&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;I would treat this as an extra checkpoint, not a complete security boundary. A classifier can be wrong. Sensitive tools still need deterministic permissions, sandboxing, scoped credentials, and human approval where appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case 3: build a fast first-pass reviewer
&lt;/h2&gt;

&lt;p&gt;Jev also looks useful as the first layer of a cascade:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;incoming state
    -&amp;gt; Jev makes a fast decision
        -&amp;gt; clear + low-risk: continue automatically
        -&amp;gt; uncertain: verify with a stronger LLM
        -&amp;gt; high-risk: request human review
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible inputs include support tickets, agent traces, invoices, expense reports, search candidates, and generated content. The important part is that the allowed decisions are known in advance.&lt;/p&gt;

&lt;p&gt;This setup does not ask Jev to do everything. It uses Jev for volume, an LLM for difficult reasoning or explanation, and humans for consequential edge cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes the model technically interesting?
&lt;/h2&gt;

&lt;p&gt;TypeSafe says Jev gives up arbitrary string generation and produces all requested outputs in parallel. The company reports 70–500 ms end-to-end latency and input pricing of $0.042 per million tokens, with output not metered.&lt;/p&gt;

&lt;p&gt;In TypeSafe’s four published workflow evaluations, Jev averaged 67.8% at about $0.0004 and 0.4 seconds per sample. GPT-5.6 Terra reached 67.9% in the same harness at $0.0304 and 10.1 seconds. GPT-5.6 Sol reached a higher 74.1% at $0.0836 and 23.3 seconds.&lt;/p&gt;

&lt;p&gt;So the technical story is not “Jev is always more accurate.” It is “Jev may offer a useful accuracy, latency, and cost tradeoff for decision-shaped workloads.”&lt;/p&gt;

&lt;p&gt;TypeSafe also says Jev is trained with Reinforcement Learning for Calibrated Decisions (RLCD), with the goal of making reported probabilities reflect actual correctness. Detailed training methods and standard public calibration results are not yet available, so this is an area worth testing rather than assuming.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small evaluation plan
&lt;/h2&gt;

&lt;p&gt;If you want to explore Jev, start with one reversible decision that already runs at meaningful volume. Run it in shadow mode before letting it take action.&lt;/p&gt;

&lt;p&gt;For each case, record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The input and versioned question schema.&lt;/li&gt;
&lt;li&gt;Jev’s answer, probability, and confidence.&lt;/li&gt;
&lt;li&gt;The current system’s answer.&lt;/li&gt;
&lt;li&gt;The eventual labeled outcome.&lt;/li&gt;
&lt;li&gt;Latency and total cascade cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then compare accuracy, precision and recall by class, calibration, escalation rate, and p50/p95/p99 latency. Include an &lt;code&gt;unknown&lt;/code&gt; or &lt;code&gt;none_of_the_above&lt;/code&gt; option if the choice set may be incomplete.&lt;/p&gt;

&lt;p&gt;One important detail: TypeSafe’s published workflow benchmark uses the average predictions of GPT-6 Astra and Fable 5.1 as reference probabilities, not human-labeled ground truth. TypeSafe also acknowledges possible workflow-author bias and says its largest headline gains are probably at the high end of real-world improvements. Your own labeled data is the test that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Jev does not do
&lt;/h2&gt;

&lt;p&gt;Jev is not designed for conversation, summarization, code generation, or detailed explanations. A typed response can also be semantically wrong even when its schema is perfect.&lt;/p&gt;

&lt;p&gt;Public material does not yet provide the model’s parameter count, detailed architecture, full RLCD recipe, standard calibration curves, or complete production SLA. And for a stable, narrow domain, a conventional small classifier may still be the simpler choice.&lt;/p&gt;

&lt;p&gt;These are not reasons to ignore Jev. They are the questions that make exploring a new model useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Jev introduces a clean separation that is easy to miss when every AI product is built around chat: sometimes software needs language, and sometimes it only needs a decision.&lt;/p&gt;

&lt;p&gt;For developers, the fun part is figuring out where that decision layer belongs. Try it on routing, triage, scoring, or a low-risk guardrail. Keep the first experiment measurable. Let Jev handle the fuzzy judgment, then let code decide what happens next.&lt;/p&gt;

&lt;p&gt;Read TypeSafe AI’s &lt;a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev" rel="noopener noreferrer"&gt;System One and Jev announcement&lt;/a&gt; for the original model claims and caveats, and LangChain’s &lt;a href="https://www.langchain.com/blog/building-a-harness-with-jev" rel="noopener noreferrer"&gt;Jev harness guide&lt;/a&gt; for the integration examples used here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build with Jev on AIHubMix
&lt;/h2&gt;

&lt;p&gt;AIHubMix now supports Jev. Visit &lt;a href="https://aihubmix.com/model/jev-latest" rel="noopener noreferrer"&gt;AIHubMix&lt;/a&gt; to access the model and start testing decision-shaped workloads without adding another standalone model provider to your workflow.&lt;/p&gt;

&lt;p&gt;Begin with a single &lt;code&gt;Noul&lt;/code&gt;, &lt;code&gt;Choice&lt;/code&gt;, or &lt;code&gt;Score&lt;/code&gt; task, capture the returned probabilities, and compare them with your existing classifier or LLM path. Once the results hold up on your own labeled data, you can expand the experiment into routing, triage, scoring, and agent guardrails.&lt;/p&gt;

</description>
      <category>jev</category>
      <category>typesafe</category>
      <category>ai</category>
    </item>
    <item>
      <title>How I Built an AI Product Ad Pipeline with Claude Code and AIHubMix</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Wed, 16 Sep 2026 15:50:18 +0000</pubDate>
      <link>https://dev.to/aihubmix/how-i-built-an-ai-product-ad-pipeline-with-claude-code-and-aihubmix-4b8c</link>
      <guid>https://dev.to/aihubmix/how-i-built-an-ai-product-ad-pipeline-with-claude-code-and-aihubmix-4b8c</guid>
      <description>&lt;p&gt;The goal was straightforward: start with one product image, generate three references of the same character, and create a 20-second, 720p vertical ad.&lt;/p&gt;

&lt;p&gt;The engineering work happens between the model calls: passing character identity from one image to the next, registering a photorealistic virtual person as a usable asset, recovering asynchronous tasks, and ensuring that multiple asset IDs reach the video endpoint as separate arguments.&lt;/p&gt;

&lt;p&gt;This article breaks down a working Python implementation built on AIHubMix. Claude Code helped organize prompts and execute the workflow; the script sent every API request through AIHubMix.&lt;/p&gt;

&lt;p&gt;AIHubMix is useful here for more than sharing one Base URL. It covers most mainstream models through one API service, so the image stage can use Seedream, the video stage can switch to Seedance, and later versions can select another model without rebuilding authentication and request entry points for every supplier.&lt;/p&gt;

&lt;p&gt;AIHubMix connects to multiple suppliers and automatically selects an available low-latency route, reducing the effect of a single supplier's instability. For asynchronous image and video jobs, one entry point is easier to maintain and fits a multi-stage workflow orchestrated with Claude Code. Actual model availability, routes, and latency still depend on the platform state at request time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The code, model IDs, and schema details come from a project snapshot dated September 16, 2026. Check the current API before reusing them. No online generation API was called while preparing this publication package.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h2&gt;
  
  
  Download the Code and Run the Shortest Path
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/uc?export=download&amp;amp;id=1nXcj26Fq3daHeTd0SynS7_QEXgH8z4u_" rel="noopener noreferrer"&gt;Download the Complete Starter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You need Python 3, your own AIHubMix API key, access and quota for the required models, and public URLs for the three reference images. The script uses only the Python standard library; no SDK installation is required.&lt;/p&gt;

&lt;p&gt;After extracting the package, enter &lt;code&gt;seedance-starter&lt;/code&gt; and run:&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="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit &lt;code&gt;.env&lt;/code&gt; and add your key. Upload &lt;code&gt;assets/frame-01.jpg&lt;/code&gt;, &lt;code&gt;assets/frame-02.jpg&lt;/code&gt;, and &lt;code&gt;assets/frame-03.jpg&lt;/code&gt; to your own public image hosting, then replace these three URLs:&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;REF_A&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'https://your-host.example/frame-01.jpg'&lt;/span&gt;
&lt;span class="nv"&gt;REF_B&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'https://your-host.example/frame-02.jpg'&lt;/span&gt;
&lt;span class="nv"&gt;REF_C&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'https://your-host.example/frame-03.jpg'&lt;/span&gt;
python3 flow.py check &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_A&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_B&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_C&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
python3 flow.py assets &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_A&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_B&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REF_C&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the assets become active, read their saved IDs and generate the video:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 - &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;PYCODE&lt;/span&gt;&lt;span class="sh"&gt;'
import json
import subprocess
import sys
from pathlib import Path

state = json.loads(Path("state.json").read_text())
refs = ["asset://" + asset_id for asset_id in state["asset_ids"]]
subprocess.run([sys.executable, "flow.py", "video", *refs], check=True)
&lt;/span&gt;&lt;span class="no"&gt;PYCODE
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The completed result is saved to &lt;code&gt;out/video.mp4&lt;/code&gt;. This shortest path reuses the included images and covers asset registration plus video generation. To regenerate the images for another product, follow the dependency chain below.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Model the Workflow as Explicit State
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Product image and prompts
  → three character reference images
  → publicly accessible image URLs
  → active virtual-portrait assets in one group
  → asset:// references
  → video task ID
  → completed
  → local MP4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script exposes one command for each state transition:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;stills&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Generate and download the reference images in order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;check URL...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verify HTTP 200 and an image Content-Type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;assets URL...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create or reuse an asset group, register images, and wait for activation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;video asset://...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create a video task, poll it, and download the result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status [ID]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resume polling or download an existing task&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tasks&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List recent tasks when a create response was lost&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Public image hosting is a manual step; the script does not push files to GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Image Generation Is a Dependency Chain
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;prompts.json&lt;/code&gt; defines these reference relationships:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A: prompt-a.txt → frame-01.jpg
B: product image + frame-01.jpg + prompt-b.txt → frame-02.jpg
C: product image + frame-02.jpg + prompt-c.txt → frame-03.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A establishes the person, wardrobe, setting, and lighting. B introduces the product. C introduces its use action. B and C both reference the original product image to constrain packaging.&lt;/p&gt;

&lt;p&gt;To switch products, replace &lt;code&gt;assets/product.png&lt;/code&gt;, update the runtime prompts, back up and move the three old reference images, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 flow.py stills
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Existing image files are skipped. If you edit a prompt and rerun without moving its output, nothing may happen. After changing A, decide whether B and C also need regeneration.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;character-lock.txt&lt;/code&gt; is a writing reference; the script never reads it. Editing that file alone does not change an API request.&lt;/p&gt;

&lt;p&gt;The script skips existing files. If you change a prompt, back up and move the corresponding output before rerunning. Changing A may also require regenerating B and C.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkgkm8xauvu64mu3dwpo2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkgkm8xauvu64mu3dwpo2.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The three images establish character identity, product presentation, and the use action.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. One API Does Not Mean One Request Schema
&lt;/h2&gt;

&lt;p&gt;The project uses these full model IDs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IMAGE_MODEL = doubao-seedream-5-0-pro-260628
VIDEO_MODEL = doubao-seedance-2-5-260628
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the bundled schema snapshot, image generation uses &lt;code&gt;size&lt;/code&gt;, while video generation uses &lt;code&gt;aspect_ratio&lt;/code&gt;. They can coexist in the local configuration, but the script must build two different request bodies.&lt;/p&gt;

&lt;p&gt;A unified API solves model access and switching; it does not make model-specific parameters interchangeable. This project keeps shared authentication and task handling in &lt;code&gt;flow.py&lt;/code&gt;, then assembles Seedream and Seedance requests separately.&lt;/p&gt;

&lt;p&gt;Here is the video request structure. Replace &lt;code&gt;ACTIVE_ASSET_ID&lt;/code&gt; with an asset ID registered and activated in your account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"doubao-seedance-2-5-260628"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"prompt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"the complete contents of prompts/prompt-video.txt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"resolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"720p"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"aspect_ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9:16"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"generate_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"input_references"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"image_url"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"asset://ACTIVE_ASSET_ID"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request is sent to &lt;code&gt;POST /ai/v1/videos&lt;/code&gt;. The real script creates one &lt;code&gt;input_references&lt;/code&gt; item per asset.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;preflight()&lt;/code&gt; checks the cached schema for unknown top-level fields and catches accidental parameter mixing locally. It is not a complete JSON Schema validator and does not validate every type, enum, or range.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Register a Photorealistic Virtual Person Before Referencing It
&lt;/h2&gt;

&lt;p&gt;Passing the photorealistic character references directly as image URLs produced this error in the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;doubao_real_person_required
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because the character in this example was AI-generated, the correct classification was &lt;code&gt;virtual_portrait&lt;/code&gt;. The script then performs these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;POST /ai/v1/asset-groups&lt;/code&gt; creates a virtual-portrait group.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /ai/v1/asset-groups/{group_id}/assets&lt;/code&gt; registers each public image URL.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /ai/v1/assets/{asset_id}&lt;/code&gt; polls until the asset becomes &lt;code&gt;active&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The video request uses an &lt;code&gt;asset://&lt;/code&gt; reference.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All references in one video request should belong to the same group. A photograph of a real person must follow the identity-verification path and must not be classified as a virtual person.&lt;/p&gt;

&lt;p&gt;The URL must return the actual image. A GitHub &lt;code&gt;/blob/&lt;/code&gt; page can return HTTP 200 while its Content-Type is HTML, so the script checks both status and media type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb8fkiaimgysbp7mbx7h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb8fkiaimgysbp7mbx7h2.png" alt=" " width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The references were generated and all three assets were active; the video task was still running when this screenshot was captured.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Do Not Pass Three Asset IDs as One String
&lt;/h2&gt;

&lt;p&gt;The source project encountered &lt;code&gt;asset_invalid&lt;/code&gt; in zsh because multiple references stored in a plain string reached the program as one argument.&lt;/p&gt;

&lt;p&gt;The quick-start command calls the script with a Python argument list:&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;subprocess&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;executable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;flow.py&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;video&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each reference becomes a separate argument without relying on shell word splitting.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Recover an Async Task Instead of Creating Another One
&lt;/h2&gt;

&lt;p&gt;Video generation is asynchronous. An HTTP 200 from the create endpoint does not mean that the video is complete.&lt;/p&gt;

&lt;p&gt;The script saves the returned &lt;code&gt;video_id&lt;/code&gt; to &lt;code&gt;state.json&lt;/code&gt;, polls the task's &lt;code&gt;status&lt;/code&gt;, and downloads only after it reaches &lt;code&gt;completed&lt;/code&gt;. Resume after a local timeout with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 flow.py status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the create response was lost, list recent tasks first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 flow.py tasks
python3 flow.py status VIDEO_TASK_ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;video()&lt;/code&gt; never automatically retries the create request, because the server may already have created the task. Read-only status requests can be retried; creation should be handled differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Give the Prompt Testable Constraints
&lt;/h2&gt;

&lt;p&gt;Once the API works, the output still needs to satisfy the ad brief.&lt;/p&gt;

&lt;p&gt;The final video prompt divides one continuous take into four actions: present, spray, react, and present again. The camera may push in only to a mid-close shot. The product must stay visible, and the label should remain legible during the first and last three seconds.&lt;/p&gt;

&lt;p&gt;The full text is in &lt;code&gt;prompts/prompt-video.txt&lt;/code&gt;. Resolution and duration belong in configuration; character action and camera limits belong in the prompt. Both must be verified in the generated result.&lt;/p&gt;



&lt;h2&gt;
  
  
  Reusing the Structure
&lt;/h2&gt;

&lt;p&gt;The starter preserves the source implementation. Its documentation calls out a stale code comment, existing-output skips, output-file replacement, and asset-group reuse.&lt;/p&gt;

&lt;p&gt;Offline checks can verify local configuration, dependencies, and request assembly. They cannot prove account permissions, current endpoint availability, routing behavior, or output quality. Run the shortest path with the included references before replacing the product and character so that failures are easier to isolate.&lt;/p&gt;

&lt;p&gt;To switch image or video models later, select the target model in AIHubMix, read its current schema, and update the model ID, parameters, and result handling. A unified entry point lowers the switching cost, but it does not remove differences in model capability or request fields.&lt;/p&gt;

&lt;p&gt;See the &lt;a href="//downloads/seedance-starter.zip"&gt;starter package&lt;/a&gt; for the complete workflow. &lt;code&gt;README.md&lt;/code&gt; contains the runbook, while &lt;code&gt;docs/PROMPTS.md&lt;/code&gt; and &lt;code&gt;docs/TROUBLESHOOTING.md&lt;/code&gt; cover prompt adaptation and failure modes.&lt;/p&gt;

</description>
      <category>seedance</category>
      <category>seedream</category>
      <category>claude</category>
      <category>aihubmix</category>
    </item>
    <item>
      <title>Amp Reopens BYOK After a Year: Connecting and Configuring AIHubMix</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Tue, 15 Sep 2026 07:25:14 +0000</pubDate>
      <link>https://dev.to/aihubmix/amp-reopens-byok-after-a-year-connecting-and-configuring-aihubmix-4jf</link>
      <guid>https://dev.to/aihubmix/amp-reopens-byok-after-a-year-connecting-and-configuring-aihubmix-4jf</guid>
      <description>&lt;p&gt;&lt;a href="https://ampcode.com/" rel="noopener noreferrer"&gt;Amp&lt;/a&gt; has reopened BYOK (Bring Your Own Key), and &lt;a href="https://aihubmix.com/" rel="noopener noreferrer"&gt;AIHubMix&lt;/a&gt; now supports it. This guide uses Anthropic's Claude models as the example and walks through pointing Amp at the AIHubMix API via &lt;strong&gt;Custom URL&lt;/strong&gt; and &lt;strong&gt;Model Routing&lt;/strong&gt; — covering the API key, model name mapping, and project setup.&lt;/p&gt;

&lt;p&gt;If you're searching for "Amp BYOK setup", "connect Amp to AIHubMix", "AIHubMix API key", "Amp Custom URL", or "Amp Model Routing", the steps below cover it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Amp good for?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-model workflows&lt;/strong&gt;: assign different models to different modes and agents — Claude, GPT, or a fast model for lightweight work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whole-project context&lt;/strong&gt;: Amp reads across the codebase, edits files, runs commands, and executes tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BYOK and custom routing&lt;/strong&gt;: pick your own models and providers through Model Routing, Custom URL, and third-party API services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web and CLI together&lt;/strong&gt;: configure models in the browser, then keep working from the terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built for teams&lt;/strong&gt;: share any thread and work through it alongside your teammates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-synced threads&lt;/strong&gt;: every thread syncs to the cloud automatically, so your team always picks up from the same state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rest of this guide uses Anthropic's Claude models to show how to connect AIHubMix to Amp.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why route Amp through AIHubMix?&lt;/strong&gt; One key and one Base URL reach 400+ models across providers, the endpoint is Anthropic Messages API–compatible (so Amp talks to it natively), and per-key model name mapping plus error fallbacks let you adapt to whatever naming a client expects. &lt;a href="https://aihubmix.com/" rel="noopener noreferrer"&gt;Create an account →&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Part 1 — Connect the API
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Open Personal Settings
&lt;/h3&gt;

&lt;p&gt;From the Amp home screen, click &lt;strong&gt;Personal Settings&lt;/strong&gt; in the bottom-left corner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F63ojyj2pnsm6jlss4mo9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F63ojyj2pnsm6jlss4mo9.png" alt=" " width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Add a custom model route
&lt;/h3&gt;

&lt;p&gt;Find &lt;strong&gt;Model Routing&lt;/strong&gt; in the left sidebar, click &lt;strong&gt;Add&lt;/strong&gt; on the right, and choose &lt;strong&gt;Custom URL&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8lgagszbsqhahdbd3iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh8lgagszbsqhahdbd3iw.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create an API key and set up model name mapping
&lt;/h3&gt;

&lt;p&gt;Head to the &lt;a href="https://aihubmix.com/" rel="noopener noreferrer"&gt;AIHubMix console&lt;/a&gt; and create an API key, then configure a model name mapping on it.&lt;/p&gt;

&lt;p&gt;Amp expects model names in &lt;code&gt;provider/model&lt;/code&gt; form — for example &lt;code&gt;anthropic/claude-fable-5-1&lt;/code&gt;. AIHubMix model IDs carry no &lt;code&gt;provider/&lt;/code&gt; prefix, so add a mapping that rewrites the name Amp sends to the model ID AIHubMix serves:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Alias (what Amp sends)&lt;/th&gt;
&lt;th&gt;Target (AIHubMix model ID)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;anthropic/claude-fable-5-1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;claude-fable-5-1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Requests using the alias are rewritten to the target model ID. Each key supports up to 5 mappings, and you can optionally add fallback models that are retried, in order, when a request errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbwbc0mpe0m69zjjd5mqd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbwbc0mpe0m69zjjd5mqd.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Fill in the connection details
&lt;/h3&gt;

&lt;p&gt;Back on Amp's &lt;strong&gt;Custom URL&lt;/strong&gt; screen, fill in the fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API Key&lt;/strong&gt;: the key you just created in AIHubMix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Format&lt;/strong&gt;: select &lt;strong&gt;Compatible with the Anthropic Messages API&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Base URL&lt;/strong&gt;: &lt;code&gt;https://aihubmix.com&lt;/code&gt; — Amp confirms below the field that requests go to &lt;code&gt;https://aihubmix.com/v1/messages&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Models&lt;/strong&gt;: list the aliases you mapped, one per line (e.g. &lt;code&gt;anthropic/claude-fable-5-1&lt;/code&gt;). Amp resolves each one and shows its display name underneath.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leave &lt;strong&gt;Activate after creation&lt;/strong&gt; checked so new requests start routing through the provider immediately, then click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2p897j3af34azfzzpemu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2p897j3af34azfzzpemu.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Verify the connection
&lt;/h3&gt;

&lt;p&gt;Once saved, the &lt;strong&gt;Model Routing&lt;/strong&gt; page lists your new &lt;strong&gt;Custom URL&lt;/strong&gt;. Click &lt;strong&gt;Check Access&lt;/strong&gt; to test the connection.&lt;/p&gt;

&lt;p&gt;A working key returns &lt;code&gt;Valid Key&lt;/code&gt; along with the &lt;code&gt;GET https://aihubmix.com/v1/models&lt;/code&gt; probe, an &lt;code&gt;HTTP 200&lt;/code&gt; response, and a count of visible models. The model list below then shows everything this Custom URL can reach.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qq9qybh25f00rnf1htv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9qq9qybh25f00rnf1htv.png" alt=" " width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbograv4nm6fsgusdko4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbograv4nm6fsgusdko4f.png" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 2 — Create a project and a thread
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 6: Create a project
&lt;/h3&gt;

&lt;p&gt;Click the projects entry in the bottom-left corner, then the new-project button in the top right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv375n72qcwe7o511o05v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv375n72qcwe7o511o05v.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose &lt;strong&gt;Start from scratch&lt;/strong&gt;, enter a project name, and finish creating the project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs11qvj2lag00t4xpgd0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs11qvj2lag00t4xpgd0r.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: Create a thread
&lt;/h3&gt;

&lt;p&gt;Inside the project, click &lt;strong&gt;New Thread&lt;/strong&gt; to start a task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feeowhyc1zsvhog5bzi7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feeowhyc1zsvhog5bzi7a.png" alt=" " width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 3 — Assign models and start working
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 8: Assign a model to each role
&lt;/h3&gt;

&lt;p&gt;Go back to &lt;strong&gt;Personal Settings&lt;/strong&gt; and open &lt;strong&gt;Mode Dial&lt;/strong&gt;. Each mode picks its models automatically; here you can pin a specific model and reasoning effort for a mode's &lt;strong&gt;Main Agent&lt;/strong&gt;, its &lt;strong&gt;Oracle&lt;/strong&gt;, and its &lt;strong&gt;Subagents&lt;/strong&gt;. Anything left on &lt;strong&gt;Auto&lt;/strong&gt; keeps following Amp's own routing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr98xsqrvdjgk7qotn04t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr98xsqrvdjgk7qotn04t.png" alt=" " width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 9: Pick a mode and start the conversation
&lt;/h3&gt;

&lt;p&gt;Click &lt;strong&gt;New Thread&lt;/strong&gt;, choose the mode and model you want, and start chatting or hand Amp a development task.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp8772wh6bxqu3lxtb5r4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp8772wh6bxqu3lxtb5r4.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;That's the full setup. With one AIHubMix key, Amp can reach Claude, GPT, and every other model on the platform — and you can swap the model behind any mode without touching the rest of your configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://aihubmix.com/" rel="noopener noreferrer"&gt;Get your AIHubMix API key →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AIHubMix — &lt;a href="https://aihubmix.com/" rel="noopener noreferrer"&gt;https://aihubmix.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Amp — &lt;a href="https://ampcode.com/" rel="noopener noreferrer"&gt;https://ampcode.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ampcode</category>
      <category>amp</category>
      <category>aihubmix</category>
    </item>
    <item>
      <title>GLM-5.3-Flash API Pricing: AIHubMix vs OpenRouter, Including the 5.5% Fee</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Tue, 01 Sep 2026 12:17:26 +0000</pubDate>
      <link>https://dev.to/aihubmix/glm-53-flash-api-pricing-aihubmix-vs-openrouter-including-the-55-fee-b3h</link>
      <guid>https://dev.to/aihubmix/glm-53-flash-api-pricing-aihubmix-vs-openrouter-including-the-55-fee-b3h</guid>
      <description>&lt;p&gt;GLM-5.3-Flash targets coding agents, long-context reasoning, and extended software-engineering workflows. Those workloads often send a large amount of repeated context, so a useful price comparison needs to include both prompt caching and platform-level fees.&lt;/p&gt;

&lt;p&gt;This post compares the public rates available on September 1, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  Base API rates
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Input / 1M&lt;/th&gt;
&lt;th&gt;Output / 1M&lt;/th&gt;
&lt;th&gt;Cache read / 1M&lt;/th&gt;
&lt;th&gt;Platform fee&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.z.ai/guides/overview/pricing" rel="noopener noreferrer"&gt;Z.ai API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$0.075&lt;/td&gt;
&lt;td&gt;$0.250&lt;/td&gt;
&lt;td&gt;$0.015&lt;/td&gt;
&lt;td&gt;None listed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://openrouter.ai/z-ai/glm-5.3-flash" rel="noopener noreferrer"&gt;OpenRouter, Z.ai provider&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$0.075&lt;/td&gt;
&lt;td&gt;$0.250&lt;/td&gt;
&lt;td&gt;$0.015&lt;/td&gt;
&lt;td&gt;5.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://aihubmix.com/model/glm-5.3-flash" rel="noopener noreferrer"&gt;AIHubMix&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.056&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.197&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.014&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None listed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;AIHubMix, OpenRouter, and Z.ai are all running a limited-time 50% promotion through &lt;strong&gt;September 9, 2026 at 16:00 UTC&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applying OpenRouter's platform fee
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://openrouter.ai/pricing" rel="noopener noreferrer"&gt;OpenRouter lists a 5.5% platform fee&lt;/a&gt; for pay-as-you-go accounts. Its model catalog still shows the provider's unmarked-up inference rate, so the effective cost of fully used credits can be modeled as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;effective_cost = model_cost * 1.055
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For GLM-5.3-Flash, that produces effective rates of approximately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:     $0.075 * 1.055 = $0.0791 / 1M
output:    $0.250 * 1.055 = $0.2638 / 1M
cache read:$0.015 * 1.055 = $0.0158 / 1M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding prompt-cache ratios
&lt;/h2&gt;

&lt;p&gt;Z.ai automatically identifies reusable prompt prefixes. A cache hit is part of the total input-token count, but is charged at the lower cache-read rate instead of the normal input rate.&lt;/p&gt;

&lt;p&gt;For a workload with &lt;code&gt;I&lt;/code&gt; total input tokens, cache ratio &lt;code&gt;r&lt;/code&gt;, and &lt;code&gt;O&lt;/code&gt; output tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;standard_input = I * (1 - r)
cached_input   = I * r

cost = standard_input * input_rate
     + cached_input * cache_read_rate
     + O * output_rate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following examples use one million total input tokens and one million output tokens. Both platforms are assigned the same cache ratio to isolate the rate difference.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cache ratio&lt;/th&gt;
&lt;th&gt;AIHubMix&lt;/th&gt;
&lt;th&gt;OpenRouter before fee&lt;/th&gt;
&lt;th&gt;OpenRouter after fee&lt;/th&gt;
&lt;th&gt;AIHubMix savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;$0.253&lt;/td&gt;
&lt;td&gt;$0.325&lt;/td&gt;
&lt;td&gt;$0.343&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;26.2%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;$0.232&lt;/td&gt;
&lt;td&gt;$0.295&lt;/td&gt;
&lt;td&gt;$0.311&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;25.5%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;$0.219&lt;/td&gt;
&lt;td&gt;$0.277&lt;/td&gt;
&lt;td&gt;$0.292&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;24.9%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At an 80% cache ratio, for example, the one million input tokens consist of 200,000 standard input tokens and 800,000 cached tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce the calculation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;platforms&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;aihubmix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.056&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.197&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.014&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fee&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;openrouter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.075&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.015&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fee&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.055&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fee&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;cacheRatio&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;modelCost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;cacheRatio&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;cacheRatio&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;cache&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;modelCost&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;fee&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;aihubmix&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;platforms&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;aihubmix&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;openrouter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;platforms&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;openrouter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt;&lt;span class="p"&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;Prices in the code are dollars per million tokens, and the example fixes both total input and total output at one million tokens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Caching reduces both bills. Because the cache-read rates are close, AIHubMix's relative price advantage narrows slightly as the cache ratio increases. After including OpenRouter's pay-as-you-go fee, AIHubMix remains approximately &lt;strong&gt;24.9% to 26.2% less expensive&lt;/strong&gt; across the scenarios above.&lt;/p&gt;

&lt;p&gt;OpenRouter may still be the right choice when its unified provider ecosystem is the deciding feature. Z.ai remains the direct vendor route. For cost-sensitive GLM-5.3-Flash coding agents and batch jobs, AIHubMix currently has the lowest effective cost in this comparison.&lt;/p&gt;

&lt;p&gt;Pricing can change, so verify the linked model pages before deploying a long-running workload.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>api</category>
      <category>llm</category>
    </item>
    <item>
      <title>GPT-5.6 Sol at 50% Off: AIHubMix vs. OpenRouter Pricing, Fees, and Setup</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Wed, 19 Aug 2026 11:43:16 +0000</pubDate>
      <link>https://dev.to/aihubmix/gpt-56-sol-at-50-off-aihubmix-vs-openrouter-pricing-fees-and-setup-gj4</link>
      <guid>https://dev.to/aihubmix/gpt-56-sol-at-50-off-aihubmix-vs-openrouter-pricing-fees-and-setup-gj4</guid>
      <description>&lt;p&gt;OpenAI's GPT-5.6 Sol is currently available at a limited-time 50% discount for short-context API requests. AIHubMix and OpenRouter show the same discounted token rates, but the final pay-as-you-go cost is not identical.&lt;/p&gt;

&lt;p&gt;The difference comes from the platform fee.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discounted model:&lt;/strong&gt; GPT-5.6 Sol&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AIHubMix model ID:&lt;/strong&gt; &lt;code&gt;gpt-5.6-sol-disc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-context rate:&lt;/strong&gt; $2.50/M input, $0.25/M cached input, $15/M output&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AIHubMix platform fee:&lt;/strong&gt; No separate platform fee added to the displayed model price&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenRouter pay-as-you-go fee:&lt;/strong&gt; 5.5% according to its public pricing page&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-context threshold:&lt;/strong&gt; Inputs above 272K tokens use a different pricing tier&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All prices in this article were checked on August 19, 2026. Pricing and availability can change, so verify the linked pages before committing to a large workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  The advertised token rates are the same
&lt;/h2&gt;

&lt;p&gt;For requests with up to 272K input tokens, both platforms currently display:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Token type&lt;/th&gt;
&lt;th&gt;Price per million tokens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Input&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cached input&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These rates are 50% below OpenAI's standard short-context rates of $5/M input and $30/M output.&lt;/p&gt;

&lt;p&gt;At the model-rate level, AIHubMix and OpenRouter look identical. The difference appears when you fund a standard pay-as-you-go account.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the 5.5% fee means in practice
&lt;/h2&gt;

&lt;p&gt;Consider a workload that consumes one million input tokens and one million output tokens.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input:  1 x $2.50 = $2.50
Output: 1 x $15.00 = $15.00
Model usage:         $17.50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On AIHubMix, the displayed cost for that usage is &lt;strong&gt;$17.50&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On OpenRouter, funding $17.50 of pay-as-you-go usage costs approximately &lt;strong&gt;$18.46 before tax&lt;/strong&gt; after the published 5.5% platform fee.&lt;/p&gt;

&lt;p&gt;The gap becomes more visible at production volume. Suppose an agent workflow uses 10 million input tokens and 2 million output tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input:  10 x $2.50 = $25.00
Output:  2 x $15.00 = $30.00
Model usage:          $55.00
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Approximate final cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AIHubMix&lt;/td&gt;
&lt;td&gt;$55.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenRouter pay-as-you-go&lt;/td&gt;
&lt;td&gt;$58.03 before tax&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That $3.03 difference comes from the platform fee, not from a different model token rate.&lt;/p&gt;

&lt;p&gt;For coding agents, repository analysis, deep research, evaluation suites, and other long-running workflows, a small percentage compounds quickly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the discounted AIHubMix model ID
&lt;/h2&gt;

&lt;p&gt;The promotion is exposed through a separate AIHubMix model ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gpt-5.6-sol-disc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The regular &lt;code&gt;gpt-5.6-sol&lt;/code&gt; route remains available at the standard price. Your application must explicitly select the discounted model ID to receive the promotion.&lt;/p&gt;

&lt;p&gt;AIHubMix provides an OpenAI-compatible endpoint, so an existing OpenAI SDK integration only needs a different base URL, API key, and model name:&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;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&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="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AIHUBMIX_API_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://aihubmix.com/v1&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="n"&gt;response&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;gpt-5.6-sol-disc&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="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;Review this implementation and identify reliability risks.&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="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The discounted route supports OpenAI-compatible Chat Completions and Responses APIs, including streaming.&lt;/p&gt;

&lt;p&gt;Explore the model page: &lt;a href="https://aihubmix.com/model/gpt-5.6-sol-disc" rel="noopener noreferrer"&gt;GPT-5.6 Sol Disc on AIHubMix&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Long context has a different tier
&lt;/h2&gt;

&lt;p&gt;GPT-5.6 Sol supports a context window of approximately 1.05 million tokens and a maximum output of 128K tokens. Requests with more than 272K input tokens use the long-context tier.&lt;/p&gt;

&lt;p&gt;Current AIHubMix discount-route pricing:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input size&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cached 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;Up to 272K tokens&lt;/td&gt;
&lt;td&gt;$2.50/M&lt;/td&gt;
&lt;td&gt;$0.25/M&lt;/td&gt;
&lt;td&gt;$15.00/M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;More than 272K tokens&lt;/td&gt;
&lt;td&gt;$5.00/M&lt;/td&gt;
&lt;td&gt;$0.50/M&lt;/td&gt;
&lt;td&gt;$22.50/M&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The long-context tier is also 50% below OpenAI's corresponding standard rates of $10/M input and $45/M output.&lt;/p&gt;

&lt;p&gt;A million-token window is useful for large repositories, document collections, research material, and long agent histories. It is not a reason to stop managing context. Removing irrelevant content and reusing stable prompt prefixes still improves both cost and latency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Price is not the only routing decision
&lt;/h2&gt;

&lt;p&gt;For a standard pay-as-you-go user focused on final cost, the current public terms favor AIHubMix: the token discount is the same, while the fee structure is different.&lt;/p&gt;

&lt;p&gt;Production teams should still consider operational requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AIHubMix lists OpenAI and Azure providers for this model and can retry another provider when a request fails or becomes too slow.&lt;/li&gt;
&lt;li&gt;OpenRouter may be convenient for teams already using its routing stack. Enterprise fee terms may differ.&lt;/li&gt;
&lt;li&gt;Direct OpenAI access may be preferable when a company needs a direct commercial relationship or specific account controls.&lt;/li&gt;
&lt;li&gt;Reliability, routing behavior, support, account terms, and migration cost can matter more than a small price difference for some workloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where the discount makes the most sense
&lt;/h2&gt;

&lt;p&gt;GPT-5.6 Sol is the flagship model in the GPT-5.6 family. It is designed for demanding work such as advanced coding, complex reasoning, long-horizon agents, science, cybersecurity, and professional knowledge tasks.&lt;/p&gt;

&lt;p&gt;The discount is especially useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repository-level code review&lt;/li&gt;
&lt;li&gt;Command-line and coding agents&lt;/li&gt;
&lt;li&gt;Deep research and multi-step synthesis&lt;/li&gt;
&lt;li&gt;Large-document analysis&lt;/li&gt;
&lt;li&gt;Automated evaluations that require a frontier model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For extraction, classification, support, or high-volume routing, a smaller model may still deliver a lower total cost. A 50% discount makes Sol more accessible, but it does not make Sol the right model for every request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;AIHubMix and OpenRouter currently advertise the same discounted GPT-5.6 Sol token rates. The final pay-as-you-go bill differs because OpenRouter publishes a 5.5% platform fee, while AIHubMix does not add a separate platform fee to its displayed model price.&lt;/p&gt;

&lt;p&gt;For AIHubMix users, the practical step is simple: call &lt;code&gt;gpt-5.6-sol-disc&lt;/code&gt; to use the limited-time discount.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aihubmix.com/blog/gpt-5-6-sol-api-pricing-50-percent-off-aihubmix-openrouter" rel="noopener noreferrer"&gt;Read the original pricing analysis on the AIHubMix blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This comparison is based on public pricing information. Prices, fees, and availability may change.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>openai</category>
      <category>llm</category>
      <category>api</category>
      <category>ai</category>
    </item>
    <item>
      <title>GLM-5.3 API Guide: Always-On Thinking, 3 Effort Levels, and the Support Matrix</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Sat, 15 Aug 2026 07:25:28 +0000</pubDate>
      <link>https://dev.to/aihubmix/glm-53-api-guide-always-on-thinking-3-effort-levels-and-the-support-matrix-1d8e</link>
      <guid>https://dev.to/aihubmix/glm-53-api-guide-always-on-thinking-3-effort-levels-and-the-support-matrix-1d8e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr60lwtyurrd969imnk8k.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr60lwtyurrd969imnk8k.webp" alt="GLM-5.3 Hands-on Guide" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GLM-5.3 is Z.ai's August 2026 flagship model for coding and long-horizon agentic work. It uses the same base model as GLM-5.2; the gains come from post-training.&lt;/p&gt;

&lt;p&gt;On AIHubMix, the limited-time preview model ID is &lt;code&gt;coding-glm-5.3&lt;/code&gt;. It is available through OpenAI-compatible Chat Completions, OpenAI Responses, and Claude-compatible Messages.&lt;/p&gt;

&lt;p&gt;The important migration change is simple but consequential: &lt;strong&gt;thinking is always on&lt;/strong&gt;. You can no longer disable it. Instead, you select one of three &lt;code&gt;reasoning_effort&lt;/code&gt; levels: &lt;code&gt;low&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, or &lt;code&gt;max&lt;/code&gt; (the default).&lt;/p&gt;

&lt;p&gt;The findings below come from live AIHubMix calls made on August 14, 2026. The &lt;a href="https://aihubmix.com/blog/glm-5-3-hands-on-guide-always-on-thinking-three-effort-levels-and-the-api-support-matrix" rel="noopener noreferrer"&gt;full hands-on guide&lt;/a&gt; includes every request, observed response, and the complete verification notes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specs and migration changes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;GLM-5.3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;1,048,576 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum output&lt;/td&gt;
&lt;td&gt;131,072 tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking&lt;/td&gt;
&lt;td&gt;Always on&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reasoning effort&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;low&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, &lt;code&gt;max&lt;/code&gt;; default &lt;code&gt;max&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AIHubMix model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;coding-glm-5.3&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The maximum output value is enforced. Sending &lt;code&gt;max_tokens=999999&lt;/code&gt; returned HTTP 400 with the valid range &lt;code&gt;[1,131072]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Compared with GLM-5.2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;thinking.type&lt;/code&gt; supports &lt;code&gt;enabled&lt;/code&gt; only. The old &lt;code&gt;disabled&lt;/code&gt; behavior is gone.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reasoning_effort&lt;/code&gt; is now a three-level control instead of the previous compatibility mapping.&lt;/li&gt;
&lt;li&gt;Z.ai recommends &lt;code&gt;max&lt;/code&gt; for coding tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In our AIHubMix test, sending &lt;code&gt;thinking: {"type": "disabled"}&lt;/code&gt; still returned 200, but thinking continued and &lt;code&gt;reasoning_content&lt;/code&gt; was present. Treat it as converted behavior, not a successful off switch. To reduce reasoning tokens, use &lt;code&gt;reasoning_effort="low"&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Thinking output across the three APIs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Chat Completions
&lt;/h3&gt;

&lt;p&gt;Thinking text is returned in &lt;code&gt;reasoning_content&lt;/code&gt;; in streaming responses it arrives as &lt;code&gt;delta.reasoning_content&lt;/code&gt;.&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;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://aihubmix.com/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;&amp;lt;AIHUBMIX_API_KEY&amp;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="n"&gt;completion&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;coding-glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;reasoning_effort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# low / high / max
&lt;/span&gt;    &lt;span class="n"&gt;extra_body&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;thinking&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;enabled&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;Compute the square root of (17*23-19*11), rounded down. Digits only.&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="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;reasoning_content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 13
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the same arithmetic question, usage reported 27 reasoning tokens with &lt;code&gt;low&lt;/code&gt; and 39 with &lt;code&gt;max&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Responses
&lt;/h3&gt;

&lt;p&gt;Responses returns a &lt;code&gt;reasoning&lt;/code&gt; output item. The visible reasoning summary is a &lt;code&gt;summary_text&lt;/code&gt; entry inside its &lt;code&gt;summary&lt;/code&gt; array.&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;response&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;responses&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;coding-glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is the capital of France? City name only.&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;# Observed item types: ["reasoning", "message"]
# The reasoning item contains:
# {"type": "reasoning", "summary": [{"type": "summary_text", ...}]}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No opt-in is required. The default request, with no &lt;code&gt;reasoning&lt;/code&gt; parameter, already returned the reasoning item and 80 reasoning tokens in this test.&lt;/p&gt;

&lt;h3&gt;
  
  
  Messages
&lt;/h3&gt;

&lt;p&gt;The Claude-compatible Messages API returns native &lt;code&gt;thinking&lt;/code&gt; content blocks before the text block.&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;anthropic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Anthropic&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;Anthropic&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;&amp;lt;AIHUBMIX_API_KEY&amp;gt;&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://aihubmix.com&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="n"&gt;response&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;messages&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;coding-glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4096&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;What is the capital of France?&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;# Observed content block types: ["thinking", "text"]
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Tool calls and parallel execution
&lt;/h2&gt;

&lt;p&gt;Function calling worked on all three APIs. The Responses API also produced two parallel calls in one turn when asked for weather in two cities.&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;response&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;responses&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;coding-glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Check today&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s weather in Shanghai and Beijing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;parallel_tool_calls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&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;type&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;function&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;name&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;get_weather&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;description&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;Get weather for a city&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;parameters&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;object&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;properties&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;string&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;required&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Observed: two function_call output items in one turn
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two practical details matter:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The upstream accepts up to 128 function definitions and documents &lt;code&gt;tool_choice: auto&lt;/code&gt; as the native mode.&lt;/li&gt;
&lt;li&gt;Chat Completions correctly honors &lt;code&gt;tool_choice: "none"&lt;/code&gt;. On Messages, &lt;code&gt;tool_choice: {"type": "none"}&lt;/code&gt; still produced a tool call in testing. Remove the &lt;code&gt;tools&lt;/code&gt; parameter entirely when tools must be disabled on Messages.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. JSON output
&lt;/h2&gt;

&lt;p&gt;Chat Completions supports &lt;code&gt;response_format: json_object&lt;/code&gt;:&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;completion&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;coding-glm-5.3&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;What is the capital of France? Answer in JSON with key answer.&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="n"&gt;response_format&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;type&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;json_object&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;# {"answer": "Paris"}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Responses uses &lt;code&gt;text.format&lt;/code&gt;:&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;response&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;responses&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;coding-glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is the capital of France? Answer in JSON with key answer.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;text&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;format&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;json_object&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;The upstream does not list a strict &lt;code&gt;json_schema&lt;/code&gt; mode. For schema-critical applications, include the schema in the prompt and validate the result client-side. Messages produced valid JSON when prompted, but has no equivalent dedicated field in this test.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Automatic context caching
&lt;/h2&gt;

&lt;p&gt;Caching is implicit; there is no parameter to enable. Two consecutive requests sharing an identical long prefix produced 960 cached tokens on Chat Completions and Responses.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chat: &lt;code&gt;usage.prompt_tokens_details.cached_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Responses: &lt;code&gt;usage.input_tokens_details.cached_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Messages: &lt;code&gt;usage.cache_read_input_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Messages field was present, but we did not reproduce a hit in this round. Caches warm per channel, so a load-balancer switch can produce a miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Sampling validation differs by API
&lt;/h2&gt;

&lt;p&gt;GLM endpoints use &lt;code&gt;temperature&lt;/code&gt; in &lt;code&gt;[0,1]&lt;/code&gt; with default &lt;code&gt;1.0&lt;/code&gt;, and &lt;code&gt;top_p&lt;/code&gt; in &lt;code&gt;[0.01,1]&lt;/code&gt; with default &lt;code&gt;0.95&lt;/code&gt;. Z.ai recommends tuning only one.&lt;/p&gt;

&lt;p&gt;The API surfaces do not validate these values consistently. Messages rejected &lt;code&gt;temperature=3&lt;/code&gt; with HTTP 400 and explicitly reported &lt;code&gt;[0,1]&lt;/code&gt;. Chat Completions and Responses silently accepted the same out-of-range value with 200.&lt;/p&gt;

&lt;p&gt;Validate sampling values in your client instead of relying on the gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capability x API matrix
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Chat Completions&lt;/th&gt;
&lt;th&gt;Responses&lt;/th&gt;
&lt;th&gt;Messages&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Generation / streaming&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking content&lt;/td&gt;
&lt;td&gt;&lt;code&gt;reasoning_content&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;reasoning&lt;/code&gt; item / &lt;code&gt;summary_text&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;thinking&lt;/code&gt; block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking intensity&lt;/td&gt;
&lt;td&gt;&lt;code&gt;reasoning_effort&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;reasoning_effort&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Accepted with 200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disable thinking&lt;/td&gt;
&lt;td&gt;No; &lt;code&gt;disabled&lt;/code&gt; still thinks&lt;/td&gt;
&lt;td&gt;No toggle&lt;/td&gt;
&lt;td&gt;No; same behavior as Chat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Function calling&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parallel tool calls&lt;/td&gt;
&lt;td&gt;Not verified&lt;/td&gt;
&lt;td&gt;Yes; 2 calls observed&lt;/td&gt;
&lt;td&gt;Not verified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disable tool calls&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tool_choice: "none"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No calls observed&lt;/td&gt;
&lt;td&gt;Remove &lt;code&gt;tools&lt;/code&gt;; typed &lt;code&gt;none&lt;/code&gt; failed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON mode&lt;/td&gt;
&lt;td&gt;&lt;code&gt;response_format&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;text.format&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prompt convention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Strict &lt;code&gt;json_schema&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Not listed upstream&lt;/td&gt;
&lt;td&gt;Not listed upstream&lt;/td&gt;
&lt;td&gt;Not listed upstream&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache accounting&lt;/td&gt;
&lt;td&gt;&lt;code&gt;prompt_tokens_details.cached_tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;input_tokens_details.cached_tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Field present; no hit reproduced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max-output validation&lt;/td&gt;
&lt;td&gt;400 with &lt;code&gt;[1,131072]&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Not tested&lt;/td&gt;
&lt;td&gt;Not tested&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Out-of-range sampling&lt;/td&gt;
&lt;td&gt;Silently accepted&lt;/td&gt;
&lt;td&gt;Silently accepted&lt;/td&gt;
&lt;td&gt;400 with &lt;code&gt;[0,1]&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Production checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Remove any code path that assumes thinking can be disabled.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;reasoning_effort="low"&lt;/code&gt; when you need lower reasoning spend.&lt;/li&gt;
&lt;li&gt;Read thinking from the protocol-specific response field.&lt;/li&gt;
&lt;li&gt;Remove &lt;code&gt;tools&lt;/code&gt; entirely to disable tools on Messages.&lt;/li&gt;
&lt;li&gt;Validate JSON Schema client-side.&lt;/li&gt;
&lt;li&gt;Validate &lt;code&gt;temperature&lt;/code&gt; and &lt;code&gt;top_p&lt;/code&gt; before sending requests.&lt;/li&gt;
&lt;li&gt;Normalize the three cache-accounting field names in observability code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GLM-5.3's model behavior is consistent in its core capabilities, but protocol compatibility is not field-for-field. Treat Chat Completions, Responses, and Messages as three adapters around the same model, especially for thinking, tools, JSON output, and usage accounting.&lt;/p&gt;

&lt;p&gt;Current pricing and availability are on the &lt;a href="https://aihubmix.com/model/coding-glm-5.3" rel="noopener noreferrer"&gt;AIHubMix model page&lt;/a&gt;. For all examples and observed responses, read the &lt;a href="https://aihubmix.com/blog/glm-5-3-hands-on-guide-always-on-thinking-three-effort-levels-and-the-api-support-matrix" rel="noopener noreferrer"&gt;complete GLM-5.3 hands-on guide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>api</category>
      <category>python</category>
    </item>
    <item>
      <title>DeepSeek V4 Pro (0813) Across 3 APIs: Thinking Passback, Tool Calls, and Hidden 400s</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Fri, 14 Aug 2026 11:58:00 +0000</pubDate>
      <link>https://dev.to/aihubmix/deepseek-v4-pro-0813-across-3-apis-thinking-passback-tool-calls-and-hidden-400s-a74</link>
      <guid>https://dev.to/aihubmix/deepseek-v4-pro-0813-across-3-apis-thinking-passback-tool-calls-and-hidden-400s-a74</guid>
      <description>&lt;p&gt;DeepSeek V4 Pro (0813) is available on AIHubMix through three protocol surfaces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenAI-compatible Chat Completions&lt;/li&gt;
&lt;li&gt;OpenAI Responses&lt;/li&gt;
&lt;li&gt;Claude-compatible Messages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They reach the same model, but the request and response shapes are not interchangeable. The largest production trap is thinking history: on tool-using multi-turn conversations, dropping the previous turn's thinking content causes a hard HTTP 400.&lt;/p&gt;

&lt;p&gt;The findings below come from calls made on August 13, 2026 against the AIHubMix production APIs. The &lt;a href="https://aihubmix.com/blog/deepseek-v4-pro-0813-thinking-passback-3-api-matrix" rel="noopener noreferrer"&gt;full hands-on guide&lt;/a&gt; includes complete examples, observed responses, and the full capability matrix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Chat Completions&lt;/th&gt;
&lt;th&gt;Responses&lt;/th&gt;
&lt;th&gt;Messages&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Endpoint&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/v1/chat/completions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/v1/responses&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/v1/messages&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking off&lt;/td&gt;
&lt;td&gt;&lt;code&gt;thinking.type="disabled"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;reasoning.effort="none"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;thinking.type="disabled"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking passback&lt;/td&gt;
&lt;td&gt;&lt;code&gt;reasoning_content&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;type="reasoning"&lt;/code&gt; item&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;thinking&lt;/code&gt; block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool schema&lt;/td&gt;
&lt;td&gt;nested &lt;code&gt;function&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;flat definition&lt;/td&gt;
&lt;td&gt;&lt;code&gt;input_schema&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured output&lt;/td&gt;
&lt;td&gt;&lt;code&gt;response_format&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;text.format&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;no native field&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web search&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;&lt;code&gt;web_search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;web_search_20250305&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The model has a 1M-token context window, accepts text input, and thinks by default. Sending an excessive &lt;code&gt;max_tokens&lt;/code&gt; value is rejected instead of silently truncated; a request with &lt;code&gt;max_tokens=9999999&lt;/code&gt; returned 400 and identified the ceiling as 393,216.&lt;/p&gt;

&lt;p&gt;One subtle input warning: Responses does not reject image parts. Unsupported image and file inputs are replaced with placeholder text. "No error" does not mean the model saw the image.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Preserve thinking history verbatim
&lt;/h2&gt;

&lt;p&gt;In thinking mode, the previous turn's thinking is part of the conversation state. This matters most in agent loops where the model emits a tool call and the client sends the tool result back.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chat Completions
&lt;/h3&gt;

&lt;p&gt;Preserve &lt;code&gt;reasoning_content&lt;/code&gt; on the historical assistant message:&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;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&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;What is 1 + 1? Remember the result.&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="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;assistant&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;2&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;reasoning_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;&amp;lt;reasoning_content from the previous response&amp;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="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;Add 1 to the result.&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;Dropping &lt;code&gt;reasoning_content&lt;/code&gt; returned HTTP 400. Restoring it made the same request continue normally.&lt;/p&gt;

&lt;h3&gt;
  
  
  Responses
&lt;/h3&gt;

&lt;p&gt;Append the prior &lt;code&gt;response.output&lt;/code&gt; without filtering its items:&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="nb"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;previous_input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&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;Add 1 to the result.&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;A common framework pattern is to retain only items where &lt;code&gt;type == "message"&lt;/code&gt;. That silently removes the &lt;code&gt;reasoning&lt;/code&gt; item and triggers the next-turn 400.&lt;/p&gt;

&lt;h3&gt;
  
  
  Messages
&lt;/h3&gt;

&lt;p&gt;Pass the previous &lt;code&gt;response.content&lt;/code&gt; back as the assistant message:&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;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&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;What&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s the weather in Paris?&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="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;assistant&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="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&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="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tool_result_block&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;Keep both the &lt;code&gt;thinking&lt;/code&gt; and &lt;code&gt;tool_use&lt;/code&gt; blocks. Removing the thinking block returned an &lt;code&gt;invalid_request_error&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Turning thinking off requires different fields
&lt;/h2&gt;

&lt;p&gt;Thinking is enabled by default. The off switch depends on the protocol:&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="c1"&gt;# Chat Completions
&lt;/span&gt;&lt;span class="n"&gt;extra_body&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;thinking&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;disabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;

&lt;span class="c1"&gt;# Responses
&lt;/span&gt;&lt;span class="n"&gt;reasoning&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;effort&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;none&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Messages
&lt;/span&gt;&lt;span class="n"&gt;extra_body&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;thinking&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;disabled&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;The result is observable. Chat and Messages stop returning their thinking fields. Responses reports zero reasoning tokens and omits the &lt;code&gt;reasoning&lt;/code&gt; output item.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;low&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, and &lt;code&gt;max&lt;/code&gt; were accepted, but token counts for the same prompts did not vary monotonically and the selected level was not echoed. The only level whose effect was unambiguous from the caller side was Responses &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Tool schemas are protocol-specific
&lt;/h2&gt;

&lt;p&gt;Chat Completions wraps a function definition inside &lt;code&gt;function&lt;/code&gt;:&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;tools&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;type&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;function&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;function&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&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;get_weather&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;description&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;Get weather for a city&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;parameters&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;object&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;properties&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;string&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;required&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="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;Responses uses a flat definition:&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;tools&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;type&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;function&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;name&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;get_weather&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;description&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;Get weather for a city&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;parameters&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;object&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;properties&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;string&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;required&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&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="p"&gt;}]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Messages uses &lt;code&gt;input_schema&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There are two more gotchas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;tool_choice: "required"&lt;/code&gt; returns 400 on Chat and Responses while thinking is enabled. Use a named-function choice, or disable thinking before using &lt;code&gt;required&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Parallel tool calling cannot be disabled. DeepSeek documents the relevant switches as ignored on Responses and Messages. Serialize calls in your client if ordering matters.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tool definitions also consume context in full. A request containing 200 definitions succeeded in testing, but the prompt reached 6,105 tokens. Route only the tools relevant to the current task.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Structured output, caching, and web search
&lt;/h2&gt;

&lt;p&gt;Chat Completions supports JSON mode through &lt;code&gt;response_format&lt;/code&gt;. Responses supports strict JSON Schema through &lt;code&gt;text.format&lt;/code&gt;:&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;response&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;responses&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-pro-0813&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Return the number 1 under key a.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;text&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;format&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;json_schema&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;name&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;extract&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;strict&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;schema&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;object&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;properties&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;type&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;integer&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;required&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&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="p"&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;Messages has no equivalent structured-output field. Carrying a schema in a forced tool is possible, but use Chat or Responses when hard schema guarantees are central.&lt;/p&gt;

&lt;p&gt;Context caching is automatic. Repeated long prefixes produced cache hits under different usage fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chat: &lt;code&gt;prompt_tokens_details.cached_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Responses: &lt;code&gt;input_tokens_details.cached_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Messages: &lt;code&gt;cache_read_input_tokens&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Put stable system instructions, knowledge snippets, and tool definitions at the front of the request.&lt;/p&gt;

&lt;p&gt;Server-side web search worked on Responses and Messages. Chat accepted unknown search-like fields without error, but did not perform retrieval. Route search workloads to Responses or Messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Persist thinking content as normal conversation state.&lt;/li&gt;
&lt;li&gt;Do not filter Responses output down to message items before passback.&lt;/li&gt;
&lt;li&gt;Avoid &lt;code&gt;tool_choice: "required"&lt;/code&gt; while thinking is enabled.&lt;/li&gt;
&lt;li&gt;Keep the three tool-definition schemas separate.&lt;/li&gt;
&lt;li&gt;Do not infer image support from the absence of an error.&lt;/li&gt;
&lt;li&gt;Serialize parallel tool calls on the client when required.&lt;/li&gt;
&lt;li&gt;Branch on HTTP status, not only &lt;code&gt;error.type&lt;/code&gt;, for Responses errors.&lt;/li&gt;
&lt;li&gt;Do not use the echoed &lt;code&gt;model&lt;/code&gt; field as the sole routing or attribution signal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DeepSeek V4 Pro's multi-protocol support is useful, but compatibility is a client-side responsibility. Treat thinking as durable conversation state and isolate protocol adapters around history, tools, usage, and errors.&lt;/p&gt;

&lt;p&gt;For the complete 3-API matrix, additional code samples, logprobs behavior, current-path deviations, and FAQs, read the &lt;a href="https://aihubmix.com/blog/deepseek-v4-pro-0813-thinking-passback-3-api-matrix" rel="noopener noreferrer"&gt;full AIHubMix guide&lt;/a&gt;. Current pricing and status are on the &lt;a href="https://aihubmix.com/model/deepseek-v4-pro-0813" rel="noopener noreferrer"&gt;model page&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>api</category>
      <category>deepseek</category>
    </item>
    <item>
      <title>Nemotron 3.5 Lightning Is Now Free on AIHubMix</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Tue, 11 Aug 2026 14:15:37 +0000</pubDate>
      <link>https://dev.to/aihubmix/nemotron-35-lightning-is-now-free-on-aihubmix-4ih3</link>
      <guid>https://dev.to/aihubmix/nemotron-35-lightning-is-now-free-on-aihubmix-4ih3</guid>
      <description>&lt;p&gt;NVIDIA Nemotron 3.5 Lightning is now available to use for free on AIHubMix.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aihubmix.com/model/nemotron-3.5-lightning-free" rel="noopener noreferrer"&gt;Try Nemotron 3.5 Lightning on AIHubMix&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Built for the execution layer of AI agents
&lt;/h2&gt;

&lt;p&gt;Long-running agents spend much of their time on frequent operational work: calling tools, validating outputs, writing and reviewing code, formatting results, and delegating tasks to sub-agents. Using a large frontier model for every one of those steps can add unnecessary latency and cost.&lt;/p&gt;

&lt;p&gt;Nemotron 3.5 Lightning is designed for this execution layer. It is an open 30B Mixture-of-Experts model with only 3B active parameters, combining the capacity of a larger model with a much smaller active compute footprint.&lt;/p&gt;

&lt;p&gt;Key capabilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;30B total parameters with 3B active parameters&lt;/li&gt;
&lt;li&gt;Context windows of up to 1 million tokens&lt;/li&gt;
&lt;li&gt;Tool calling and tool-output validation&lt;/li&gt;
&lt;li&gt;Coding and specialized task execution&lt;/li&gt;
&lt;li&gt;Long-running autonomous-agent workflows&lt;/li&gt;
&lt;li&gt;Fast, high-volume inference&lt;/li&gt;
&lt;li&gt;Local deployment on supported NVIDIA hardware&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lightning for execution, larger models for planning
&lt;/h2&gt;

&lt;p&gt;Nemotron 3.5 Lightning is the smallest member of the Nemotron 3 family. While larger models such as Nemotron 3 Super and Ultra are suited to advanced reasoning, orchestration, and complex planning, Lightning focuses on the high-frequency execution steps that dominate an agent's workload.&lt;/p&gt;

&lt;p&gt;That makes it a practical workhorse for sub-agents, coding assistants, tool-driven workflows, and always-on agent systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start using it for free
&lt;/h2&gt;

&lt;p&gt;The free route is currently available on AIHubMix with zero input and output token pricing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model ID: nemotron-3.5-lightning-free
Input: $0 / 1M tokens
Output: $0 / 1M tokens
Context: up to 1M tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works through AIHubMix's OpenAI-compatible API:&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;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&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="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AIHUBMIX_API_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://aihubmix.com/v1&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="n"&gt;response&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;nemotron-3.5-lightning-free&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="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;Help me validate this tool output.&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="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://aihubmix.com/model/nemotron-3.5-lightning-free" rel="noopener noreferrer"&gt;Explore Nemotron 3.5 Lightning and start building on AIHubMix&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>api</category>
    </item>
    <item>
      <title>Seedance 2.5 vs MiniMax H3 vs Wan 3.0: An API-First Comparison</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Sat, 08 Aug 2026 14:49:37 +0000</pubDate>
      <link>https://dev.to/aihubmix/seedance-25-vs-minimax-h3-vs-wan-30-an-api-first-comparison-40</link>
      <guid>https://dev.to/aihubmix/seedance-25-vs-minimax-h3-vs-wan-30-an-api-first-comparison-40</guid>
      <description>&lt;p&gt;Choosing an AI video model from demo clips is a poor engineering decision. A production team needs to know which inputs the model accepts, how long it can maintain continuity, how billing works, and how many attempts are required before an output becomes usable.&lt;/p&gt;

&lt;p&gt;Seedance 2.5, MiniMax H3, and Wan 3.0 are now all available on AIHubMix. That makes it possible to evaluate the three models behind one API key and a common asynchronous task workflow.&lt;/p&gt;

&lt;p&gt;This article compares confirmed product capabilities and proposes a repeatable test plan. It does not claim a universal visual-quality winner because no common public blind benchmark covers all three models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model matrix
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Wan 3.0&lt;/th&gt;
&lt;th&gt;MiniMax H3&lt;/th&gt;
&lt;th&gt;Seedance 2.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Provider&lt;/td&gt;
&lt;td&gt;Alibaba Tongyi Lab&lt;/td&gt;
&lt;td&gt;MiniMax&lt;/td&gt;
&lt;td&gt;ByteDance Seed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AIHubMix model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;wan3.0-video&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;minimax-h3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;doubao-seedance-2-5-260628&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum single generation&lt;/td&gt;
&lt;td&gt;30 seconds&lt;/td&gt;
&lt;td&gt;15 seconds&lt;/td&gt;
&lt;td&gt;30 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Confirmed resolution&lt;/td&gt;
&lt;td&gt;480p, 720p, 1080p on AIHubMix&lt;/td&gt;
&lt;td&gt;Up to 2K&lt;/td&gt;
&lt;td&gt;Not specified in the official launch post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio&lt;/td&gt;
&lt;td&gt;Audio references and sound-aware video workflow&lt;/td&gt;
&lt;td&gt;Native stereo generation&lt;/td&gt;
&lt;td&gt;Joint audio-video generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;References&lt;/td&gt;
&lt;td&gt;Text, image, audio, video, documents, and webpages&lt;/td&gt;
&lt;td&gt;Text, image, video, and audio&lt;/td&gt;
&lt;td&gt;Up to 30 images, 10 videos, and 10 audio clips&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Editing focus&lt;/td&gt;
&lt;td&gt;Unified reference, editing, replication, and motion driving&lt;/td&gt;
&lt;td&gt;Multimodal editing and V2V motion transfer&lt;/td&gt;
&lt;td&gt;Timestamp, green-screen, perspective, and reference editing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best initial fit&lt;/td&gt;
&lt;td&gt;Flexible production and ecommerce&lt;/td&gt;
&lt;td&gt;Short 2K commercial clips with sound&lt;/td&gt;
&lt;td&gt;Multi-shot narrative and targeted edits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One specification deserves caution: third-party pages frequently describe Seedance 2.5 as a 4K model, but ByteDance Seed's July 31 launch post does not state an output resolution. Treat resolution as platform-specific until the active API documentation confirms it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model 1: Wan 3.0
&lt;/h2&gt;

&lt;p&gt;Wan 3.0 is the flexible production option. It supports a single generation of up to 30 seconds, and AIHubMix exposes 480p, 720p, and 1080p output tiers.&lt;/p&gt;

&lt;p&gt;The broader Wan 3.0 workflow supports text, image, audio, and video references as well as structured sources such as documents, spreadsheets, presentations, PDFs, and webpages. This is useful when a generation needs to stay grounded in product documentation or an existing brand page.&lt;/p&gt;

&lt;p&gt;Start with Wan 3.0 for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ecommerce and product videos;&lt;/li&gt;
&lt;li&gt;character animation centered on one stable subject;&lt;/li&gt;
&lt;li&gt;continuous 10-to-30-second shots;&lt;/li&gt;
&lt;li&gt;workflows that iterate at 480p before rendering at 1080p.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The primary failure mode to test is long-horizon continuity. A 30-second prompt should describe a temporal sequence, camera path, and explicit continuity constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model 2: MiniMax H3
&lt;/h2&gt;

&lt;p&gt;MiniMax H3 generates up to 15 seconds of native 2K video with stereo audio. MiniMax highlights instruction following, accurate text and brand rendering, reference-based editing, and video-to-video motion transfer.&lt;/p&gt;

&lt;p&gt;Start with H3 for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;product ads containing logos or small text;&lt;/li&gt;
&lt;li&gt;sound-led short-form video;&lt;/li&gt;
&lt;li&gt;2K product or interface shots;&lt;/li&gt;
&lt;li&gt;transferring motion or camera language from a source video.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Its engineering tradeoff is duration. For longer narratives, treat each H3 generation as a shot and assemble the sequence in an external editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model 3: Seedance 2.5
&lt;/h2&gt;

&lt;p&gt;Seedance 2.5 generates up to 30 seconds of synchronized audio and video and supports multi-round extension. Its official launch material focuses on story structure, transitions, multimodal references, and post-generation control.&lt;/p&gt;

&lt;p&gt;A single request can use up to 30 images, 10 video clips, and 10 audio clips. The model also supports timestamp-level instructions and targeted edits to characters, actions, camera perspective, and green-screen backgrounds.&lt;/p&gt;

&lt;p&gt;Start with Seedance 2.5 for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multi-shot 30-second narratives;&lt;/li&gt;
&lt;li&gt;projects with multiple characters and locations;&lt;/li&gt;
&lt;li&gt;audiovisual work with several references;&lt;/li&gt;
&lt;li&gt;workflows where a local edit is cheaper than regenerating the entire clip.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reference count is not the same as control. Every asset should have one defined purpose, such as character identity, location, camera movement, or voice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calling the models through AIHubMix
&lt;/h2&gt;

&lt;p&gt;The three current model IDs are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wan3.0-video
minimax-h3
doubao-seedance-2-5-260628
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;AIHubMix documents an asynchronous video workflow. Enable &lt;strong&gt;Async Tasks&lt;/strong&gt; for the account before submitting jobs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://aihubmix.com/ai/v1/videos &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;$AIHUBMIX_API_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": "wan3.0-video",
    "prompt": "A controlled product shot with one slow camera orbit",
    "resolution": "720p"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the returned task ID, poll the task endpoint, and download the completed artifact.&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://aihubmix.com/ai/v1/tasks/&lt;span class="o"&gt;{&lt;/span&gt;task_id&lt;span class="o"&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;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$AIHUBMIX_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

curl https://aihubmix.com/ai/v1/tasks/&lt;span class="o"&gt;{&lt;/span&gt;task_id&lt;span class="o"&gt;}&lt;/span&gt;/content &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;$AIHUBMIX_API_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;--output&lt;/span&gt; result.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Model-specific parameters may differ. Switching the &lt;code&gt;model&lt;/code&gt; value is useful for an initial harness, but validate supported duration, resolution, and reference fields on each live model page before treating the request schema as identical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current AIHubMix billing
&lt;/h2&gt;

&lt;p&gt;Prices checked on August 8, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model tier&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;Ten-second reference cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Wan 3.0 480p&lt;/td&gt;
&lt;td&gt;$0.0338/second&lt;/td&gt;
&lt;td&gt;$0.3380&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wan 3.0 720p&lt;/td&gt;
&lt;td&gt;$0.06768/second&lt;/td&gt;
&lt;td&gt;$0.6768&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wan 3.0 1080p&lt;/td&gt;
&lt;td&gt;$0.1352/second&lt;/td&gt;
&lt;td&gt;$1.3520&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MiniMax H3 768p&lt;/td&gt;
&lt;td&gt;$0.07744/second&lt;/td&gt;
&lt;td&gt;$0.7744&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MiniMax H3 2K&lt;/td&gt;
&lt;td&gt;$0.12397/second&lt;/td&gt;
&lt;td&gt;$1.2397&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Seedance 2.5 without video input&lt;/td&gt;
&lt;td&gt;$10.85/million tokens&lt;/td&gt;
&lt;td&gt;Usage-dependent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Seedance 2.5 with video input&lt;/td&gt;
&lt;td&gt;$6.51/million tokens&lt;/td&gt;
&lt;td&gt;Usage-dependent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two Seedance rates are alternative billing paths, not additive charges. The displayed video-input rate being lower is counterintuitive, and the launch-day model page contains some ambiguity between its input-modality labels and video-reference pricing. Confirm the actual metered usage with a small job before estimating production volume.&lt;/p&gt;

&lt;p&gt;Do not compare Seedance's per-token number directly with the per-second prices. Normalize after collecting actual task usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  A repeatable evaluation harness
&lt;/h2&gt;

&lt;p&gt;Use the same three briefs for every model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test A: character continuity
&lt;/h3&gt;

&lt;p&gt;Provide one character reference. Require a turn, a hand interaction, and a camera move. Score face identity, wardrobe, hands, motion, and voice over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test B: product fidelity
&lt;/h3&gt;

&lt;p&gt;Provide one product reference. Require a close-up and an orbit. Score silhouette, logo, small text, materials, reflections, and unwanted redesign.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test C: temporal instruction following
&lt;/h3&gt;

&lt;p&gt;Define three actions and two camera transitions with explicit timing. Score event order, transition quality, subject continuity, and audiovisual sync.&lt;/p&gt;

&lt;p&gt;Persist these fields for every task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"minimax-h3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"brief_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"product-orbit-v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"attempt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"duration_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"resolution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2k"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"latency_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"billed_cost_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"usable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"repair_minutes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failure_labels"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key metric is not price per generation. It is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per usable result = total generation cost / number of accepted outputs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Track manual repair time separately. A cheap model that needs repeated generations and post-production can be more expensive than a model with a higher listed rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision rules
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pick &lt;strong&gt;Wan 3.0&lt;/strong&gt; when duration, resolution-based cost control, and broad source grounding are the main requirements.&lt;/li&gt;
&lt;li&gt;Pick &lt;strong&gt;MiniMax H3&lt;/strong&gt; when the deliverable is a short 2K commercial shot with native sound, text, or brand details.&lt;/li&gt;
&lt;li&gt;Pick &lt;strong&gt;Seedance 2.5&lt;/strong&gt; when narrative structure, many references, continuation, and targeted editing matter more than a simple request schema.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since all three models are now on AIHubMix, the safest selection process is an API-level A/B test using the same brief, acceptance criteria, and cost accounting.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aihubmix.com/model/wan3.0-video" rel="noopener noreferrer"&gt;Wan 3.0 on AIHubMix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.minimax.io/blog/minimax-h3" rel="noopener noreferrer"&gt;MiniMax H3 official launch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aihubmix.com/model/minimax-h3" rel="noopener noreferrer"&gt;MiniMax H3 on AIHubMix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://seed.bytedance.com/en/blog/one-take-creation-flexible-referencing-introducing-seedance-2-5" rel="noopener noreferrer"&gt;Seedance 2.5 official launch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aihubmix.com/model/doubao-seedance-2-5-260628" rel="noopener noreferrer"&gt;Seedance 2.5 on AIHubMix&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Capabilities and prices were checked on August 8, 2026. Verify live documentation before production use.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>machinelearning</category>
      <category>testing</category>
    </item>
    <item>
      <title>Wan AI 3.0 API Tutorial: Use Alibaba Wan 3.0 on AIHubMix</title>
      <dc:creator>AIHubMix</dc:creator>
      <pubDate>Thu, 06 Aug 2026 14:17:00 +0000</pubDate>
      <link>https://dev.to/aihubmix/wan-ai-30-api-tutorial-use-alibaba-wan-30-on-aihubmix-1nbk</link>
      <guid>https://dev.to/aihubmix/wan-ai-30-api-tutorial-use-alibaba-wan-30-on-aihubmix-1nbk</guid>
      <description>&lt;p&gt;Alibaba's Wan AI has moved from teasers to a public beta. Wan 3.0 can generate videos up to 30 seconds in a single run, render more expressive characters, and use references from multiple input types. Better still, developers can already call the model through AIHubMix instead of waiting for a separate Wan API rollout.&lt;/p&gt;

&lt;p&gt;This tutorial shows how to generate a Wan 3.0 video with the AIHubMix API, poll the asynchronous job, download the result, estimate the cost, and write prompts that take advantage of the model's longer shot length.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Launch status:&lt;/strong&gt; Alibaba announced the Wan 3.0 public beta on August 6, 2026. AIHubMix lists the model as &lt;code&gt;wan3.0-video&lt;/code&gt;. Features and prices in this guide reflect the launch-day API and may change during the beta.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What Is Wan AI 3.0?
&lt;/h2&gt;

&lt;p&gt;Wan AI is Alibaba's video generation model family. The Wan 3.0 public beta focuses on three improvements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native 30-second generation:&lt;/strong&gt; one request can produce a video up to 30 seconds long.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reality-grade rendering:&lt;/strong&gt; Alibaba highlights more expressive characters, stronger reference consistency, and better rendering of digital content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Omni-Reference:&lt;/strong&gt; Wan 3.0 can reason over text, images, audio, video, and structured sources such as documents, spreadsheets, slides, PDFs, and webpages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alibaba describes these features in the &lt;a href="https://x.com/Alibaba_Wan/status/2085339761284104529" rel="noopener noreferrer"&gt;official Wan 3.0 launch thread&lt;/a&gt;. The &lt;a href="https://x.com/AiHubMix/status/2085358414407094487" rel="noopener noreferrer"&gt;AIHubMix launch announcement&lt;/a&gt; confirms that Wan 3.0 is live on its platform with text, image, audio, and video inputs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Wan 3.0 on AIHubMix at a glance
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model ID&lt;/td&gt;
&lt;td&gt;&lt;code&gt;wan3.0-video&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Endpoint&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://aihubmix.com/ai/v1/videos&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maximum duration&lt;/td&gt;
&lt;td&gt;Up to 30 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resolutions&lt;/td&gt;
&lt;td&gt;480p, 720p, 1080p&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inputs listed by AIHubMix&lt;/td&gt;
&lt;td&gt;Text, image, audio, video&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;Video&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Job type&lt;/td&gt;
&lt;td&gt;Asynchronous&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The wider Wan 3.0 beta also advertises document and webpage references. At launch, however, the AIHubMix model page explicitly lists text, vision, audio, and video modalities. Check the current documentation before sending document-native inputs through the gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Use Alibaba Wan Through AIHubMix?
&lt;/h2&gt;

&lt;p&gt;AIHubMix provides a single API key and a consistent developer workflow across many AI models. For Wan 3.0, the practical advantages are immediate access, an asynchronous task endpoint, and launch pricing below Alibaba's published public-beta rates.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://aihubmix.com/model/wan3.0-video" rel="noopener noreferrer"&gt;AIHubMix Wan 3.0 model page&lt;/a&gt; currently lists:&lt;/p&gt;

&lt;p&gt;IHubMix price &lt;br&gt;
480p:price per second $ 0.04225; &lt;br&gt;
720p: price per second $0.0846; &lt;br&gt;
1080p: price per second $0.169.&lt;/p&gt;

&lt;p&gt;Alibaba's launch thread lists $0.05, $0.10, and $0.20 per second for the same resolutions. That makes the launch-day AIHubMix rates about 15.5% lower. Always verify the live model page before estimating production costs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

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

&lt;ol&gt;
&lt;li&gt;An AIHubMix account and API key.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Async Tasks&lt;/strong&gt; feature enabled for your account in the AIHubMix console.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl&lt;/code&gt; for the REST example, or Python 3.9+ for the SDK example.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Store the key in an environment variable instead of placing it in source code:&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="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AIHUBMIX_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key_here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not commit &lt;code&gt;.env&lt;/code&gt; files or API keys to Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate a Wan 3.0 Video With cURL
&lt;/h2&gt;

&lt;p&gt;Wan 3.0 generation is asynchronous. The workflow has three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Submit a video job.&lt;/li&gt;
&lt;li&gt;Poll the returned task ID until the job completes.&lt;/li&gt;
&lt;li&gt;Download the generated MP4.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 1: Submit the video job
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://aihubmix.com/ai/v1/videos &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;$AIHUBMIX_API_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": "wan3.0-video",
    "prompt": "A continuous cinematic tracking shot follows a cyclist through a rain-soaked Tokyo side street at night. Neon signs reflect in the pavement. The camera begins wide, moves alongside the cyclist, then slowly pushes in as steam rises from a food stall. Natural motion, realistic skin and fabric, physically accurate reflections, no cuts.",
    "seconds": "10",
    "size": "720p"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response contains a task identifier. Save it as &lt;code&gt;task_id&lt;/code&gt; for the next request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Poll the task status
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://aihubmix.com/ai/v1/tasks/&lt;span class="o"&gt;{&lt;/span&gt;task_id&lt;span class="o"&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;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$AIHUBMIX_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Poll at a reasonable interval, such as every 10 to 15 seconds. Stop when the status becomes &lt;code&gt;completed&lt;/code&gt;, &lt;code&gt;failed&lt;/code&gt;, or &lt;code&gt;canceled&lt;/code&gt;. Aggressive polling does not make generation faster and may trigger rate limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Download the video
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://aihubmix.com/ai/v1/tasks/&lt;span class="o"&gt;{&lt;/span&gt;task_id&lt;span class="o"&gt;}&lt;/span&gt;/content &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;$AIHUBMIX_API_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;--output&lt;/span&gt; wan3-result.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;wan3-result.mp4&lt;/code&gt; locally and review subject consistency, camera motion, unwanted cuts, and visual artifacts before using it in a production workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Wan 3.0 With Python
&lt;/h2&gt;

&lt;p&gt;AIHubMix also documents an OpenAI-compatible Python workflow. Install or update the SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; openai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create &lt;code&gt;generate_wan_video.py&lt;/code&gt;:&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;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&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;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AIHUBMIX_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Set AIHUBMIX_API_KEY before running this script.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&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="n"&gt;API_KEY&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://aihubmix.com/v1&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="n"&gt;prompt&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;A single uninterrupted product shot of a silver smartwatch on black &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;volcanic stone. Soft morning light moves across the brushed metal. &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The camera makes a slow 180-degree orbit while condensation gathers &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;on the surface. Premium commercial realism, restrained reflections, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stable logo placement, no text overlays, no cuts.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;video&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;videos&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;wan3.0-video&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;10&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;720p&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Created task: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;queued&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;in_progress&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;progress&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Status: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;; progress: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="si"&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="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;video&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;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;retrieve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;completed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;error&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&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;Unknown error&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generation ended with status &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;content&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;videos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;download_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;video&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write_to_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;wan3-result.mp4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Saved wan3-result.mp4&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;Run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python generate_wan_video.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a production service, move polling into a background worker, add exponential backoff, persist the task ID, and make downloads resumable. A web request should not remain open while a 30-second AI video is rendering.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Write Better Wan AI Prompts
&lt;/h2&gt;

&lt;p&gt;A good Wan 3.0 prompt reads like a compact shot brief, not a list of style adjectives. Use this order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Subject + action + setting + lighting + camera movement + shot progression + continuity constraints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Describe movement over time
&lt;/h3&gt;

&lt;p&gt;A 30-second clip needs progression. Explain how the action and camera evolve from the opening to the final frame.&lt;/p&gt;

&lt;p&gt;Weak:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A cinematic woman in a futuristic city.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A courier walks through a crowded futuristic market at dawn. Begin with a wide establishing shot, track backward at walking speed as she approaches, then arc to her left when she stops at a glowing map kiosk. Steam crosses the foreground while the crowd continues moving naturally. One continuous take, no cuts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Name a specific camera move
&lt;/h3&gt;

&lt;p&gt;Replace vague words such as "cinematic" with a physical direction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;slow push-in&lt;/li&gt;
&lt;li&gt;lateral tracking shot&lt;/li&gt;
&lt;li&gt;handheld follow shot&lt;/li&gt;
&lt;li&gt;crane down to eye level&lt;/li&gt;
&lt;li&gt;180-degree product orbit&lt;/li&gt;
&lt;li&gt;locked-off wide shot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use one main move and one transition. Too many camera instructions often create unstable motion.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Protect identity and product details
&lt;/h3&gt;

&lt;p&gt;When using a reference image or video, explain its role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use the first reference for the character's face, hair, and clothing. Use the second reference for the cafe interior and color palette. Preserve the same character identity, jacket details, and table layout throughout the shot.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not assume the model knows which reference controls the person, location, or product.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Use constraints sparingly
&lt;/h3&gt;

&lt;p&gt;Add only constraints that can be checked in the final video:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;One continuous take, no scene cuts, stable facial identity, natural hand motion, no text overlays.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Long negative-prompt lists can compete with the main direction. Start with four or five important constraints, generate a short test, and refine from the visible failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Wan 3.0 Prompt Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Cinematic character scene
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A tired detective enters a quiet all-night diner during heavy rain. The camera starts outside the window, slowly pushes through the doorway behind him, and follows as he removes his wet coat and sits at the counter. Fluorescent light mixes with red neon from the street. Keep his face, charcoal coat, and age consistent throughout. Subtle natural expression, realistic wet fabric, one continuous take, no cuts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Ecommerce product video
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A white running shoe rests on a wet track before sunrise. Begin with an extreme close-up of water droplets on the mesh, pull back into a low three-quarter view, then make a smooth half-orbit as warm sunlight reaches the sole. Preserve the shoe silhouette, material, color, and logo placement. Premium commercial lighting, physically accurate reflections, no extra text, no cuts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Social media food clip
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A chef plates handmade ramen in a compact open kitchen. Start overhead as noodles enter the bowl, descend to counter height when broth is poured, then track sideways as the chef adds egg and scallions. Warm practical lighting, visible steam, natural hand movement, appetizing realistic texture. One continuous 10-second take, no text overlay.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A Cost-Smart Testing Workflow
&lt;/h2&gt;

&lt;p&gt;Do not begin prompt development with a 30-second 1080p render. Use a staged workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Test composition and motion at 480p for 5 seconds.&lt;/li&gt;
&lt;li&gt;Fix identity, hand, camera, and continuity problems.&lt;/li&gt;
&lt;li&gt;Validate the final prompt at 720p for 10 seconds.&lt;/li&gt;
&lt;li&gt;Render the 30-second 1080p version only after the shot is stable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At current AIHubMix pricing, a 5-second 480p test costs about $0.21, while a 30-second 1080p render costs $5.07. Iterating at the lowest useful setting can reduce prompt-development cost substantially.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common API Problems
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The request returns an authorization error
&lt;/h3&gt;

&lt;p&gt;Confirm that &lt;code&gt;AIHUBMIX_API_KEY&lt;/code&gt; is set in the same shell that runs the command. Also check that the header uses &lt;code&gt;Bearer&lt;/code&gt; followed by a space and the key.&lt;/p&gt;

&lt;h3&gt;
  
  
  The asynchronous endpoint is unavailable
&lt;/h3&gt;

&lt;p&gt;Enable &lt;strong&gt;Async Tasks&lt;/strong&gt; for the account in the AIHubMix console. The video endpoint depends on that account-level feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  The task stays queued
&lt;/h3&gt;

&lt;p&gt;Longer and higher-resolution videos need more processing time, especially during a public-beta launch. Keep the task ID, poll less frequently, and retry status requests rather than submitting duplicate paid jobs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Python client has no &lt;code&gt;videos&lt;/code&gt; attribute
&lt;/h3&gt;

&lt;p&gt;Update the &lt;code&gt;openai&lt;/code&gt; package. Video methods require a recent SDK version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-U&lt;/span&gt; openai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your environment must stay on an older SDK, use the REST workflow shown earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  A long video loses consistency
&lt;/h3&gt;

&lt;p&gt;Reduce competing actions, specify one camera path, state which reference controls each element, and test a shorter version first. A 30-second generation magnifies ambiguity in the prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wan 3.0 FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is Wan 3.0 available now?
&lt;/h3&gt;

&lt;p&gt;Yes. Alibaba announced Wan 3.0 as a public beta on August 6, 2026, and AIHubMix made &lt;code&gt;wan3.0-video&lt;/code&gt; available the same day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Wan 3.0 an Alibaba model?
&lt;/h3&gt;

&lt;p&gt;Yes. Wan AI is developed by Alibaba's Tongyi Lab. Search terms such as &lt;strong&gt;Wan Alibaba&lt;/strong&gt;, &lt;strong&gt;Alibaba Wan&lt;/strong&gt;, and &lt;strong&gt;Wan AI&lt;/strong&gt; refer to the same model family.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Wan 3.0 generate a 30-second video?
&lt;/h3&gt;

&lt;p&gt;Yes. The public beta supports native video generation up to 30 seconds in a single run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does AIHubMix support image-to-video with Wan 3.0?
&lt;/h3&gt;

&lt;p&gt;The AIHubMix model page lists vision, audio, and video alongside text as supported input modalities. The launch-day quick start demonstrates text-to-video. Check the latest API documentation for the current upload and reference schema before building a multimodal production pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does the Wan 3.0 API cost?
&lt;/h3&gt;

&lt;p&gt;At publication time, AIHubMix lists $0.04225 per second for 480p, $0.0846 for 720p, and $0.169 for 1080p. A 30-second clip therefore costs approximately $1.27, $2.54, or $5.07, depending on resolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Building With Wan 3.0
&lt;/h2&gt;

&lt;p&gt;Wan 3.0 changes the useful unit of AI video generation from a short visual beat to a complete 30-second shot. The best way to evaluate it is to start with a tightly directed 5-second test, refine the motion and continuity, and scale only the prompts that hold together.&lt;/p&gt;

&lt;p&gt;Use the &lt;a href="https://aihubmix.com/model/wan3.0-video" rel="noopener noreferrer"&gt;&lt;code&gt;wan3.0-video&lt;/code&gt; model page on AIHubMix&lt;/a&gt; to verify current pricing and API availability, then submit your first asynchronous generation with the examples above.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Sources: &lt;a href="https://x.com/Alibaba_Wan/status/2085339761284104529" rel="noopener noreferrer"&gt;Alibaba Wan 3.0 public-beta announcement&lt;/a&gt;, &lt;a href="https://x.com/AiHubMix/status/2085358414407094487" rel="noopener noreferrer"&gt;AIHubMix Wan 3.0 announcement&lt;/a&gt;, and &lt;a href="https://aihubmix.com/model/wan3.0-video" rel="noopener noreferrer"&gt;AIHubMix Wan 3.0 model details&lt;/a&gt;.&lt;/em&gt;&lt;br&gt;
``&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>api</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
