Probably
Docs

Save a persona

save_persona, in Changes: A connection or key that may make changes. None spends credits; prepare_* and stage tools (research, brainstorm, write_script, review, generate_clip, voice, storyboard) prepare paid work for confirm_spend.

POST
/api/v1/tools/save_persona

Create a persona in a Space, or revise one by personaId and the expectedVersion you read. Photos are ready images from the library. A new persona's headshot is made for it. Pass a new requestKey for each save.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key (prb_…) from Settings → Connections.

Request Body

application/json
  1. body
spaceId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
personaId?string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
expectedVersion?integer
Range1 <= value <= 9007199254740991
name*string
Length1 <= length <= 120
look*string
Length1 <= length <= 2000
portrayal?string
Length1 <= length <= 2000
voice?|||
photos?array<>
Itemsitems <= 10
Default[]
requestKey*string
Match^[\w.:-]+$
Length8 <= length <= 64

Response Body

The tool's answer.

application/json
  1. response
id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
version*number
curl -X POST 'https://studio.probably.co/api/v1/tools/save_persona' \  -H "Authorization: Bearer $PROBABLY_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "spaceId": "a330a273-e64a-4183-aedb-f3152797a9a5",  "name": "string",  "look": "string",  "requestKey": "stringst"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "version": 0}