Skip to content

Save a personality's files

PUT
/api/v1/world/personalities/{slug}/files
curl --request PUT \
--url http://localhost:11044/api/v1/world/personalities/example/files \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "files": { "additionalProperty": "example" } }'

World-tier personalities only; a realm personality answers with the duplicate-first instruction. The save is validated by rendering, and rolls back if the persona no longer renders.

slug
required
string

Slug of a world-tier personality the user made; shipped and realm personalities are read-only and answer 400 asking for a duplicate first, as does an unknown slug

Files to write, keyed by file name (identity.yml, personality.jinja, behaviours.jinja, guardrails.jinja, response_format.jinja, verbosity.jinja), each replacing that file’s whole content; files not named are left as they are, and any other name answers 400. If the persona no longer renders afterwards the personality is rolled back to its previous files and the render error returned as 400

Media typeapplication/json

Body of PUT /world/personalities/{slug}/files: personality files to save, kept only if the persona still renders

object
files
required

File name to its full new content. Names are among identity.yml, personality.jinja, behaviours.jinja, guardrails.jinja, response_format.jinja and verbosity.jinja; any other is refused. Files not named are left as they are

object
key
additional properties
string

Example generated

{
"files": {
"additionalProperty": "example"
}
}

Saved

Media type*/*
object

Refused — read-only, unknown files, or the persona does not render

Media type*/*

A refusal from the world administration surface: what went wrong, and the word error so a client reading the body need not consult the status code

object
message
required

What was refused and why, written to be shown. Names the offending value where there is one — the unknown mode, the out-of-range threshold, the invalid cron expression

string
status
required

Always error. Present because the map this replaces carried it and a consumer may branch on it

string

Example

error