Skip to content

File.edit

POST /{namespace}/files/{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.

Noun
File
Mode
do
Event
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.

Outputs

OutputTypeRequiredDescription
fileFilerequiredThe new File, which records its source.

Effects

  • Emits File.edited.
  • Performed by the Content Lead.
  • Two-way: it runs at once, in the try, send and do modes.
  • Runs as a background Action and copies the result into Storage before done.
  • Never changes the source File.

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.File.edit

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.