Sume SDK function name for an endpoint: the camelCase operationId
GET /v1/catalog is listPublicApiCapabilities in @sume-com/sdk. Map any Sume route to its generated function from the OpenAPI operationId, with a table.

In @sume-com/sdk the function for an endpoint is named after the endpoint's OpenAPI operationId, written in camelCase. So GET /v1/catalog is not getCatalog; it is listPublicApiCapabilities, because that is its operation id in the schema. If a method you expect is missing from autocomplete, search the OpenAPI by path and read the id, not the URL.
The TypeScript SDK page says it directly: a generator makes every export other than the hand-written helpers from the same schema, there is one function per operation, and the function name is the operation id. This post shows how to turn a path into a name in about a minute.
Where the name comes from
The schema at apps/docs/public/api/openapi.json holds 183 operations as of the 2026-10-10 read, each with an operationId. The docs site publishes the same schema, and the API reference is rendered from it. The SDK generator turns each id into one exported function.
Most ids are already camelCase, so the function name is identical. A group of ids is written in snake_case in the schema, such as the Firecrawl and ScrapeCreators routes. For those the generated function is the camelCase form, so firecrawl_scrape becomes firecrawlScrape.
Path to function name, read 2026-10-10
The first row is the one that trips people up. The route is called catalog, but the operation is named for what it returns, the public API capabilities. The video routes are the second surprise: they are createVideoGeneration and getVideoGeneration, not generateVideo.
| Method and path | operationId in the schema | SDK function |
|---|---|---|
| GET /v1/catalog | listPublicApiCapabilities | listPublicApiCapabilities |
| GET /v1/formats | listFormats | listFormats |
| POST /v1/formats/{format_id}/runs | createFormatRun | createFormatRun |
| GET /v1/format-runs/{run_id} | getFormatRun | getFormatRun |
| POST /v1/videos | createVideoGeneration | createVideoGeneration |
| GET /v1/videos/{id} | getVideoGeneration | getVideoGeneration |
| POST /v1/image-1.0/generate | generateImageV1 | generateImageV1 |
| POST /v1/firecrawl/scrape | firecrawl_scrape | firecrawlScrape |
| POST /v1/scrapecreators/instagram_profile | scrapecreators_instagram_profile | scrapecreatorsInstagramProfile |
Find the id for any route
Do not guess from the URL. Look the route up in the schema, and use the string you find. A short script over the JSON does it, and the same file is what the docs site publishes.
The pattern works for every route, including the ones in the table above. Once you have the id, convert any underscores to camelCase and import that name from the package.
- Open
apps/docs/public/api/openapi.json, or the schema served from the reference page. - Find the path and method, and read the
operationIdon it. - If the id contains underscores, camelCase it:
firecrawl_crawl_getisfirecrawlCrawlGet. - Import the name from
@sume-com/sdkand pass the client you created.
Call it, and read the result
Create the client once, and pass it on every call. The default client in the package has no key and exists only so the generated code compiles. The client sends x-api-key only, so do not add an Authorization header yourself, because the API refuses a request that carries both.
Generated functions do not throw on an API error. They resolve with { data, error, response }, so check error before you use data. The hand-written polling helpers behave differently and do throw, which is a reason to keep the two styles apart in your own wrappers.
import { createSumeClient, listPublicApiCapabilities } from "@sume-com/sdk";
const client = createSumeClient({ apiKey: process.env.SUME_API_KEY! });
// GET /v1/catalog -> operationId listPublicApiCapabilities
const { data, error, response } = await listPublicApiCapabilities({ client });
if (error) {
console.error(response.status, error);
} else {
console.log(data);
}What the names do not tell you
A function name says nothing about cost or scope. A video route spends credits, and a key needs the right scopes for its routes, which are fixed at creation. Read the authentication docs before you pick a key for a script.
For a long job, use the helpers rather than hand-rolling a loop. The same SDK page lists waitForRun, waitForJob and subscribeFormatRun. Keep the generated names in one thin module in your codebase, so a renamed operation id shows up as a single compile error rather than a scatter of runtime failures after an upgrade. Pin the package version as well, since the names follow the schema. See also job id or run id: which endpoint and helper to poll.
Sources
Related posts
More in Developers
- Sume STT words[] cap: what words_truncated and words_total mean
Sume STT returns word timings capped at 20,000 entries and sets words_truncated and words_total when it hits the cap. A 600-second job stays far below it.
- POST /v1/trending-research: Reels and TikTok niche search over REST
One call returns up to 24 ranked public short videos for a niche from Instagram and TikTok at $0.10 per accepted search. Fields, limits and a Python example.
- Sume TTS 400 tts_language_script_mismatch: Korean encoding check
Sume TTS rejects language ko when the transcript has no Hangul syllable: 400 tts_language_script_mismatch, no charge. Usually the text was decoded wrongly.
- Sume waitForJob in TypeScript: ms timeout, failed jobs resolve
waitForJob in @sume-com/sdk takes milliseconds, resolves for failed and canceled jobs, and throws only on timeout or a failed read. 25-line sample.
Written by Sume