Set Project Model
(v2)PUT
Sets one of the project's models, selected by the modelType path segment; decision configures the model used by JEVAL metrics. The provider's credential must already be configured on the project or organization, and a provider blocked by the organization's model provider policy is rejected. CONFIDENT_AI needs no credential and stores a null model name.
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,
"modelCredentialId": "<MODEL-CREDENTIAL-ID>"
}'{
"success": true,
"data": {
"model": {
"id": "<MODEL-ID>",
"type": "EVALUATION",
"provider": "GEMINI",
"name": "gemini-2.0-flash",
"maxConcurrency": 5,
"maxInputTokens": 128000,
"modelCredentialId": null,
"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 4 propertiesHide 4 properties
providerenumRequiredThis is the provider of the model.
Show 21 enum valuesHide 21 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACETYPE_SAFEFALZ_AI
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 anullname. 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
nullfor no limit of its own.modelCredentialIdstring | nullFor
BEDROCKandAZURE, the id of the stored credential to call the provider with. Omit it or send null to use the provider's default credential.
- OR
Update Decision Model RequestobjectThe project-scoped decision model used by
JEVALmetrics. Concurrency and input-token limits are not accepted.Show 3 propertiesHide 3 properties
providerenumRequiredThis is the provider of the model.
Show 21 enum valuesHide 21 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACETYPE_SAFEFALZ_AI
namestringThe TypeSafe decision model to use. Omit it when using the Confident AI default.
modelCredentialIdstring | nullFor
BEDROCKandAZURE, the id of the stored credential to call the provider with. Omit it or send null to use the provider's default credential.
- OR
Update Platform Model RequestobjectThe model to run for platform, simulation, or speech model types.
Show 5 propertiesHide 5 properties
providerenumRequiredThis is the provider of the model.
Show 21 enum valuesHide 21 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACETYPE_SAFEFALZ_AI
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 anullname. 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
nullfor 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 sendnullfor no limit of its own.modelCredentialIdstring | nullFor
BEDROCKandAZURE, the id of the stored credential to call the provider with. Omit it or send null to use the provider's default credential.
Response
Set Project 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 9 propertiesHide 9 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 8 enum valuesHide 8 enum values
EVALUATIONPLATFORMGENERATIONSIMULATIONTEXT_TO_SPEECHSPEECH_TO_TEXTDECISIONSPEECH_TO_SPEECH
providerenum | nullThis is the provider of the model.
Show 21 enum valuesHide 21 enum values
OPEN_AICUSTOMCONFIDENT_AIBEDROCKANTHROPICGEMINIX_AIDEEPSEEKMOONSHOT_AIVERTEX_AIAZUREMISTRALPERPLEXITYOPEN_ROUTERPORTKEYLITE_LLMTRUE_FOUNDRYHUGGING_FACETYPE_SAFEFALZ_AI
namestring | nullThe model to call at that provider, or
nullwhen the provider's default is used. AlwaysnullforCONFIDENT_AI.maxConcurrencyinteger | nullHow many calls Confident AI makes to this model at once, or
nullfor no limit of its own.maxInputTokensinteger | nullHow many input tokens Confident AI sends to this model per call, or
nullfor no limit of its own.modelCredentialIdstring | nullFor
BEDROCKandAZURE, the id of the stored credential the model is called with, or null when it uses the provider's default credential.projectIdstring | nullThe id of the project this configuration overrides the organization default for, or
nullwhen it is the organization default itself.organizationIdstring | nullThe id of the organization this configuration is the default for, or
nullwhen it is a project override.
sourceenumWhere the model in effect for a project comes from:
projectwhen the model is project scoped or has a project override, andorganizationwhen it follows the organization's default.Show 2 enum valuesHide 2 enum values
projectorganization
deprecatedbooleanIndicates if this endpoint is deprecated.