Launch Week 02 wrapped — explore all five launches

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.

PUT/v2/projects/{projectId}/models/{modelType}
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
}'
200
{
  "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_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The id of the project, which must belong to the organization your API key is scoped to.

  • modelTypeenumRequired

    Which of the project's models to act on.

Request body

  • Update Evaluation Model Requestobject

    The model to run as the project's evaluation model. It takes no maxInputTokens, which is rejected on this path.

    Show 3 propertiesHide 3 properties
    • providerenumRequired

      This is the provider of the model.

      Show 18 enum valuesHide 18 enum values
      • OPEN_AI
      • CUSTOM
      • CONFIDENT_AI
      • BEDROCK
      • ANTHROPIC
      • GEMINI
      • X_AI
      • DEEPSEEK
      • MOONSHOT_AI
      • VERTEX_AI
      • AZURE
      • MISTRAL
      • PERPLEXITY
      • OPEN_ROUTER
      • PORTKEY
      • LITE_LLM
      • TRUE_FOUNDRY
      • HUGGING_FACE
    • namestring

      The 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 for CONFIDENT_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 | null

      How 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 Requestobject

    The model to run for any project model type other than evaluation.

    Show 4 propertiesHide 4 properties
    • providerenumRequired

      This is the provider of the model.

      Show 18 enum valuesHide 18 enum values
      • OPEN_AI
      • CUSTOM
      • CONFIDENT_AI
      • BEDROCK
      • ANTHROPIC
      • GEMINI
      • X_AI
      • DEEPSEEK
      • MOONSHOT_AI
      • VERTEX_AI
      • AZURE
      • MISTRAL
      • PERPLEXITY
      • OPEN_ROUTER
      • PORTKEY
      • LITE_LLM
      • TRUE_FOUNDRY
      • HUGGING_FACE
    • namestring

      The 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 for CONFIDENT_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 | null

      How many calls Confident AI may make to this model at once. Omit it or send null for no limit of its own.

    • maxInputTokensinteger | null

      How many input tokens Confident AI may send to this model per call. The platform, simulation and speech models only: sending it on the evaluation path is rejected. Omit it or send null for no limit of its own.

Response

Set Model succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The project's model as it now stands. source is 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
    • modelobject

      One 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 (organizationId set) or to a single project (projectId set), never to both.

      Show 8 propertiesHide 8 properties
      • idstring

        The id of the model configuration, generated by Confident AI.

      • typeenum

        What a configured model is used for. EVALUATION is the LLM judge that scores a project's metrics, PLATFORM is the model behind Confident AI's own AI features such as classification, summaries and report generation, and SIMULATION is 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
        • EVALUATION
        • PLATFORM
        • GENERATION
        • SIMULATION
        • TEXT_TO_SPEECH
        • SPEECH_TO_TEXT
      • providerenum | null

        This is the provider of the model.

        Show 18 enum valuesHide 18 enum values
        • OPEN_AI
        • CUSTOM
        • CONFIDENT_AI
        • BEDROCK
        • ANTHROPIC
        • GEMINI
        • X_AI
        • DEEPSEEK
        • MOONSHOT_AI
        • VERTEX_AI
        • AZURE
        • MISTRAL
        • PERPLEXITY
        • OPEN_ROUTER
        • PORTKEY
        • LITE_LLM
        • TRUE_FOUNDRY
        • HUGGING_FACE
      • namestring | null

        The model to call at that provider, or null when the provider's default is used. Always null for CONFIDENT_AI.

      • maxConcurrencyinteger | null

        How many calls Confident AI makes to this model at once, or null for no limit of its own.

      • maxInputTokensinteger | null

        How many input tokens Confident AI sends to this model per call, or null for no limit of its own.

      • projectIdstring | null

        The id of the project this configuration overrides the organization default for, or null when it is the organization default itself.

      • organizationIdstring | null

        The id of the organization this configuration is the default for, or null when it is a project override.

    • sourceenum

      Where the model in effect for a project comes from: project when the project has an override of its own, organization when it follows the organization's default. The evaluation model is always project scoped, so it only ever reports project.

      Show 2 enum valuesHide 2 enum values
      • project
      • organization
  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI