Scalar API Reference for the Sume OpenAPI JSON, with a Try It key

Scalar renders an OpenAPI document as an interactive reference with a test client. Point it at the Sume spec, and keep the Bearer key out of the page source.

5 min readSume
All posts

The answer

Scalar's repository describes an interactive API reference generated from OpenAPI or Swagger documents, which includes an API testing tool and code examples for many languages. Give it Sume's spec at https://api.sume.com/reference/json and you get a browsable internal reference of the same operations.

Sume already hosts its own reference, so the reason to run Scalar is a private view: your wrapper routes, your examples, or an internal portal that combines Sume with your own API.

What Scalar gives you

The README lists a short set of properties. The ones that matter for a Sume reference are the renderer, the test client and the generated examples.

Scalar features from its README (read 2026-10-03)
FeatureWhy it helps with Sume
Renders OpenAPI/Swagger documentsShows all Jobs, image and media operations
Comes with an API testing toolSend a status read from the page
Generates code examples for many languagesShare a starter call with a teammate
Integrates with your favorite frameworkEmbed in an existing docs site

Handling the key

A Try It panel needs a credential. Enter your key at runtime in the panel, or have the page read it from a session you control, but never bake it into HTML or a public bundle. Sume accepts either a Bearer token or an x-api-key header, and sending both gives 401. Pick one and configure only that scheme in the panel.

A shared page that is open to everyone must not hold a real key at all. If many people will use it, make them paste their own.

What to expect in the reference

The document has 183 operations. The Jobs tag is the one to read first: it holds the list, read, status, result, cancel, webhook redeliver and events calls. The status response gives terminal, result_ready and next_poll_after_seconds; read them in the schema panel before you write polling code.

Try creates carefully. A create is a paid call. Set Idempotency-Key in the panel so a double click returns the same job rather than a second one.

Keep it current

A reference built from a fetched copy will age. Refetch on a schedule, and show the fetch date at the top of your page so readers know how fresh it is.

Adding your own context

The strongest reason to host your own reference is that you can add what the generated page cannot know: which model ids your product allows, which prompt templates you use, and which operations are off limits for your team. Put those in a short page next to the reference rather than editing the spec, so a refreshed spec never overwrites your notes.

Link out to Sume's own docs for the behaviours the spec only hints at, such as the jobs and results guide. The spec tells you the fields exist; the guide tells you how to use terminal, result_ready and the poll hints together.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume