Skip to content

File commands: edit, generate

The File Verbs edit, generate as CLI commands, with inputs, result, refusals and an example.

Reference for File, one group of File commands.

File.edit

Edit makes a new File from an existing one by instruction, such as upscaling or animating a still, and leaves the source unchanged. Verb page.

Text
npx startup-builder do File.edit --json '<input>' [--try | --send | --do]

Emits File.edited.

Inputs

InputTypeRequiredDescription
fileFilerequiredThe source File.
instructiontextrequiredWhat to change.
referenceslist of FileFurther Files the edit follows.
formatjsonAspect ratio, resolution, duration and file type of the result.

Returns

OutputTypeRequiredDescription
fileFilerequiredThe new File, which records its source.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do File.edit --json '{"file":"file_V1AuhyCTsH","instruction":"Example instruction"}'

File.generate

Generate makes an image, video, speech or music File from a prompt and reference Files, and records how it was made. Verb page.

Text
npx startup-builder do File.generate --json '<input>' [--try | --send | --do]

Emits File.generated.

Inputs

InputTypeRequiredDescription
kindstringrequiredWhat to make.
prompttextrequiredWhat to make, or for speech the text to speak.
referenceslist of FileFiles the output follows, such as a product photo or a first frame.
voiceVoiceThe Voice that speaks, for speech.
formatjsonAspect ratio, resolution, duration and file type.

Returns

OutputTypeRequiredDescription
fileFilerequiredThe generated File, its bytes in Storage and its provenance recorded.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do File.generate --json '{"kind":"image","prompt":"Example prompt"}'