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")
const url = 'http://localhost:8300/v1/studio/library';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '"example"'};
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/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 /from_take: take (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 (group designed, novoice.design, none in made_with.voices), from_take: voice (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 , take , in must be before out, out , the part lasts , the part lasts
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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
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
Trimmed; must then be 1-80 characters
An element: a slug (LibraryItem.handle), unique per owner; the client proposes one from the name. A look: absent or null
Trimmed; must then be at most 2000 characters; missing = “” (a look with from_take: copied)
Takes of the caller, images, distinct, in order (the first is the thumbnail): an element 1-4, a look 0-4; missing = []
object
A look only: 0-4 LoRAs the caller can use now, distinct; missing = [] (with from_take: copied)
object
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
The strength the look applies it at
“Save as look”: fill the fields the body leaves out from a take the caller made with a run
object
A voice only: the clip’s start (snapped; default 0)
A voice only: the clip’s end (snapped; default min(duration, 30))
When text is absent: copy the take’s made_with.prompt as typed with @@ turned into @ (trimmed, cut to 2000 code points)
When loras is absent: copy the take’s made_with.loras the caller can use now, {lora, strength}, first per id, at most 4
A voice only (required then): its description, language and style
object
Trimmed; must then be 1-2000 characters; a designed voice only
The part of a take to clone (checked as a media param with trim, accepts audio, 3-30 s); not with from_take
object
Required true with a clip: the owner has the right to use this voice
A BCP 47 tag; null or absent = none
Trimmed; must then be at most 500 characters; “” or absent = none
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
Responses
Section titled “Responses”The item
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
Own: a UUID; starter look: <family>/<pack look id>
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
What @ mentions; always set for an element, always null for a look
An element: appended where it is mentioned; a look: appended to the prompt when chosen; empty = none
An element 1-4 when saved, a look 0-4; a starter look none (its picture is only thumb_url)
object
Signed, time-limited link; opaque
The take’s thumbnail (Take.thumb_url)
1 on create, +1 on every PUT; send it back in LibraryItemUpdate. A starter look or voice: the pack’s version
A starter look: the oldest published_at of the live hosts publishing it
A starter look: = created_at
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)
A starter look: its pack’s family (where it comes from; whether it fits is fits); own items: null (any family)
A look’s LoRAs in order; always empty for an element
One LoRA of a look, appended to the look stack at strength when the look is applied
object
Own look: the LoRA’s name now (as recorded when it is gone); starter look: the file name without .safetensors
Computed, in the order text, images, lora: non-empty text, at least one image, at least one LoRA
A look made with “Save as look”: the take; null for every other item)
Only with GET /library?workflow=: whether the item can be applied to that workflow now
With fits: why not (this workflow has no LoRA stack, a voice: voice Ryan is for qwen3-tts); null when it fits
Kind voice only (required then, absent otherwise)
object
Where a saved voice comes from (= its group): preset (a pack’s speaker, a starter voice), cloned, designed
Preset only: the family whose voice params take it
Preset only: the model’s speaker id (ryan, uncle_fu)
Designed only: the voice in words (“male, 17, tenor, nervous”)
A BCP 47 tag (en, en-US, zh, pt-BR); absent = none (the node’s own language param decides)
How it speaks, in words; absent = none
Cloned (required) or designed (optional): the part of a take it clones
object
With clip (required then): the owner ticked “I have the right to use this voice”
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)
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
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}The resource’s state forbids this
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}