AI Models

Set current active AI model for organization

POST
/api/ai-models/organization/{organizationId}/current

Legacy endpoint that sets the organization-wide active model by writing currentAiProviderIndex, currentAiModelIndex and currentAiModelVercelUniqueName. SUPERADMIN-only and tenant-scoped. Superseded by section-based model assignments.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

organizationId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/ai-models/organization/string/current" \  -H "Content-Type: application/json" \  -d '{    "index": 0,    "modelDetail": "claude-sonnet-4-6",    "aiModelId": "5f7b1c2e8a1d4e0012c3b4a5"  }'
{  "success": true,  "message": "API key for anthropic removed successfully"}