<?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: Jackson</title>
    <description>The latest articles on DEV Community by Jackson (@jackson_def719af7dc64ef1f).</description>
    <link>https://dev.to/jackson_def719af7dc64ef1f</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%2F4263930%2Fcef6bcc4-9944-4a19-8e6e-11d783878478.png</url>
      <title>DEV Community: Jackson</title>
      <link>https://dev.to/jackson_def719af7dc64ef1f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jackson_def719af7dc64ef1f"/>
    <language>en</language>
    <item>
      <title>One HTTP API for 25 image and video models: what we learned building Kerox</title>
      <dc:creator>Jackson</dc:creator>
      <pubDate>Wed, 25 Nov 2026 07:51:19 +0000</pubDate>
      <link>https://dev.to/jackson_def719af7dc64ef1f/one-http-api-for-25-image-and-video-models-what-we-learned-building-kerox-3bd4</link>
      <guid>https://dev.to/jackson_def719af7dc64ef1f/one-http-api-for-25-image-and-video-models-what-we-learned-building-kerox-3bd4</guid>
      <description>&lt;p&gt;Most teams that add image or video generation end up wiring three or four vendor SDKs: one for ByteDance Seedance, one for Seedream, one for Wan, one for Kling. Each has its own auth, its own polling model, its own error shape and its own price page that changes without notice.&lt;/p&gt;

&lt;p&gt;We built &lt;a href="https://kerox.ai" rel="noopener noreferrer"&gt;Kerox&lt;/a&gt; to flatten that into one call, and here is what the API surface looks like today.&lt;/p&gt;

&lt;h2&gt;
  
  
  One endpoint, then poll or get a webhook
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://kerox.ai/v1/tasks \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $KEROX_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"model":"seedream-5.5","input":{"prompt":"a paper boat on a rainy street"}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get a task id back. Then either poll &lt;code&gt;GET /v1/tasks/{id}&lt;/code&gt; or pass a callback URL and receive a signed webhook when the generation finishes. Outputs are hosted on a CDN for seven days, so you do not need your own bucket on day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Billing follows the task, not the request
&lt;/h2&gt;

&lt;p&gt;The part we cared most about: you are charged per successful generation, and the price for each model is shown before you generate. A failed or timed-out task is refunded in full. Estimated cost is held when you submit and settled when the task completes, on a prepaid USD balance that starts at $5 and does not expire. No subscription tier to outgrow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built for agents as well as people
&lt;/h2&gt;

&lt;p&gt;A growing share of our traffic is not a human reading docs but an agent looking for a tool. So the same catalog is exposed as &lt;code&gt;llms.txt&lt;/code&gt;, a markdown docs bundle, an OpenAPI spec and an MCP server, and there is a browser Studio that runs the same models on the same balance for people who do not want to write code at all.&lt;/p&gt;

&lt;p&gt;If you are picking a model for a product, the useful question is rarely "which vendor is best" but "which one is cheapest for this specific prompt at this resolution". A single API with a public price table per model makes that comparison a lookup instead of a spreadsheet.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>What we learned putting 25 image and video models behind one API</title>
      <dc:creator>Jackson</dc:creator>
      <pubDate>Wed, 25 Nov 2026 07:00:37 +0000</pubDate>
      <link>https://dev.to/jackson_def719af7dc64ef1f/what-we-learned-putting-25-image-and-video-models-behind-one-api-l4d</link>
      <guid>https://dev.to/jackson_def719af7dc64ef1f/what-we-learned-putting-25-image-and-video-models-behind-one-api-l4d</guid>
      <description>&lt;p&gt;Every image and video model comes with its own request format, its own polling behaviour, its own timeout policy and its own idea of what "done" means. If you are building a product on top of them, that variety is the real cost — not the per-image price.&lt;/p&gt;

&lt;p&gt;We built Kerox (&lt;a href="https://kerox.ai" rel="noopener noreferrer"&gt;https://kerox.ai&lt;/a&gt;) to hide that: one HTTP endpoint in front of 25 image and video models — ByteDance Seedance and Seedream, Alibaba Wan and Qwen Image, MiniMax, Kling, GPT Image and others. This post is the part that was not obvious from the outside: how we made a single job model survive models that fail in wildly different ways, and why we settled on "charge only for successful generations".&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape we standardised on
&lt;/h2&gt;

&lt;p&gt;Almost every provider either returns a result inline or gives you an id to poll. Video models are almost always the second kind, and their queue times vary from two seconds to a few minutes. We compressed both into one job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -X POST https://api.kerox.ai/v1/tasks \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $KEROX_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "model": "seedream-5.5",
    "input": { "prompt": "a paper boat on wet asphalt, 35mm" }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get back a task id, then either poll &lt;code&gt;GET /v1/tasks/{id}&lt;/code&gt; or receive a signed webhook. Outputs are served from our CDN for seven days. That is the whole contract; the model name is the only thing that changes between an image job and a video job.&lt;/p&gt;

&lt;p&gt;Two decisions inside that contract mattered more than the API surface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One status vocabulary.&lt;/strong&gt; Providers disagree about whether a task that timed out is "failed", "cancelled" or "still running". We collapse that into &lt;code&gt;succeeded&lt;/code&gt; / &lt;code&gt;failed&lt;/code&gt;, and a failure is final. Callers never have to write a state machine per model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The price is known before the job starts.&lt;/strong&gt; Every model has a public per-generation price, and the estimate is held against your balance at submit time. For a video model that charges per second, the estimate is computed from the requested duration. You can compare that price against the provider's official rate before you generate, which matters more than it sounds: the spread between models doing similar work is 10x, not 10%.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "refund on failure" is a design constraint, not a perk
&lt;/h2&gt;

&lt;p&gt;It is tempting to charge per request and let failed generations be part of the cost of doing business. We did the opposite: the estimated cost is held at submit, released or charged when the task resolves, and a failed or timed-out job is refunded in full.&lt;/p&gt;

&lt;p&gt;That sounds generous. In practice it is a forcing function. Once a failed job costs us money instead of the customer, the queue and retry logic get attention: we had to distinguish "provider is slow" from "provider is down", cap retries per task, and stop treating an upstream 5xx as a user error. The side effect is that our own success rate became a number we watch, which is the right incentive when you resell someone else's inference.&lt;/p&gt;

&lt;p&gt;There is no subscription and no free tier right now: you top up a USD balance from $5 and it does not expire. We also publish per-model pricing rather than a credit system, because "1 credit = 1 image" hides exactly the comparison developers want to make.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the API looks like for an agent, not just a person
&lt;/h2&gt;

&lt;p&gt;Most traffic to a service like this is now written by an assistant rather than typed by a human, and assistants are bad at guessing. So the documentation exists in the formats they can actually read: an OpenAPI spec, an &lt;code&gt;llms.txt&lt;/code&gt;, markdown docs, and an MCP server. The same account balance is shared by the API and a browser Studio, which is mostly useful for checking a prompt visually before wiring it into code.&lt;/p&gt;

&lt;p&gt;If you only take one thing from this post, take the pricing side: per-successful-generation pricing with a public price table turns a fuzzy "how much will this cost" question into a lookup, and it makes the provider's reliability the vendor's problem. That is the part we would keep if we started again.&lt;/p&gt;

&lt;p&gt;Kerox is at &lt;a href="https://kerox.ai" rel="noopener noreferrer"&gt;https://kerox.ai&lt;/a&gt; if you want to try the API; the model list and the official-vs-Kerox price comparison are public without an account.&lt;/p&gt;

</description>
      <category>videogeneration</category>
    </item>
  </channel>
</rss>
