<?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: RouterBase</title>
    <description>The latest articles on DEV Community by RouterBase (@routerbase).</description>
    <link>https://dev.to/routerbase</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%2F3964530%2F4149f6aa-4f88-48c8-8079-80e2dc5a8150.png</url>
      <title>DEV Community: RouterBase</title>
      <link>https://dev.to/routerbase</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/routerbase"/>
    <language>en</language>
    <item>
      <title>4 Request-Validation Gotchas When Migrating OpenAI Clients to GPT-6.2 Reasoning Models</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Thu, 19 Nov 2026 10:14:42 +0000</pubDate>
      <link>https://dev.to/routerbase_com/4-request-validation-gotchas-when-migrating-openai-clients-to-gpt-62-reasoning-models-1aoc</link>
      <guid>https://dev.to/routerbase_com/4-request-validation-gotchas-when-migrating-openai-clients-to-gpt-62-reasoning-models-1aoc</guid>
      <description>&lt;p&gt;When OpenAI shipped GPT-6.2 Astra and GPT-6.2 Sol on November 17, 2026, both models looked like drop-in replacements for existing OpenAI-compatible chat and Responses API clients. In practice, running live probes against both tiers (November 19, 2026) surfaced four request-validation constraints that commonly break older wrappers.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Non-default sampling parameters return HTTP 400
&lt;/h2&gt;

&lt;p&gt;Many production wrappers still default to &lt;code&gt;temperature: 0&lt;/code&gt; or &lt;code&gt;temperature: 0.2&lt;/code&gt; for deterministic extraction and code review. On both &lt;code&gt;gpt-6.2-sol&lt;/code&gt; and &lt;code&gt;gpt-6.2-astra&lt;/code&gt;, sending &lt;code&gt;temperature != 1&lt;/code&gt;, &lt;code&gt;top_p != 1&lt;/code&gt;, or non-zero &lt;code&gt;frequency_penalty&lt;/code&gt; / &lt;code&gt;presence_penalty&lt;/code&gt; returns HTTP 400.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Gate sampling parameters behind a model-capability check and omit them completely for GPT-6.2 tiers instead of passing &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;code&gt;reasoning_effort&lt;/code&gt; cannot be turned off with &lt;code&gt;none&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;In our live probes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accepted values: &lt;code&gt;low&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, &lt;code&gt;xhigh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rejected (HTTP 400) on Chat Completions: &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;minimal&lt;/code&gt;, &lt;code&gt;max&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your gateway or SDK normalizes across model families, map &lt;code&gt;minimal&lt;/code&gt; -&amp;gt; &lt;code&gt;low&lt;/code&gt; and &lt;code&gt;max&lt;/code&gt;/&lt;code&gt;ultra&lt;/code&gt; -&amp;gt; &lt;code&gt;xhigh&lt;/code&gt; only when you explicitly want cross-model compatibility—and fail fast on &lt;code&gt;none&lt;/code&gt; rather than silently dropping the caller's intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Separate reasoning depth from output length using &lt;code&gt;verbosity&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Both tiers accept &lt;code&gt;verbosity&lt;/code&gt; (&lt;code&gt;low&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;). Previously, teams often lowered &lt;code&gt;reasoning_effort&lt;/code&gt; just to get shorter answers. With GPT-6.2, you can keep &lt;code&gt;reasoning_effort: "high"&lt;/code&gt; for hard debugging while setting &lt;code&gt;verbosity: "low"&lt;/code&gt; for concise structured responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Isolate shared prompt prefixes with &lt;code&gt;prompt_cache_key&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;In multi-tenant agents, identical system prompts across different workspaces can create confusing cache metrics. In live probes, repeating a prompt with the same &lt;code&gt;prompt_cache_key&lt;/code&gt; hit cached tokens, while switching the key produced a clean miss. Treat &lt;code&gt;prompt_cache_key&lt;/code&gt; as a deliberate namespace (for example, &lt;code&gt;org-id:workflow-v1&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-migration checklist
&lt;/h2&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="nl"&gt;"strip_params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"top_p"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"frequency_penalty"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"presence_penalty"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"allowed_reasoning_effort"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"low"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"medium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"high"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"xhigh"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"allowed_verbosity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"low"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"medium"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"high"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"monitor_input_tokens_above"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;272000&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That last threshold (&lt;code&gt;272000&lt;/code&gt;) is worth alerting on as well: both models accept up to 1.05M context tokens, but prompts above 272K input tokens move into the long-context pricing band.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://openai.com/index/introducing-gpt-6-2-astra-sol/" rel="noopener noreferrer"&gt;OpenAI: Introducing GPT-6.2 Astra and Sol&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>openai</category>
      <category>llm</category>
      <category>api</category>
      <category>ai</category>
    </item>
    <item>
      <title>JSON.parse can succeed without returning an object</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Wed, 18 Nov 2026 07:07:53 +0000</pubDate>
      <link>https://dev.to/routerbase_com/jsonparse-can-succeed-without-returning-an-object-55c2</link>
      <guid>https://dev.to/routerbase_com/jsonparse-can-succeed-without-returning-an-object-55c2</guid>
      <description>&lt;p&gt;A response can be valid JSON and still have the wrong shape for your adapter. JSON.parse accepts arrays, strings and null as well as objects. Parsing success alone does not establish that a property lookup is meaningful.&lt;/p&gt;

