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

Make an element from 1 to 4 of the caller's gallery images, a look (also "Save as look" on a take) or a voice (also "Save as voice")

POST
/v1/studio/library
curl --request POST \
--url http://localhost:8300/v1/studio/library \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '"example"'

Looks: group film|camera|colour|lighting, no handle, 0-4 images (checked as an element’s), 0-4 loras, at least one of text, an image, a LoRA. 422 group <g> is not a look group (or … is not an element group), a look has no handle, a look needs text, an image or a LoRA, loras: a look has at most 4 LoRAs, loras[2]: LoRA <name> is listed twice, loras: an element has no LoRAs, from_take makes looks and voices only, from_take: take <id> was not made by a run (an upload); 404 loras[2].lora: LoRA <id> not found (unknown, another user’s, deleted, pending, rejected, or shared and listed by no live host), from_take: take <id> not found (unknown, another user’s, deleted). from_take fills text (option prompt) and loras (option loras) when the body leaves them out, then every rule above applies. Looks count in the same 200 items as elements; handle uniqueness concerns elements only. name and text are trimmed. 422: name must be 1-80 characters, handle must be a slug: a-z, 0-9, - and _, starting with a letter, ending with a letter or digit, at most 40 characters, text must be at most 2000 characters (code points), name must not contain control characters, text must not contain control characters other than newlines and tabs, images: an element has 1 to 4 images, images[2]: take <id> is listed twice, images[2]: take <id> is not an image, images[2]: take <id> has no size (items from 1). 404 images[2]: take <id> not found for a take that is unknown, another user’s, deleted or a pending upload. 409 handle @<handle> is already used (unique per owner, over every kind), 409 You have 200 library items; delete some first. 201 with version 1. Voices: only group: designed can be made (name, voice {design, language?, style?}); the item’s voice.source is designed, handle null, text “”, no images or LoRAs; voices count in the same 200 items. 422 group <g> is not a voice group, preset voices come from packs, cloned voices are not available yet (group cloned), a voice has no handle, a voice has no text; describe it in voice.design, images: a voice has no images, loras: a voice has no LoRAs, voice: a designed voice needs voice.design, voice.design must be 1-2000 characters, voice.language: <tag> is not a BCP 47 language tag, voice.style must be at most 500 characters, voice.design must not contain control characters other than newlines and tabs, voice: only a voice has voice fields (an element or look with voice). of the caller’s voices or a starter voice a live host publishes, resolved as the caller. 422 voice_id: only a character has a voice (a location, prop, look or voice with a non-null voice_id); 404 voice_id: voice <id> not found (unknown, another user’s, deleted, an element or look, or a starter voice no live host publishes). Its fit is not checked here (a dialogue’s run checks it per line). PUT checks the same. MediaRef, consent: true, language?, style?}; a designed voice may carry a clip too (then it also needs consent). The clip is checked like a mediaparam withaccepts: [audio], trim, min_s3,max_s30 (in / out snapped, missing in = 0, out = min(duration, 30)) and stored as the take id with the snapped in / out; the voice'sfrom_take_idis that take. "Save as voice" =from_take {take_id, in?, out?}withkind: voice: the take (an audio take or a video with sound, an upload included) is the clip; with group: designedand novoice.designthe design, language and style are copied from the first designed voice in the take'smade_with.voices. 404 voice.clip: take not found/from_take: take not found(unknown, another user's, deleted, pending). 422cloned voices are not available yetis gone; new:voice: a cloned voice needs voice.clip, voice.design: a cloned voice has no design, voice.clip: give the clip or from_take, not both, voice.consent: tick “I have the right to use this voice”(a clip withoutconsent: true), from_take: take was not made with a designed voice(group designed, novoice.design, none in made_with.voices), from_take: voice was deleted(that designed voice is gone),from_take: a look takes the whole take (no in or out), and the media texts under voice.clip: orfrom_take: (take has no sound, take lasts s; this input takes at least 3.0 s, in must be before out, out is past the take’s end , the part lasts s; this input takes at most 30.0 s, the part lasts s; this input takes at least 3.0 s`).

Media typeapplication/json

An element needs handle and 1-4 images; a look has no handle, 0-4 images, 0-4 loras, and needs text, an image or a LoRA

object
kind
required

Element (character, location, prop; used with @handle); look (film, camera, colour, lighting; chosen from the visual picker, sent as RunRequest.looks); chosen in the voice picker, sent as a voice param’s VoiceRef). Clients show an unknown kind as is

