generation API default parameters: Separate endpoint defaults from model defaults
The generation API default parameters are applied at more than one layer. The route chooses a model when model is nullish, while the selected provider schema fills omitted parameter values. A client that records only the visible form controls can miss both decisions.
Locate model selection
The image generation route defaults to nano-banana. The video generation route defaults to seedance-2.0-fast. An empty model string is not nullish and does not request that default; it reaches provider lookup as an unknown identifier.
An explicit model is preferable for reviewed production tasks and experiments. Store it in the serialized request so a later application or gateway default change cannot silently change the intended model. A model discovery response can help populate choices but is not a substitute for recording the choice.
Locate parameter filling
The image provider schemas default aspectRatio to 1:1 and n to one. They accept an optional integer seed, optional reference URLs, an optional negative prompt, and optional extra. The public image route does not map a resolution field, so there is no standard image resolution choice to recover by adding it beside prompt.
Seedance defaults to five seconds, 16:9, and 1080p. Kling defaults to five seconds, 16:9, and its literal 1080p resolution. Veo defaults to eight seconds, 16:9, and 1080p. These are implementation values from the current repository, not universal vendor defaults.
A missing optional property can reach a schema default because the routes delete undefined values. Explicit null is not generally the same operation. Aliased fields first pass through nullish selection, which can change which value reaches the schema.
Show the effective request
For a review screen, present the explicit model and effective standard parameters before approval. Distinguish user-selected values from defaults if that distinction matters to the workflow. Save the exact submitted body and, where available internally, parsed parameters after defaults.
When switching a form between models, revalidate the selected duration and resolution. Carrying ten seconds from Kling to Veo is invalid even though it looked acceptable before the switch. Do not hide the mismatch by silently replacing the user’s choice without showing the resulting request.
Defaults also affect cost. Pricing uses parsed parameters, so an omitted duration still leads to a concrete reservation. A preview based on blank controls rather than the effective request can understate the intended work.
Acceptance fixtures
Review the minimal valid request for each supported model, then add explicit values matching its defaults. Compare the expected normalized parameters and price inputs. Include empty model, null seed, and a field supported only by another endpoint.
Approve the form when the review matches the actual model and parsed choices, and restored drafts are revalidated. Continue with model discovery, null semantics, and pricing snapshots when implementing the audit record.
Continue with models and parameters
Where these facts come from
- codebase: src/app/api/v1/images/generations/route.ts
- codebase: src/app/api/v1/video/generations/route.ts
- codebase: src/ai/jobs/service.ts
- codebase: src/ai/providers/nano-banana.ts
- codebase: src/ai/providers/seedance.ts
- codebase: src/ai/providers/kling.ts
- codebase: src/ai/providers/veo3.ts
- Editorial keyword hypothesis; search volume not measured