File .generate
POST /{namespace}/files/generate
Generate makes an image, video, speech or music File from a prompt and reference Files, and records how it was made.
- Noun
- File
- Mode
do- Event
File.generated
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
kind | string | required | What to make. |
prompt | text | required | What to make, or for speech the text to speak. |
references | list of File | Files the output follows, such as a product photo or a first frame. | |
voice | Voice | The Voice that speaks, for speech. | |
format | json | Aspect ratio, resolution, duration and file type. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
file | File | required | The generated File, its bytes in Storage and its provenance recorded. |
Effects
- Emits
File.generated. - Performed by the Content Lead.
- Two-way: it runs at once, in the
try,sendanddomodes. - Runs as a background Action that waits with reason
runninguntil the upstream finishes. - Copies the result bytes into Storage before the Action is
done; an upstream link is never the record. - Posts no Cost when generation fails and ends
refusedwhen the upstream declines the prompt. - Canceling the Action cancels the upstream task.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | File.generate |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It 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. |