Typed Sume video client from the OpenAPI JSON, after Sora

Sume publishes OpenAPI 3.0.3 at api.sume.com/reference/json. List the four video operations, then use the SDK's generated calls instead of hand-typing the wire.

4 min readSume
All posts

If you want a typed client to replace the one you generated for Sora, start from Sume's OpenAPI document at https://api.sume.com/reference/json, which is OpenAPI 3.0.3 and, when I read it on 2026-10-08, listed 171 paths. The video surface is four operations: createVideoGeneration, getVideoGeneration, getVideoGenerationContent and listVideoGenerationModels. The @sume-com/sdk package already ships calls generated from this document, so most teams do not need to run a generator at all.

I did not run a code generator for this post; the listing script below is what I ran against the document.

The four operations

These are the paths and operation ids in the document for video generation. A job can also be read through the generic jobs routes.

Video operations in the OpenAPI document, read 2026-10-08
Method and pathoperationIdReturns
POST /v1/videoscreateVideoGeneration202 with id, polling_url, status, model
GET /v1/videos/{id}getVideoGenerationthe job, with unsigned_urls once completed
GET /v1/videos/{id}/contentgetVideoGenerationContent302 redirect, or 409
GET /v1/videos/modelslistVideoGenerationModels{ data: [VideoModel] } with limits and pricing_skus

List them yourself

Run this as an ES module on Node 18 or later. It needs no key, because it reads the public document.

const res = await fetch("https://api.sume.com/reference/json");
const spec = await res.json();
console.log(spec.openapi, Object.keys(spec.paths).length, "paths");

for (const [path, item] of Object.entries(spec.paths)) {
  if (!path.startsWith("/v1/videos")) continue;
  for (const [method, op] of Object.entries(item)) {
    if (op && typeof op === "object" && op.operationId) {
      console.log(method.toUpperCase(), path, op.operationId);
    }
  }
}

Use the SDK instead of generating

The SDK exports the same four operations and returns an object with data, error and response, so a 400 does not throw. Its client sends x-api-key by default and points at https://api.sume.com unless you pass a baseUrl. Helpers that are not in the public document, such as uploadFile, are written by hand in the package, which is why a client generated from the JSON alone will not have them.

Pin the SDK version in your lockfile and re-read the document in CI if you do generate your own types, because a drift check is cheaper than a failed production call. The post on routes missing from the public document lists what to expect not to find.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume