Skip to main content
POST
Save Profile

Authorizations

X-Access-Token
string
header
required

Path Parameters

name
string
required
Required string length: 1 - 64
Pattern: ^[A-Za-z0-9._-]{1,64}$

Body

application/json

Request body for saving a profile.

If llm is provided, it is used as the profile config; otherwise the current agent_settings.llm is saved. The llm field is typed as :class:StrictLLM, which forbids unknown keys — so a typo like {"llm": {"custom_header": "x"}} returns 422 instead of being silently dropped.

Security note: when llm.api_key is included in the request body, it is transmitted in plaintext over the wire and present in any request log or error trace that captures request bodies. SecretStr masks it in Pydantic reprs, but callers and operators should still avoid logging raw request bodies on this endpoint.

include_secrets
boolean
default:true
llm
StrictLLM · object | null

LLM variant that rejects unknown fields.

The base LLM model has extra='ignore', so typos and renamed keys silently disappear. For API input we want to fail loud, otherwise users can POST {"llm": {"custom_header": "x"}} and get a 201 with the field quietly dropped.

preserve_existing_api_key
boolean
default:false

Response

Successful Response

Response body for save/delete operations.

name
string
required
message
string
required