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

Create (or find) one imported take for a user, with signed PUT links for its files

POST
/v1/studio/admin/imports/takes
curl --request POST \
--url http://localhost:8300/v1/studio/admin/imports/takes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "owner_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "kind": "image", "filename": "example", "content_type": "image/png", "bytes": 1, "width": 1, "height": 1, "created_at": "2026-04-15T12:00:00Z", "starred": true, "title": "example", "legacy": {}, "parents": [ "example" ], "video": { "duration_s": 1, "fps": 1, "frames": 1, "has_audio": true, "poster": { "content_type": "image/png", "bytes": 1, "width": 1, "height": 1 } } }'

Used by helm import. Admin only (403). Idempotent on (owner_id, key): a new key stores a pending take (source: import, owner owner_id) and answers 201 with single-use 24-hour PUT links for u/<owner_id>/imports/<take_id>.<png|jpg|webp|mp4> (and, for a video, …/<take_id>.poster.<png|jpg|webp>), exactly as uploads sign them; a key already pending answers 200 with fresh links; a key already complete answers 200 state: ready without links and changes nothing but adding parents edges not stored yet. Every parents key is stored as an edge and shows once both takes are complete, in either order. A pending import not completed in 24 hours is deleted. 422 for a body that breaks the schema, legacy is larger than 64 KB.

Media typeapplication/json
object
owner_id
required

The user whose gallery receives it (the CLI resolves --user <email> with GET /auth/admin/users)

string format: uuid
key
required

The idempotency key: stable for one old item across runs

string
/^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$/
kind
required
string
Allowed values: image video
filename
required

The old file’s name, for logs

string
>= 1 characters <= 255 characters
content_type
required
string
Allowed values: image/png image/jpeg image/webp video/mp4
bytes
required

An image at most 50 MB, a video at most 2 GB

integer
>= 1 <= 2147483648
width
required
integer
>= 1
height
required
integer
>= 1
created_at
required

The old item’s creation time: the take’s created_at (its place in the gallery)

string format: date-time
starred
required
boolean
title
required
string
>= 1 characters <= 200 characters
legacy
required
object
parents
required

Keys of the imported items it was made from, in input order (lineage)

Array<string>
<= 64 items
video
object
duration_s
required
number
> 0
fps
required
number
> 0
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 key was seen: still pending (fresh links), or ready

Media typeapplication/json
object
take_id
required
string format: uuid
key
required
string
state
required
string
Allowed values: pending ready
upload_url
required

Pending: the signed PUT link for the file (exactly its content_type and bytes); ready: null

string | null
poster_upload_url
required

Pending video: the poster’s link; null otherwise

string | null
expires_at
required

Pending: when the links expire

string | null format: date-time

Example

{
"state": "pending"
}

Created, pending

Media typeapplication/json
object
take_id
required
string format: uuid
key
required
string
state
required
string
Allowed values: pending ready
upload_url
required

Pending: the signed PUT link for the file (exactly its content_type and bytes); ready: null

string | null
poster_upload_url
required

Pending video: the poster’s link; null otherwise

string | null
expires_at
required

Pending: when the links expire

string | null format: date-time

Example

{
"state": "pending"
}

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"
}

Valid token without the admin role: “admin role required”

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}