publish_asset
Publish asset. Put work in the company's media library for the owner to review.
Where it is
In the media area (films, carousels and pictures in the media library): open it with tools_for { area: "media" }, then call it with use_tool { name: "publish_asset", args }.
Does it need a yes?
Runs at once, no yes card: it changes only the office's own working state, and nothing reaches anyone. Here: a private draft in the media library.
Inputs
| Input | Type | Needed | About |
|---|---|---|---|
file | string | no | The file or folder on this machine, as a full path. Or use from_submission. · 1 to 1,024 characters |
from_submission | object | no | One file of an upload where it is stored (no disk online): its id, file key and your lease from claim_submission. |
from_submission.subId | string | yes | format `^[a-f0-9]{24}$` |
from_submission.fileKey | string | yes | format `^[A-Za-z0-9_-]{1,64}$` |
from_submission.lease | string | yes | format `^[a-f0-9]{32}$` |
title | string | no | A human title, never an id (required for a new piece) · up to 120 characters |
project | string | no | "<Kind> · <Name>", e.g. "Film · First client". Required for a new piece · up to 120 characters |
agent | string | no | up to 120 characters |
id | string | no | Optional stable id; default project + file name. An existing piece's id: this file becomes its new version (hosted too) · up to 120 characters |
status | "draft" | "review" | no | draft or review (default review); only the owner approves |
notes | string | no | up to 20,000 characters |
caption | string | no | The planned post text · up to 5,000 characters |
series | string | no | up to 80 characters |
order | integer | no | 0 to 999 |
kindLabel | string | no | up to 80 characters |
changeNote | string | no | up to 300 characters |
scriptPath | string | no | The script the piece follows · up to 2,000 characters |
tags | array of string | no | up to 20 items |
relatedAssets | array of string | no | A short's film, by its Media id · up to 20 items |
replace | boolean | no | A new version of the piece: id names it, else the same project and file name |
ladder | "full" | "copy" | "none" | no | |
posterAt | number | no | 0 or more |
poster | string | no | Your own poster for a film: an absolute path to a picture · 1 to 1,024 characters |
wait | boolean | no | true: return when it is done |
spend | array of object | no | Paid calls that made this piece. Append-only, one line per request id · up to 100 items |
spend[].what | string | yes | What was paid for, e.g. 'Voice-over' · 1 to 200 characters |
spend[].usd | number | yes | Cost in US dollars, 0 to 100 · 0 to 100 |
spend[].provider | "fal" | "higgsfield" | "elevenlabs" | "openai" | "anthropic" | "google" | "other" | yes | Who was paid |
spend[].model | string | no | The model or voice used · 1 to 120 characters |
spend[].requestId | string | yes | The provider's request id. The same id with the same details changes nothing · 1 to 120 characters |
spend[].at | string | no | When it was made (default now) · up to 40 characters |
spend[].editId | string | no | format `^[a-f0-9]{24}$` |
moods | array of string | no | Music: how it feels, e.g. calm, hopeful · up to 40 items |
uses | array of string | no | Music: what it is for, e.g. bed under talk, intro · up to 40 items |
energy | "low" | "mid" | "high" | no | Music: low, mid or high |
bpm | number | no | Music: tempo, 30 to 300 · 30 to 300 |
musicalKey | string | no | Music: key, e.g. 'Am' or 'F# maj' · 1 to 8 characters |
loopsCleanly | boolean | no | Music: the end joins the start without a click |
madeBy | "agent" | "owner" | no | Who made the music: agent or owner |
scoreType | "background" | "full" | "agent-buildup" | no | Music: background, full or agent-buildup. Music: background (a bed under talk), full (a complete piece), agent-buildup (an agent built it) |
derivedFrom | object | no | Music fitted from another piece. Its id, revision and the target length. |
derivedFrom.itemId | string | yes | 1 to 160 characters |
derivedFrom.revision | integer | yes | 0 or more |
derivedFrom.targetSeconds | number | yes | 1 to 7200 |
derivedFrom.endOnPhrase | boolean | no | |
composedFrom | object | no | Music built from these sources and packs |
composedFrom.sourceIds | array of string | no | up to 20 items |
composedFrom.packIds | array of string | no | up to 20 items |
importedSource | object | no | Bought or borrowed music: its source and licence |
importedSource.name | string | yes | 1 to 200 characters |
importedSource.reference | string | yes | 1 to 2,000 characters |
importedSource.license | string | yes | 1 to 2,000 characters |
agentOk | false | no | false takes it off the agent music shelf. Only the owner puts music on, in the app |
edit | object | no | This piece is one part of an edit (the upload id) |
edit.id | string | yes | format `^[a-f0-9]{24}$` |
edit.role | "final" | "raw" | "collage" | "proof" | "music" | "source-text" | yes | |
edit.revision | integer | no | 1 to 1000 |
review_note | string | no | What you need from the owner, in a few words (shown at the top of the viewer). · up to 500 characters |
department | string | no | The department it is for, e.g. sales · format `^[a-z0-9-]{1,40}$` |
task | integer | no | The task this work is for, so the owner sees it there. · 1 or more |
run_id | string | no | Your run id from the connector's start, so the output ties back to this session · format `^[A-Za-z0-9_.:@-]{1,120}$` |
from_url | string | no | Hosted: a public https address of the file. Up to 200 MB; the server fetches it. · up to 2,000 characters |
upload | object | no | Hosted or cloud, any size: the file's name and size. The answer gives a short permission to send it straight to the company's own media library (one HTTPS PUT, or TUS for a film); then call again with the same arguments. |
upload.name | string | yes | 1 to 200 characters |
upload.size | integer | yes | 1 or more |
upload.sha256 | string | no | The file's SHA-256 in hex, needed for any file but a film. The permission is then good only for exactly these bytes. · format `^[a-f0-9]{64}$` |
requestId | string | no | A stable id for this file, the same on every call. Required with upload; used with from_url. · format `^[A-Za-z0-9_.:@-]{6,120}$` |
Example
{
"name": "publish_asset",
"arguments": {}
}When it is refused
invalid: The input isn't right. The sentence names the field and the fix; nothing was done. Fix it and call again.not_found: No such thing in this company (a task, file, person, record). Check the number or name, or list first.not_allowed: Not without another step: the owner's yes, your own task held with pick_up, or a setting the owner turns on. The sentence says which.taken: Someone else holds it (another AI on that task). Pick another task.stale: It changed since you read it. Read it again and use the new version.failed: On our side or a service's, never your input. Try again in a minute; if it keeps failing, call report_problem.