string
Allowed values: element look voice
group
required
string
Allowed values: character location prop film camera colour lighting preset cloned designed
name
required

Trimmed; must then be 1-80 characters

string
<= 200 characters
handle

An element: a slug (LibraryItem.handle), unique per owner; the client proposes one from the name. A look: absent or null

string | null
<= 200 characters
text

Trimmed; must then be at most 2000 characters; missing = “” (a look with from_take: copied)

string
<= 4000 characters
images

Takes of the caller, images, distinct, in order (the first is the thumbnail): an element 1-4, a look 0-4; missing = []

Array<object>
<= 10 items
object
take_id
required
string format: uuid
loras

A look only: 0-4 LoRAs the caller can use now, distinct; missing = [] (with from_take: copied)

Array<object>
<= 8 items
object
lora
required

A Lora value (a rows item field of ref kind Lora): a LoRA the caller can use, by id; never a path, key or URL. Studio checks it when it creates the run.

object
lora_id
required
string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
strength
required

The strength the look applies it at

number
<= 2
from_take

“Save as look”: fill the fields the body leaves out from a take the caller made with a run

object
take_id
required
string format: uuid
in

A voice only: the clip’s start (snapped; default 0)

number
<= 86400
out

A voice only: the clip’s end (snapped; default min(duration, 30))

number
> 0 <= 86400
prompt

When text is absent: copy the take’s made_with.prompt as typed with @@ turned into @ (trimmed, cut to 2000 code points)

boolean
default: true
loras

When loras is absent: copy the take’s made_with.loras the caller can use now, {lora, strength}, first per id, at most 4

boolean
default: true
voice

A voice only (required then): its description, language and style

object
design

Trimmed; must then be 1-2000 characters; a designed voice only

string
<= 4000 characters
clip

The part of a take to clone (checked as a media param with trim, accepts audio, 3-30 s); not with from_take

object
take_id
required
string format: uuid
in
number
<= 86400
out
number
> 0 <= 86400
consent

Required true with a clip: the owner has the right to use this voice

boolean
language

A BCP 47 tag; null or absent = none

string | null
<= 35 characters
style

Trimmed; must then be at most 500 characters; “” or absent = none

string
<= 1000 characters
voice_id

An element of group character only: its voice ({voice_id} of VoiceRef: an own voice’s UUID or a starter voice’s <family>/<id>); missing or null = none

string | null
<= 130 characters

The item

Media typeapplication/json

A library item: one record shape for elements and looks. one whose take was deleted is left out, so a stored item may show 0 images. fits / reason only when the list was asked with workflow.

object
id
required

Own: a UUID; starter look: <family>/<pack look id>

string
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[a-z0-9][a-z0-9_-]{0,63}/[a-z0-9][a-z0-9-]{0,63})$/
kind
required

Element (character, location, prop; used with @handle); look (film, camera, colour, lighting; chosen from the visual picker, sent as RunRequest.looks); chosen in the voice picker, sent as a voice param’s VoiceRef). Clients show an unknown kind as is

string
Allowed values: element look voice
group
required
string
Allowed values: character location prop film camera colour lighting preset cloned designed
name
required
string
>= 1 characters <= 80 characters
handle
required

What @ mentions; always set for an element, always null for a look

string | null
/^[a-z](?:[a-z0-9_-]{0,38}[a-z0-9])?$/
text
required

