Create an asset
create_assetSave images or clips as named account assets for reuse as characters, locations, styles, props, or other references, kept until deleted.
Instructions
Save a picture or a clip as an asset of this account, kept until you delete it: a character, location, style, prop or other, with a name. source is {run_id} of a succeeded generate_image or generate_video run of this account, {upload_id} of an upload from upload_image or create_upload, a public https {url} the server downloads (add kind: "video" for an MP4), {base64, media_type} of a PNG or JPEG up to 700000 bytes, or {put: {media_type, bytes, sha256}} to PUT a local file yourself: the answer carries upload.put_url and put_headers; run curl -X PUT -H 'content-type: <media_type>' --data-binary @<file> '<put_url>' within 15 minutes, then call get_asset. On a server running on your machine also {path} of a local PNG, JPEG or MP4. A clip is an MP4 in h264 or hevc, up to 120 seconds and 100 MB; a url clip or a PUT is checked in the background, so the answer says state: "processing" (or "awaiting_upload") and get_asset says ready or failed within minutes. For your own material (upload_id, url, base64, put, path) pass rights_confirmed: true, which states once that you may use the people and works in it. A reference you only want analysed, such as someone else's ad for analyze_reference, takes analysis_only: true instead: no rights claim, and no render or generation ever takes it. Use a picture's asset_id as {asset_id} in references, first_frame or last_frame of quote_image, generate_image, quote_video and generate_video; clips are kept for assembly and are no generation reference yet. Assets are free: creating, storing and using one spends no credits. An account keeps up to 2000 assets and 20 GB, and makes up to 100 new ones per day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| role | Yes | ||
| source | Yes | ||
| analysis_only | No | Keep it for analyze_reference only, without rights_confirmed: it never reaches a render or a generation. | |
| rights_confirmed | No |