Add Media
lab_add_mediaBring your own video, audio or image into a project — not generated, yours. Two ways: media_url (a public http(s) address; the server fetches it, max 100 MB) or file_name + content_type (you get a signed upload_url and the header that are part of its signature: PUT the file's raw bytes there within the hour with EXACTLY those headers — the answer's anleitung has the ready curl line; a missing header is a 403). Either way the answer is the asset_key — use it in lab_timeline_apply as clips[].asset_key (video) or bett.asset_key (audio). Exception: in projects that check images, an uploaded image is not in the project after the PUT — the answer then carries abschluss_noetig and an abschluss_key; after the PUT call lab_add_media again with the same project_id, art, herkunft and abschluss_key only. That call checks the image and returns the asset_key, or says why it was refused. Free. Internal addresses are refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| art | Yes | What the file is | |
| herkunft | Yes | Required, no default: 'eigen' = shot, recorded or made by people (no AI generation); 'ki' = generated or altered with AI. Decides the EU AI Act Art. 50 disclosure of every export that uses this file. If the file itself carries an AI mark (C2PA or IPTC source type), it stays AI material whatever you declare, and the answer says so. | |
| file_name | No | Name of a local file to upload, with extension. Give this OR media_url | |
| media_url | No | Public http(s) URL of the file. Give this OR file_name | |
| project_id | Yes | Project id (from lab_list_projects) — positive integer as string | |
| content_type | No | Media type of the upload, e.g. video/mp4, audio/mpeg — required with file_name | |
| abschluss_key | No | Only after an upload whose answer said `abschluss_noetig`: the `abschluss_key` from that answer, given AFTER the PUT returned 200. Give it instead of media_url and file_name |