Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Start a new take a plugin tool made; answers signed PUT links

POST
/v1/studio/plugin/takes
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.

Media typeapplication/json

A new take a takes plugin made from takes of the pass’s owner

object
parents
required

The takes it was made from

Array<string>
>= 1 items <= 8 items unique items
tool
required
string
/^[a-z][a-z0-9_]{0,23}$/
input
required

At most 4096 bytes as compact JSON

object
title
required
string
>= 1 characters <= 200 characters
kind
required
string
Allowed values: image video audio
content_type
required
string
Allowed values: image/png image/jpeg image/webp audio/wav audio/mpeg audio/mp4 video/mp4
bytes
required

An image or audio at most 52428800 (50 MB); a video at most 2 GB

integer
>= 1 <= 2147483648
width

An image’s or a video’s

integer
>= 1 <= 16384
height
integer
>= 1 <= 16384
duration_s

An audio take’s

number
> 0 <= 21600
video

A video’s length, frames, rate, sound and poster (as an import’s)

object
duration_s
required
number
> 0 <= 21600
fps
required
number
> 0 <= 240
frames
required
integer
>= 1
has_audio
required
boolean
poster
required
object
content_type
required
string
Allowed values: image/png image/jpeg image/webp
bytes
required
integer
>= 1 <= 52428800
width
required
integer
>= 1
height
required
integer
>= 1

The links

Media typeapplication/json
object
take_id
required
string format: uuid
upload_url
required

PUT the bytes (exactly bytes, content_type)

string
poster_upload_url

A video’s: PUT its poster

string
expires_at
required
string format: date-time

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

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}