Set Model
PUThttps://api.confident-ai.com/v2/projects/{projectId}/models/{modelType}
Sets one of the project's models, selected by the modelType path segment. evaluation configures the LLM judge that scores this project's metrics. platform configures the model behind Confident AI's own AI features, like classification, summaries and report generation. simulation configures the model that simulates user turns in conversation simulations, including multi-turn test runs and red teaming. Setting platform or simulation creates a project override, so the project stops following the organization's default and source becomes project; remove it with the DELETE method to fall back to that default.
The provider's credential must already be configured on the project or the organization; set it first through the model credentials endpoints. A provider your organization's model provider policy does not allow is rejected with a 403. CONFIDENT_AI needs no credential and stores a null model name. maxInputTokens applies to the platform and simulation models only and is rejected on the evaluation path.
curl -X PUT "https://api.confident-ai.com/v2/projects/{projectId}/models/{modelType}" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"provider": "OPEN_AI",
"name": "gemini-2.0-flash",
"maxConcurrency": 5
}'{
"success": true,
"data": {
"model": {
"id": "<MODEL-ID>",
"type": "EVALUATION",
"provider": "GEMINI",
"name": "gemini-2.0-flash",
"maxConcurrency": 5,
"maxInputTokens": 128000,
"projectId": null,
"organizationId": "<ORGANIZATION-ID>"
},
"source": "project"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe id of the project, which must belong to the organization your API key is scoped to.
modelTypeenumRequiredWhich of the project's models to act on.
Request body
Update Evaluation Model RequestobjectThe model to run as the project's evaluation model. It takes no
maxInputTokens, which is rejected on this path.Show 3 propertiesHide 3 properties
providerenumRequiredThis is the provider of the model.
Show 18 enum valuesHide 18 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACE
namestringThe model to call at that provider, for example
gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored forCONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example@openai-prod/gpt-4o.maxConcurrencyinteger | nullHow many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
- OR
Update Platform Model RequestobjectThe model to run for any project model type other than
evaluation.Show 4 propertiesHide 4 properties
providerenumRequiredThis is the provider of the model.
Show 18 enum valuesHide 18 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACE
namestringThe model to call at that provider, for example
gemini-2.0-flash. Omit it to fall back to the provider's default; it is ignored forCONFIDENT_AI, which always stores a null name. A Portkey model must be written as the saved integration slug, for example@openai-prod/gpt-4o.maxConcurrencyinteger | nullHow many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.
maxInputTokensinteger | nullHow many input tokens Confident AI may send to this model per call. The platform, simulation and speech models only: sending it on the
evaluationpath is rejected. Omit it or send null for no limit of its own.
Response
Set Model succeeded.
successbooleanIndicates if the request was successful.
dataobjectThe project's model as it now stands.
sourceis returned for the platform and simulation models, where the write creates a project override and so answers which scope now wins; the evaluation model is always project scoped and omits it.Show 2 propertiesHide 2 properties
modelobjectOne model configuration: the provider and model Confident AI calls for a given purpose, with the limits it calls them under. A configuration belongs either to the organization (
organizationIdset) or to a single project (projectIdset), never to both.Show 8 propertiesHide 8 properties
idstringThe id of the model configuration, generated by Confident AI.
typeenumWhat a configured model is used for.
EVALUATIONis the LLM judge that scores a project's metrics,PLATFORMis the model behind Confident AI's own AI features such as classification, summaries and report generation, andSIMULATIONis the model that simulates user turns in conversation simulations. Those three are the only types the public API reads or writes.Show 6 enum valuesHide 6 enum values
EVALUATIONPLATFORMGENERATIONSIMULATIONTEXT_TO_SPEECHSPEECH_TO_TEXT
providerenum | nullThis is the provider of the model.
Show 18 enum valuesHide 18 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACE
namestring | nullThe model to call at that provider, or null when the provider's default is used. Always null for
CONFIDENT_AI.maxConcurrencyinteger | nullHow many calls Confident AI makes to this model at once, or null for no limit of its own.
maxInputTokensinteger | nullHow many input tokens Confident AI sends to this model per call, or null for no limit of its own.
projectIdstring | nullThe id of the project this configuration overrides the organization default for, or null when it is the organization default itself.
organizationIdstring | nullThe id of the organization this configuration is the default for, or null when it is a project override.
sourceenumWhere the model in effect for a project comes from:
projectwhen the project has an override of its own,organizationwhen it follows the organization's default. The evaluation model is always project scoped, so it only ever reportsproject.Show 2 enum valuesHide 2 enum values
projectorganization
deprecatedbooleanIndicates if this endpoint is deprecated.