An element: appended where it is mentioned; a look: appended to the prompt when chosen; empty = none

string
<= 2000 characters
images
required

An element 1-4 when saved, a look 0-4; a starter look none (its picture is only thumb_url)

Array<object>
<= 4 items
object
take_id
required
string format: uuid
url
required

Signed, time-limited link; opaque

string
thumb_url
required

The take’s thumbnail (Take.thumb_url)

string
width
required
integer
>= 1
height
required
integer
>= 1
thumb_url
required
One of:

Signed, time-limited link; opaque

string
version
required

1 on create, +1 on every PUT; send it back in LibraryItemUpdate. A starter look or voice: the pack’s version

integer
>= 1
created_at
required

A starter look: the oldest published_at of the live hosts publishing it

string format: date-time
updated_at
required

A starter look: = created_at

string format: date-time
source

Mine: the caller’s own (id a UUID, editable); starter: a look or a voice shipped by a pack and published by a runner (id <family>/<pack id>, read-only, everyone sees it)

string
Allowed values: mine starter
family

A starter look: its pack’s family (where it comes from; whether it fits is fits); own items: null (any family)

string | null
/^[a-z0-9][a-z0-9_-]{0,63}$/
loras

A look’s LoRAs in order; always empty for an element

Array<object>
<= 4 items

One LoRA of a look, appended to the look stack at strength when the look is applied

object
lora
required
One of:

A Lora value (a rows item field of ref kind Lora): a LoRA the caller can use, by id; never a path, key or URL. Studio checks it when it creates the run.

object
lora_id
required
string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
name
required

Own look: the LoRA’s name now (as recorded when it is gone); starter look: the file name without .safetensors

string
>= 1 characters <= 80 characters
strength
required
number
<= 2
needs

Computed, in the order text, images, lora: non-empty text, at least one image, at least one LoRA

Array<string>
<= 3 items unique items
Allowed values: text images lora
from_take_id

A look made with “Save as look”: the take; null for every other item)

string | null format: uuid
fits

Only with GET /library?workflow=: whether the item can be applied to that workflow now

boolean
reason

With fits: why not (this workflow has no LoRA stack, a voice: voice Ryan is for qwen3-tts); null when it fits

string | null
voice

Kind voice only (required then, absent otherwise)

object
source
required

Where a saved voice comes from (= its group): preset (a pack’s speaker, a starter voice), cloned, designed

string
Allowed values: preset cloned designed
family

Preset only: the family whose voice params take it

string
/^[a-z0-9][a-z0-9_-]{0,63}$/
speaker

Preset only: the model’s speaker id (ryan, uncle_fu)

string
/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/
design

Designed only: the voice in words (“male, 17, tenor, nervous”)

string
>= 1 characters <= 2000 characters
language

A BCP 47 tag (en, en-US, zh, pt-BR); absent = none (the node’s own language param decides)

string
/^[a-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$/
style

How it speaks, in words; absent = none

string
>= 1 characters <= 500 characters
clip

Cloned (required) or designed (optional): the part of a take it clones

object
take_id
required
string format: uuid
in
required
number
<= 86400
out
required
number
> 0 <= 86400
consent

With clip (required then): the owner ticked “I have the right to use this voice”

voice_id

An element only (always sent for one, absent otherwise): the voice its @handle speaks in a dialogue script, one of the caller’s voices or a starter voice; null = none (always null for a location or prop, and on read once that voice is deleted or no live host publishes it)

string | null
/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[a-z0-9][a-z0-9_-]{0,63}/[a-z0-9][a-z0-9-]{0,63})$/

Example

{
"kind": "element",
"group": "character",
"images": [
{
"url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12",
"thumb_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12"
}
],
"thumb_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12",
"source": "mine",
"needs": [
"text"
],
"voice": {
"source": "preset",
"consent": true
}
}

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

The resource’s state forbids this

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