Start a new take a plugin tool made; answers signed PUT links
const url = 'http://localhost:8300/v1/studio/plugin/takes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"parents":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"tool":"example","input":{},"title":"example","kind":"image","content_type":"image/png","bytes":1,"width":1,"height":1,"duration_s":1,"video":{"duration_s":1,"fps":1,"frames":1,"has_audio":true,"poster":{"content_type":"image/png","bytes":1,"width":1,"height":1}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8300/v1/studio/plugin/takes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "parents": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tool": "example", "input": {}, "title": "example", "kind": "image", "content_type": "image/png", "bytes": 1, "width": 1, "height": 1, "duration_s": 1, "video": { "duration_s": 1, "fps": 1, "frames": 1, "has_audio": true, "poster": { "content_type": "image/png", "bytes": 1, "width": 1, "height": 1 } } }'A pending take (source tool, tool {plugin, tool, input}, parents) of the pass’s owner, invisible until completed; the key u/<owner>/uploads/<take_id>.<ext> (an image or audio) or u/<owner>/imports/<take_id>.mp4 with its poster beside it (a video), PUT links valid 15 minutes. take is 404. 422 for a kind and type that do not match (“kind and content_type differ”), a missing size (“an image or a video needs width and height”, “a video needs video”, “an audio take needs duration_s”), an image or audio over 50 MB, an input over 4096 bytes. A pending one not completed within an hour is discarded.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A new take a takes plugin made from takes of the pass’s owner
object
The takes it was made from
At most 4096 bytes as compact JSON
object
An image or audio at most 52428800 (50 MB); a video at most 2 GB
An image’s or a video’s
An audio take’s
A video’s length, frames, rate, sound and poster (as an import’s)
object
object
Responses
Section titled “Responses”The links
object
PUT the bytes (exactly bytes, content_type)
A video’s: PUT its poster
Example
{ "upload_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12", "poster_upload_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12"}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}