&lt;p&gt;This offline fixture draws one small boundary: the adapter expects a non-null object and rejects arrays. It is not a full response schema.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;assert&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'node:assert/strict'&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;readObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&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="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'object'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&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="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TypeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Expected a JSON object'&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="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deepEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;readObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'{"status":"pending"}'&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;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'pending'&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="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="n"&gt;text&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'null'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'[]'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'"pending"'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'42'&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;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;throws&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;readObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;TypeError&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;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;throws&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;readObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'{'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SyntaxError&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 last assertion covers invalid JSON. The four earlier failures cover valid JSON with an unexpected top-level type. Keep these cases separate when reporting an error; they require different fixes.&lt;/p&gt;

&lt;p&gt;Once the object boundary is established, validate required fields and their types against the actual endpoint contract. This helper does not validate a status vocabulary, prove that a job exists, or establish that a result is ready.&lt;/p&gt;

&lt;p&gt;The assertions were run locally with Node.js. They make no network requests and do not test a model or provider. Generated with AI; published by the RouterBase team.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" rel="noopener noreferrer"&gt;JSON.parse reference&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Test a model-picker rename with a request fixture</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Tue, 17 Nov 2026 07:15:43 +0000</pubDate>
      <link>https://dev.to/routerbase_com/test-a-model-picker-rename-with-a-request-fixture-33c0</link>
      <guid>https://dev.to/routerbase_com/test-a-model-picker-rename-with-a-request-fixture-33c0</guid>
      <description>&lt;p&gt;A display label is editable copy. A model ID is request data. When a UI uses the displayed text as its identifier, a harmless copy update can change the request it sends. Keep the ID in configuration and snapshot it in the job record.&lt;/p&gt;

&lt;p&gt;This local JavaScript fixture checks that a label-only change produces the same request data. The identifier is a placeholder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;assert&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'node:assert/strict'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Draft model'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'provider/model-a'&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="n"&gt;buildRequest&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="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;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;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;id&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;beforeRename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;buildRequest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&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="n"&gt;afterRename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;buildRequest&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;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'New display name'&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;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deepEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;afterRename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;beforeRename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;assert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;equal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;beforeRename&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'provider/model-a'&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;In an application test, assert the actual outgoing request body. For an intentional ID migration, write a separate test that checks the next request uses the new ID and the historical record still shows the old one.&lt;/p&gt;

&lt;p&gt;Generated with AI for RouterBase. The example is an offline fixture and sends no network request.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Keep the HTTP status and JSON error code separate in your AI API adapter</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 02 Nov 2026 03:45:58 +0000</pubDate>
      <link>https://dev.to/routerbase_com/keep-the-http-status-and-json-error-code-separate-in-your-ai-api-adapter-j7p</link>
      <guid>https://dev.to/routerbase_com/keep-the-http-status-and-json-error-code-separate-in-your-ai-api-adapter-j7p</guid>
      <description>&lt;p&gt;An adapter label such as &lt;code&gt;provider_rejected_402&lt;/code&gt; leaves an important question unanswered: did the server send HTTP 402, or did the adapter find 402 inside a JSON body?&lt;/p&gt;

&lt;p&gt;Those are different observations. If the adapter merges them, the next person debugging the request has to guess what actually happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Save a small diagnostic record before choosing a remedy
&lt;/h2&gt;

&lt;p&gt;For an error response, start with four fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The HTTP status returned by your HTTP client.&lt;/li&gt;
&lt;li&gt;A numeric error code found in the JSON, if present.&lt;/li&gt;
&lt;li&gt;A server request ID, when available.&lt;/li&gt;
&lt;li&gt;Whether the response body was a JSON object, another JSON value, invalid JSON, or too large for this example to parse.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RouterBase's &lt;a href="https://docs.routerbase.com/essentials/errors" rel="noopener noreferrer"&gt;error reference&lt;/a&gt; documents both nested and top-level JSON error shapes, along with &lt;code&gt;x-request-id&lt;/code&gt; for correlating a request. Keep the transport status in its own field rather than replacing it with a value from the body.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Python example you can run without calling a model
&lt;/h2&gt;

&lt;p&gt;This function summarizes response data you supply. It makes no network requests and needs no API key. The example response is synthetic.&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="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Offline example: summarize a supplied error response; never call an API.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;summarize_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http_status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="n"&gt;body_kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;too_large&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;body_kind&lt;/span&gt; &lt;span class="o"&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="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;non_object&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;
        &lt;span class="nf"&gt;except &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;RecursionError&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;body_kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;invalid_json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&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;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;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;
    &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fields&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;code&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="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isascii&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isdigit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;599&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

    &lt;span class="n"&gt;normalized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
    &lt;span class="n"&gt;request_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;normalized&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;x-request-id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;payload&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;request_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;request_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;request_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;http_status&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_numeric_code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;request_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;request_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;body_kind&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;body_kind&lt;/span&gt;&lt;span class="p"&gt;,&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;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&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="nf"&gt;summarize_error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="mi"&gt;402&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;X-Request-ID&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;00000000-0000-4000-8000-000000000001&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;error&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;:402,&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="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Synthetic example&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;}}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output keeps &lt;code&gt;http_status&lt;/code&gt; and &lt;code&gt;json_numeric_code&lt;/code&gt; as separate values. In the synthetic example both are 402. If you supply HTTP 200 and a body containing &lt;code&gt;{"code":402}&lt;/code&gt;, it preserves both values; that is an adapter test case, not a claim that RouterBase returns that combination.&lt;/p&gt;

&lt;p&gt;The function deliberately omits error messages, prompts, request bodies, and authorization headers. It accepts only numeric codes in the 100–599 range and UUID-shaped request IDs. String error categories are left out of this small example. A missing value remains &lt;code&gt;None&lt;/code&gt;; it is not replaced with a guessed cause.&lt;/p&gt;

&lt;p&gt;This is a limited diagnostic summary, not a general redaction system or a complete response validator. Pass the actual integer status from your HTTP client, string header names and a text body. Bound the response read in your HTTP client too: the length check here happens after the body has reached the function.&lt;/p&gt;

&lt;h2&gt;
  
  
  A status is a starting point
&lt;/h2&gt;

&lt;p&gt;For RouterBase organization requests, the &lt;a href="https://docs.routerbase.com/essentials/organizations" rel="noopener noreferrer"&gt;organization guide&lt;/a&gt; describes 402 responses for an insufficient organization wallet and for member spending limits. The HTTP status alone does not distinguish those cases. Read the specific error in a protected debugging context, then check the relevant account scope and limits.&lt;/p&gt;

&lt;p&gt;Avoid making automatic changes to spending caps just because an adapter emitted a generic billing label. Likewise, a successful catalog lookup does not validate a later generation request.&lt;/p&gt;

&lt;p&gt;When escalating an issue, include the timestamp with its time zone, endpoint path, HTTP status, and request ID. Review any error text separately before sharing it. Keep credentials and private inputs out of a public support message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the adapter with fixtures first
&lt;/h2&gt;

&lt;p&gt;Use a nested error object, a top-level numeric code, an HTML error page, a JSON array, and an oversized body. Verify that a mismatch between transport status and body code stays visible.&lt;/p&gt;

&lt;p&gt;We checked this example locally with synthetic inputs, including malformed JSON and an invalid request ID. No inference request was sent, and no model performance or billing behavior was tested.&lt;/p&gt;

&lt;p&gt;We are the RouterBase team. Explore &lt;a href="https://routerbase.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=2026_11_error_evidence&amp;amp;utm_content=rb_20261102_error_evidence_dev_v01" rel="noopener noreferrer"&gt;RouterBase&lt;/a&gt; for an OpenAI-compatible API for AI models.&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>debugging</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Kimi K3.1 Pro is now available on RouterBase: a Python starting point</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 26 Oct 2026 06:39:28 +0000</pubDate>
      <link>https://dev.to/routerbase_com/kimi-k31-pro-is-now-available-on-routerbase-a-python-starting-point-4m5g</link>
      <guid>https://dev.to/routerbase_com/kimi-k31-pro-is-now-available-on-routerbase-a-python-starting-point-4m5g</guid>
      <description>&lt;p&gt;Kimi K3.1 Pro and Kimi K3.1 Pro Highspeed are now available on RouterBase. Both list a 1,048,576-token context window, text and image inputs, and support for tools and reasoning parameters. Highspeed is the faster-output option.&lt;/p&gt;

&lt;p&gt;For a simple text request, install the &lt;code&gt;openai&lt;/code&gt; Python package, set &lt;code&gt;ROUTERBASE_API_KEY&lt;/code&gt; in your environment, and use RouterBase's OpenAI-compatible chat-completions endpoint:&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;ROUTERBASE_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://routerbase.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;moonshotai/kimi-k3.1-pro&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;Explain how a Python dictionary works.&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="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;To select Highspeed, use &lt;code&gt;moonshotai/kimi-k3.1-pro-highspeed&lt;/code&gt; as the model ID. Keep the period in &lt;code&gt;k3.1&lt;/code&gt;; the website's URL uses a different spelling.&lt;/p&gt;

&lt;p&gt;The example sends one text message. Image input and tools require their own request fields. If you already have an OpenAI-compatible client, review its default parameters when adding either model.&lt;/p&gt;

&lt;p&gt;Explore the new additions at &lt;a href="https://routerbase.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=2026_10_k31&amp;amp;utm_content=rb_20261026_k31_dev_v02" rel="noopener noreferrer"&gt;RouterBase&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Nano Banana 2.1 on RouterBase: build around the generation ID</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 19 Oct 2026 08:04:42 +0000</pubDate>
      <link>https://dev.to/routerbase_com/nano-banana-21-on-routerbase-build-around-the-generation-id-408e</link>
      <guid>https://dev.to/routerbase_com/nano-banana-21-on-routerbase-build-around-the-generation-id-408e</guid>
      <description>&lt;p&gt;An image API integration needs a clear boundary between accepting a request and displaying its result. For Nano Banana 2.1 on RouterBase, that boundary is the generation ID. The initial response is a pending task, not the finished image.&lt;/p&gt;

&lt;p&gt;This guide follows RouterBase documentation checked on October 19, 2026. The example has not been executed; it is not a generation test or a claim about output quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Submit the task
&lt;/h2&gt;

&lt;p&gt;Use the task-specific API model ID. The text-to-image model is &lt;code&gt;google/gemini-nano-banana-2.1-t2i&lt;/code&gt;; the editing model is &lt;code&gt;google/gemini-nano-banana-2.1-edit&lt;/code&gt;. A model-page URL is a navigation address, not a value for the &lt;code&gt;model&lt;/code&gt; field.&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://routerbase.com/v1/images/generations &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;$ROUTERBASE_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;-H&lt;/span&gt; &lt;span class="s2"&gt;"Idempotency-Key: nb21-your-unique-operation-id"&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":"google/gemini-nano-banana-2.1-t2i","prompt":"A ceramic cup on a plain background","size":"1K","n":1,"thinking_level":"medium"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the environment variable in your server environment. Replace the example idempotency key with a unique value for each new generation, and retain that value when retrying the same operation. The documentation recommends this header to avoid creating a second generation after a connection interruption.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collect the result
&lt;/h2&gt;

&lt;p&gt;Store the returned &lt;code&gt;id&lt;/code&gt;, then request &lt;code&gt;GET https://routerbase.com/v1/images/generations/{id}&lt;/code&gt; with the same Bearer authentication. Treat &lt;code&gt;pending&lt;/code&gt; as unfinished work. When status becomes &lt;code&gt;success&lt;/code&gt;, read &lt;code&gt;data[0].url&lt;/code&gt;. When it becomes &lt;code&gt;failed&lt;/code&gt;, read &lt;code&gt;error_message&lt;/code&gt; and show an appropriate failure state.&lt;/p&gt;

&lt;p&gt;Give polling an interval and a stopping condition in your application. A local wait ending should not cause the interface to claim that the remote generation failed. Keep the ID available so a user can return to the task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add options deliberately
&lt;/h2&gt;

&lt;p&gt;The documented sizes are &lt;code&gt;1K&lt;/code&gt;, &lt;code&gt;2K&lt;/code&gt; and &lt;code&gt;4K&lt;/code&gt;; &lt;code&gt;n&lt;/code&gt; must be &lt;code&gt;1&lt;/code&gt;. Thinking levels are &lt;code&gt;minimal&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt; and &lt;code&gt;high&lt;/code&gt;. Web search and image search are optional. For editing, supply one to fourteen reference images through &lt;code&gt;image_urls&lt;/code&gt; and describe how each should contribute.&lt;/p&gt;

&lt;p&gt;Polling is not the only delivery option: the docs also describe an HTTPS callback and SSE. SSE carries the final image when complete; it does not provide progressive previews. Choose delivery separately from the visual settings, then test both state handling and the actual image before relying on the integration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://routerbase.com/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=nano_banana_21_20261019&amp;amp;utm_content=rb_20261019_nb21_dev_v01" rel="noopener noreferrer"&gt;Explore RouterBase&lt;/a&gt;. &lt;a href="https://docs.routerbase.com/google-gemini-nano-banana-2-1-api/text-to-image" rel="noopener noreferrer"&gt;Text-to-image reference&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Build a minimal Seedance 2.5 request and poll its result</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Thu, 08 Oct 2026 06:09:14 +0000</pubDate>
      <link>https://dev.to/routerbase_com/build-a-minimal-seedance-25-request-and-poll-its-result-47ne</link>
      <guid>https://dev.to/routerbase_com/build-a-minimal-seedance-25-request-and-poll-its-result-47ne</guid>
      <description>&lt;p&gt;Seedance 2.5 is available on RouterBase in text-to-video and image-to-video modes. A minimal integration needs an explicit payload and an asynchronous result handler. Here is a text-to-video request shape to begin with.&lt;/p&gt;

&lt;p&gt;Explore RouterBase: &lt;a href="https://routerbase.com/" rel="noopener noreferrer"&gt;https://routerbase.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Submit a single shot
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;bytedance/seedance-2-5-t2v&lt;/code&gt;. The following body specifies the ratio, resolution, duration, and audio choice rather than leaving those decisions implicit:&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;"bytedance/seedance-2-5-t2v"&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;"A ceramic cup on a wooden table. Steam rises slowly. The camera gently moves closer."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"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;"16:9"&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;"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;5&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;false&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;Send it to &lt;code&gt;POST https://routerbase.com/v1/videos/generations&lt;/code&gt; with authorization supplied from your server environment. The example describes a proposed request; no generated clip accompanies it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the job ID
&lt;/h2&gt;

&lt;p&gt;The initial response returns an ID and a pending status. Save the ID, then request &lt;code&gt;GET /v1/videos/generations/{id}&lt;/code&gt;. Check for a terminal status before accessing the video URL. On success, the documented response contains &lt;code&gt;data[0].url&lt;/code&gt;; on failure, keep the error information available for diagnosis.&lt;/p&gt;

&lt;p&gt;Give the interface a pending state and distinguish an unsuccessful submission from a failed generation. A timeout in your own client does not establish that the remote job failed. Retaining the ID lets you investigate the original job rather than blindly starting another one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Change the mode deliberately
&lt;/h2&gt;

&lt;p&gt;For image-to-video, change the model ID, provide one public HTTPS first-frame URL in &lt;code&gt;image_urls&lt;/code&gt;, and use &lt;code&gt;ratio: "adaptive"&lt;/code&gt;. Choose 720p or 1080p; the 480p tier belongs to text-to-video. Crop the first frame before submitting if you need a particular shape. Do not send &lt;code&gt;seed&lt;/code&gt;: RouterBase’s documentation says the upstream does not support it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Match the request to the mode
&lt;/h2&gt;

&lt;p&gt;RouterBase lists &lt;code&gt;bytedance/seedance-2-5-t2v&lt;/code&gt; and &lt;code&gt;bytedance/seedance-2-5-i2v&lt;/code&gt;. Both use &lt;code&gt;/v1/videos/generations&lt;/code&gt; and return a pending task ID. Poll that endpoint with the ID until success or failure. Send &lt;code&gt;ratio&lt;/code&gt; explicitly: text mode accepts fixed ratios, while image mode requires &lt;code&gt;adaptive&lt;/code&gt; and exactly one public HTTPS image in &lt;code&gt;image_urls&lt;/code&gt;. Both support 4–30 seconds and optional native audio.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.routerbase.com/bytedance-seedance-2-5-api/text-to-video" rel="noopener noreferrer"&gt;Read the RouterBase implementation guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Disclosure: This article was drafted with AI assistance and reviewed against RouterBase's public documentation. The examples describe proposed requests; no generation test results are presented.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Handle GPT Image 2.5 as an asynchronous job</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Thu, 08 Oct 2026 06:08:08 +0000</pubDate>
      <link>https://dev.to/routerbase_com/handle-gpt-image-25-as-an-asynchronous-job-3ei3</link>
      <guid>https://dev.to/routerbase_com/handle-gpt-image-25-as-an-asynchronous-job-3ei3</guid>
      <description>&lt;p&gt;A working image feature needs to know what happens between submission and delivery. GPT Image 2.5 Flare and Sunburst are available on RouterBase; this guide focuses on that request lifecycle.&lt;/p&gt;

&lt;p&gt;Explore RouterBase: &lt;a href="https://routerbase.com/" rel="noopener noreferrer"&gt;https://routerbase.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a minimal payload
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;openai/gpt-image-2.5-flare-t2i&lt;/code&gt; for this example. Set &lt;code&gt;n&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt;, choose &lt;code&gt;size: "1024x1024"&lt;/code&gt;, and provide a concrete prompt such as: “A ceramic cup on a pale tabletop, soft window light, generous empty space on the right.” Keep your API key in a server-side environment variable.&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;"openai/gpt-image-2.5-flare-t2i"&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;"A ceramic cup on a pale tabletop, soft window light, generous empty space on the right"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"n"&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;"size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1024x1024"&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;h2&gt;
  
  
  Store state before rendering the result
&lt;/h2&gt;

&lt;p&gt;Treat the submission response as a job record. Store its ID with your own request record, and display a pending state in the interface. Show the returned image only after the task has succeeded. Keep submission errors separate from generation failures so users can tell whether their request was accepted.&lt;/p&gt;

&lt;p&gt;A dropped connection needs particular care. Keep the same idempotency key for a retry of the same job; a deliberate new generation needs a new key. Set an application timeout and a reasonable polling interval rather than continuously submitting duplicate work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review the first successful output
&lt;/h2&gt;

&lt;p&gt;Check that the file opens, that its dimensions suit your placement, and that the scene matches the brief. Record the payload and the returned task ID so you can investigate an issue later. This sample is a request shape, not a completed generation. Once the lifecycle works, change one parameter at a time to evaluate size, quality, or the Sunburst variant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the task and collect the result
&lt;/h2&gt;

&lt;p&gt;RouterBase lists GPT Image 2.5 Flare and Sunburst with separate text-to-image and edit IDs. For a new image, submit to &lt;code&gt;/v1/images/generations&lt;/code&gt;. The response supplies a generation ID while the task is pending. Save it, then poll &lt;code&gt;/v1/images/generations/{id}&lt;/code&gt;. When the status is &lt;code&gt;success&lt;/code&gt;, read &lt;code&gt;data[0].url&lt;/code&gt;; when it is &lt;code&gt;failed&lt;/code&gt;, inspect the error. Use an &lt;code&gt;Idempotency-Key&lt;/code&gt; when retrying the same submission.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.routerbase.com/openai-gpt-image-2-5-api/text-to-image" rel="noopener noreferrer"&gt;Read the RouterBase implementation guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Disclosure: This article was drafted with AI assistance and reviewed against RouterBase's public documentation. The examples describe proposed requests; no generation test results are presented.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Verify the Gemini 3.8 Flash model ID before your first request</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 14 Sep 2026 09:09:47 +0000</pubDate>
      <link>https://dev.to/routerbase_com/verify-the-gemini-38-flash-model-id-before-your-first-request-2k1e</link>
      <guid>https://dev.to/routerbase_com/verify-the-gemini-38-flash-model-id-before-your-first-request-2k1e</guid>
      <description>&lt;p&gt;Gemini 3.8 Flash is available through RouterBase. This tutorial is from the RouterBase team; the text and code were drafted with AI assistance.&lt;/p&gt;

&lt;p&gt;A model page URL and an API identifier are separate values. Before configuring a client, check the identifier your endpoint actually lists. For this model, the current RouterBase catalog uses &lt;code&gt;google/gemini-3.8-flash&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a read-only catalog check
&lt;/h2&gt;

&lt;p&gt;The following JavaScript needs a runtime with built-in fetch. It reads public metadata; it does not send a prompt or require an API key.&lt;br&gt;
&lt;/p&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;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://routerbase.com/v1/models&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Catalog HTTP &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unexpected catalog response&lt;/span&gt;&lt;span class="dl"&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;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;google/gemini-3.8-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Gemini 3.8 Flash is absent from the catalog&lt;/span&gt;&lt;span class="dl"&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;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This check was run on September 14, 2026 and returned the expected identifier. If the endpoint fails, the response has a different shape, or the identifier is absent, the script stops. It does not silently choose a replacement model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure the application separately
&lt;/h2&gt;

&lt;p&gt;Set your OpenAI-compatible client's base URL to &lt;code&gt;https://routerbase.com/v1&lt;/code&gt;. Supply your RouterBase API key through a server-side environment variable, and set the model field to the exact catalog identifier. See the current API documentation for the request format.&lt;/p&gt;

&lt;p&gt;Keep configuration errors separate from output errors. A catalog lookup cannot validate a later authenticated request. Likewise, receiving an answer does not prove that the answer meets the application's requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the first prompt a testable goal
&lt;/h2&gt;

&lt;p&gt;Try a short function explanation. Include the function and ask for its inputs, outputs, and one edge case. Check every claim against the code. If the function returns a sentinel value or throws an error, the explanation should preserve that behavior.&lt;/p&gt;

&lt;p&gt;Save the prompt version, model ID, and result. These records make a later comparison useful: you can change one variable and see which requirement improved. No inference benchmark or latency measurement is claimed here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://routerbase.com/models/google/gemini-3-8-flash" rel="noopener noreferrer"&gt;Model details&lt;/a&gt; · &lt;a href="https://docs.routerbase.com/" rel="noopener noreferrer"&gt;API documentation&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
    </item>
    <item>
      <title>Check the API catalog before configuring DeepSeek V4.1 Flash</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 14 Sep 2026 04:00:45 +0000</pubDate>
      <link>https://dev.to/routerbase_com/check-the-api-catalog-before-configuring-deepseek-v41-flash-5dgn</link>
      <guid>https://dev.to/routerbase_com/check-the-api-catalog-before-configuring-deepseek-v41-flash-5dgn</guid>
      <description>&lt;p&gt;Disclosure: this guide is from the RouterBase team.&lt;/p&gt;

&lt;p&gt;DeepSeek V4.1 Flash is now available on RouterBase. One integration detail is easy to miss: a model page's URL slug is not necessarily its API identifier. For this model, the catalog returns &lt;code&gt;deepseek/deepseek-v4.1-flash&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the identifier without running inference
&lt;/h2&gt;

&lt;p&gt;Save the following as &lt;code&gt;check-model.mjs&lt;/code&gt; and run it with Node.js 18 or later. It requests the public catalog; it does not send a prompt or require an API key.&lt;br&gt;
&lt;/p&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;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://routerbase.com/v1/models&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Catalog HTTP &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&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;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;deepseek/deepseek-v4.1-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Model is absent from the catalog&lt;/span&gt;&lt;span class="dl"&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;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pricing&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On September 14, 2026, the catalog returned that exact ID and listed $0.30 per million input tokens and $1.20 per million output tokens. A successful catalog lookup confirms the listing, not the quality or latency of a generated answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure the client separately
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;https://routerbase.com/v1&lt;/code&gt; as the base URL and the exact catalog ID as the model. Provide your RouterBase API key through a server-side environment variable. Do not substitute the model page slug or an upstream provider alias.&lt;/p&gt;

&lt;p&gt;If the identifier disappears from a future catalog response, stop and inspect the current documentation rather than silently choosing another model. After configuration, run a small application-level evaluation with representative prompts and explicit acceptance criteria.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://routerbase.com/models/deepseek/deepseek-v4-1-flash?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=2026_09_deepseek_v41_flash&amp;amp;utm_content=rb_20260914_dsv41_dev_v01" rel="noopener noreferrer"&gt;DeepSeek V4.1 Flash model details&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sources: &lt;a href="https://docs.routerbase.com/" rel="noopener noreferrer"&gt;RouterBase API documentation&lt;/a&gt; and the &lt;a href="https://routerbase.com/v1/models" rel="noopener noreferrer"&gt;public model catalog&lt;/a&gt;. Pricing checked September 14, 2026.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Check the Exact H3 Max Model IDs Before You Integrate</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 07 Sep 2026 09:56:53 +0000</pubDate>
      <link>https://dev.to/routerbase_com/check-the-exact-h3-max-model-ids-before-you-integrate-4lfg</link>
      <guid>https://dev.to/routerbase_com/check-the-exact-h3-max-model-ids-before-you-integrate-4lfg</guid>
      <description>&lt;p&gt;MiniMax H3 Max is available on RouterBase in text-to-video and image-to-video modes. Before wiring it into an application, check the API model IDs rather than copying a model-page URL.&lt;/p&gt;

&lt;p&gt;On September 7, 2026, RouterBase’s public catalog returned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;minimax/minimax-h3-max-t2v&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;minimax/minimax-h3-max-i2v&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A read-only catalog check
&lt;/h3&gt;

&lt;p&gt;This Node.js script checks both IDs without submitting a generation job:&lt;br&gt;
&lt;/p&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;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;minimax/minimax-h3-max-t2v&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;minimax/minimax-h3-max-i2v&lt;/span&gt;&lt;span class="dl"&gt;"&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;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://routerbase.com/v1/models&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Catalog HTTP &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Unexpected catalog response&lt;/span&gt;&lt;span class="dl"&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;available&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&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;missing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;available&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&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="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Missing: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Both H3 Max model IDs are present.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save it as &lt;code&gt;check-h3-max.mjs&lt;/code&gt; and run it in a Node.js runtime with built-in fetch. This verifies catalog presence; it does not test generation latency or output quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pick the input workflow
&lt;/h3&gt;

&lt;p&gt;Use text-to-video for a scene described from scratch. Use image-to-video when a still image should anchor the opening frame. RouterBase’s pages list 5–15 seconds, 480P or 768P, and synchronized audio.&lt;/p&gt;

&lt;p&gt;H3 Max is fal’s post-trained variant of MiniMax H3. Use RouterBase’s current request documentation when integrating; fal’s SDK examples describe fal’s API.&lt;/p&gt;

&lt;p&gt;Next: open the &lt;a href="https://routerbase.com/models/minimax/minimax-h3-max/text-to-video?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=2026_09_h3_max_live&amp;amp;utm_content=rb_20260907_h3max_dev_v01" rel="noopener noreferrer"&gt;text-to-video page&lt;/a&gt; or &lt;a href="https://routerbase.com/models/minimax/minimax-h3-max/image-to-video?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=2026_09_h3_max_live&amp;amp;utm_content=rb_20260907_h3max_dev_v01" rel="noopener noreferrer"&gt;image-to-video page&lt;/a&gt; and review the required inputs before a paid generation.&lt;/p&gt;

&lt;p&gt;Sources: &lt;a href="https://routerbase.com/v1/models" rel="noopener noreferrer"&gt;RouterBase catalog&lt;/a&gt;, &lt;a href="https://blog.fal.ai/introducing-h3-max-by-fal/" rel="noopener noreferrer"&gt;fal release&lt;/a&gt;, &lt;a href="https://www.minimax.io/blog/minimax-h3" rel="noopener noreferrer"&gt;MiniMax H3&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Three AI Video Inputs, One Integration Boundary: Shipping MiniMax H3 on RouterBase</title>
      <dc:creator>RouterBase</dc:creator>
      <pubDate>Mon, 03 Aug 2026 10:33:39 +0000</pubDate>
      <link>https://dev.to/routerbase_com/three-ai-video-inputs-one-integration-boundary-shipping-minimax-h3-on-routerbase-41eo</link>
      <guid>https://dev.to/routerbase_com/three-ai-video-inputs-one-integration-boundary-shipping-minimax-h3-on-routerbase-41eo</guid>
      <description>&lt;p&gt;MiniMax H3 is now available on RouterBase through three video-generation routes: text-to-video, image-to-video, and reference-to-video.&lt;/p&gt;

&lt;p&gt;Those labels sound like three separate products. From an application architecture perspective, they are better treated as three input contracts around the same asynchronous job lifecycle.&lt;/p&gt;

&lt;p&gt;The lifecycle is familiar:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Submit a generation job.&lt;/li&gt;
&lt;li&gt;Store the returned task identifier.&lt;/li&gt;
&lt;li&gt;Poll until the task reaches a terminal state.&lt;/li&gt;
&lt;li&gt;Retrieve the completed video URL.&lt;/li&gt;
&lt;li&gt;Copy the asset into storage you control if the result needs to remain available.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What changes is the context you send at step one.&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;text-to-video&lt;/strong&gt; when the scene can be described from scratch. It is the cleanest route for exploration, storyboard alternatives, and prompts where no existing visual identity needs to survive.&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;image-to-video&lt;/strong&gt; when you already have the opening visual. The source image becomes the anchor, while the prompt should describe motion, camera behavior, and what must remain unchanged.&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;reference-to-video&lt;/strong&gt; when the input is guidance rather than the literal first frame. This is the better fit for a subject, product, or visual style that should influence the generated clip.&lt;/p&gt;

&lt;p&gt;On RouterBase, the currently published MiniMax H3 routes support 2K output and 6- or 10-second clips. That is a narrower product contract than every capability described in MiniMax’s own H3 documentation, so production code should follow the RouterBase route you are actually calling—not assume that every upstream option is already exposed.&lt;/p&gt;

&lt;p&gt;A useful abstraction is to keep your queue, polling, timeout, retry, storage, and audit logic independent from the selected input mode. Then changing from a prompt to a source image is a request-shape decision, not a second integration project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Explore the live routes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Text-to-video: &lt;a href="https://routerbase.com/models/minimax/minimax-h3/text-to-video" rel="noopener noreferrer"&gt;https://routerbase.com/models/minimax/minimax-h3/text-to-video&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Image-to-video: &lt;a href="https://routerbase.com/models/minimax/minimax-h3/image-to-video" rel="noopener noreferrer"&gt;https://routerbase.com/models/minimax/minimax-h3/image-to-video&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Reference-to-video: &lt;a href="https://routerbase.com/models/minimax/minimax-h3/reference-to-video" rel="noopener noreferrer"&gt;https://routerbase.com/models/minimax/minimax-h3/reference-to-video&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The practical question is no longer only “Which video model should we call?” It is also “What context do we already have, and what role should that context play?”&lt;/p&gt;

</description>
      <category>video</category>
      <category>ai</category>
      <category>webdev</category>
      <category>api</category>
    </item>
  </channel>
</rss>
