Skip to main content
POST
/
api
/
ai-models
/
organization
/
{organizationId}
/
current
Set current active AI model for organization
curl --request POST \
  --url https://your-instance.example.com/api/ai-models/organization/{organizationId}/current \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "index": 0,
  "modelDetail": "claude-sonnet-4-6",
  "aiModelId": "5f7b1c2e8a1d4e0012c3b4a5"
}
'
{
  "success": true,
  "message": "API key for anthropic removed successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

Body

application/json
index
integer
required

Position in the legacy aiProviders[] array. Superseded by section assignments.

modelDetail
string
required

modelName to activate within the chosen provider; must exist in that AiModel's modelDetails.

aiModelId
string
required

ObjectId of the AiModel registry entry whose vercelUniqueName becomes the org's current provider.

Response

Current AI model updated

Generic success envelope used for delete / update endpoints that do not return a resource.

success
enum<boolean>
required
Available options:
true
message
string