Create Character
POST
/api/characters
const url = 'https://example.com/api/characters';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","name":"example","kind":"human","trigger":"example","description":"example","base_prompt":"example","source_images":["example"],"loras":[{"workflow":"example","name":"example","strength":1,"base_model":"example"}],"voice":{"provider":"elevenlabs","voice_id":"example","name":"example","settings":{}},"defaults":{},"metadata":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/characters \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "name": "example", "kind": "human", "trigger": "example", "description": "example", "base_prompt": "example", "source_images": [ "example" ], "loras": [ { "workflow": "example", "name": "example", "strength": 1, "base_model": "example" } ], "voice": { "provider": "elevenlabs", "voice_id": "example", "name": "example", "settings": {} }, "defaults": {}, "metadata": {} }'Create or replace a character (idempotent by character id).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CharacterRecord
object
id
required
Id
string
name
required
Name
string
source_images
Source Images
Array<string>
loras
voice
Any of:
VoiceConfig
TTS voice configuration for a character or narrator.
null
defaults
Defaults
object
key
additional properties
any
metadata
Metadata
object
key
additional properties
any
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
CharacterRecord
object
id
required
Id
string
name
required
Name
string
source_images
Source Images
Array<string>
loras
voice
Any of:
VoiceConfig
TTS voice configuration for a character or narrator.
null
defaults
Defaults
object
key
additional properties
any
metadata
Metadata
object
key
additional properties
any
Example
{ "kind": "human", "loras": [ { "strength": 1 } ], "voice": { "provider": "elevenlabs" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}