---
title: "Update Eval Config"
method: PUT
path: "/v1/api-performance/config"
tags: ["Eval Setup"]
---

# Update Eval Config

`PUT /v1/api-performance/config`

## Request

- Base URL: `https://api.lightsage.com`
- URL: `https://api.lightsage.com/v1/api-performance/config`
- Auth: API key in header `X-Lightsage-Api-Key`

Updates and returns the saved evaluation configuration. Environment variable values are write-only, and valid target combinations come from `GET /v1/api-performance/targets`.

## Request body

- PublicEvalConfigUpdateRequest
  - `models` string[], nullable: Legacy model selection; prefer `targets`.
  - `targets` PublicApiEvalTarget[], nullable
    - `id` string, nullable: The saved target ID, or null for targets derived from the legacy model selection.
    - `source_id` string, nullable: Source ID from GET /v1/api-performance/sources.
    - `target_type` 'text' | 'agent', required
    - `agent_id` string, nullable: Coding agent ID from GET /v1/api-performance/targets; required only for agent targets.
    - `model_id` string, required: text_models[].id for text targets, or an id from the agent's models list, both from GET /v1/api-performance/targets.
    - `frequency` 'daily' | 'every_other_day' | 'weekly' | 'manual': The run schedule. `manual` keeps the target available without scheduling it.
    - `enabled` boolean
    - `next_run_at` string, nullable
    - `last_run_at` string, nullable
    - `last_skipped_at` string, nullable
    - `skip_reason` string, nullable
    - `created_at` string, nullable
    - `updated_at` string, nullable
  - `operation_ids` string[], nullable: operation_id values from GET /v1/api-performance/evals.
  - `custom_eval_ids` string[], nullable: IDs from GET /v1/api-performance/custom-evals.
  - `env_vars` object, nullable: Environment variable values are write-only; reads return their names in `env_var_keys`.
  - `env_profiles` PublicEvalEnvProfileRequest[], nullable: The brand's environment profiles, shared by every source. Replaces the list: profiles left out are deleted, and an ID the brand does not have creates a new profile.
    - `id` string, required
    - `name` string, required
    - `env_vars` object: Environment variable values are write-only; reads return names only.
  - `default_env_profile_id` string: An ID from `env_profiles`: the default for `source_id`, or the brand default when no source is given.
  - `source_id` string: Source ID from GET /v1/api-performance/sources.
  - `api_base_url` string

## Response `200`

Successful Response

- PublicEvalConfigResponse
  - `models` string[], required: Legacy model selection superseded by `targets`.
  - `targets` PublicApiEvalTarget[]
    - `id` string, nullable: The saved target ID, or null for targets derived from the legacy model selection.
    - `source_id` string, nullable: Source ID from GET /v1/api-performance/sources.
    - `target_type` 'text' | 'agent', required
    - `agent_id` string, nullable: Coding agent ID from GET /v1/api-performance/targets; required only for agent targets.
    - `model_id` string, required: text_models[].id for text targets, or an id from the agent's models list, both from GET /v1/api-performance/targets.
    - `frequency` 'daily' | 'every_other_day' | 'weekly' | 'manual': The run schedule. `manual` keeps the target available without scheduling it.
    - `enabled` boolean
    - `next_run_at` string, nullable
    - `last_run_at` string, nullable
    - `last_skipped_at` string, nullable
    - `skip_reason` string, nullable
    - `created_at` string, nullable
    - `updated_at` string, nullable
  - `operation_ids` string[], required
  - `custom_eval_ids` string[]
  - `env_var_keys` string[]: Environment variable names; values are never returned.
  - `env_profiles` PublicEvalEnvProfileSummary[]
    - `id` string, required
    - `name` string, required
    - `env_var_keys` string[]: Environment variable names; values are never returned.
    - `updated_at` string, nullable: When this environment's name or variables last changed; null if unchanged since this field was introduced.
  - `default_env_profile_id` string, nullable
  - `source_id` string, nullable
  - `api_base_url` string, nullable
  - `can_configure_per_model_schedules` boolean

## Other responses

- `403`: One or more configured targets are unavailable on the organization's current plan.
- `422`: Validation Error

---

[API](https://skmtc.dev/usesapient/apis/sapient-public-api.md) - [All operations](https://skmtc.dev/usesapient/apis/sapient-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usesapient/apis/sapient-public-api/revisions/14890dfe867e?raw)
