Skip to main content

aiProfilesCreate

AiProfileMutationResult aiProfilesCreate(AiCreateProfileInput)

POST /api/2.0/ai/profiles/create

Create a provider profile

Creates an AI provider profile - the endpoint, credentials and model that a chat round runs on - and returns it. The name has to be unique, the credentials are probed against the live provider before anything is stored, and the portal's first profile also takes the Default assignment slot. Two inputs are refused outright: a baseUrl pointing at a private network address, and providerType: external, which delegates transport to the host application and therefore cannot work for a profile the server manages. On a portal running the AI gateway, profiles are managed centrally and this operation answers 403.

Parameters​

NameInTypeDescriptionNotes
AiCreateProfileInputbodyAiCreateProfileInput[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the profile was created, with it in profile. A refusal is reported in error rather than as a status.AiProfileMutationResult-
400The provider URL is missing, malformed, or points at a private network address.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI profiles are read-only on this portal because they are managed by the AI gateway.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiProfileMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json