Skip to content

fix: type the generate request as the fields generation uses - #154

Merged
dazzatronus merged 1 commit into
mainfrom
derk/generation-asset-schema
Oct 1, 2026
Merged

dazzatronus merged 1 commit into
mainfrom
derk/generation-asset-schema

Conversation

@dazzatronus

Copy link
Copy Markdown
Contributor

The Generate Asset reference listed about 40 clip settings and had lost its parameter names. The request reused the timeline ImageAsset, VideoAsset and AudioAsset schemas, so the reference and the published types offered crop, trim, volume and chroma key, none of which affect a generated asset, and showed prompt and the body as optional. The oneOf also rendered as unnamed rows, and the reference's clean-up script, which drops any column holding one, removed every parameter name with it.

GenerationAsset holds only what generation reads: type, prompt, model and options. It is one schema rather than one per type because the types differ only in default model and options, which GET /models documents.

The API accepts the same payloads as before; only the published request type narrows. No released SDK includes /generate.

Verify: pnpm build && pnpm test && pnpm test:examples && pnpm test:smoke, then pnpm build:docs. Generate Asset lists named rows for asset, type, prompt, model, options and length.

Risk: TypeScript code that builds the generate body from the timeline asset types stops type-checking.

@dazzatronus
dazzatronus merged commit b3534fb into main Oct 1, 2026
1 check passed
@dazzatronus
dazzatronus deleted the derk/generation-asset-schema branch October 1, 2026 00:22
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.21.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant