Skip to main content

Documentation Index

Fetch the complete documentation index at: https://usesapient.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Configuration controls which models, scheduled targets, endpoints, custom evals, environment profiles, and API base URL Sapient uses for API Performance.

Commands

CommandDescription
sapient api-performance config retrieveGet the API Performance config.
sapient api-performance config updateUpdate the API Performance config.
Use Targets to discover valid target_type, execution_platform, and model_id combinations before updating config.

Retrieve config

sapient api-performance config retrieve
Retrieve config for one source:
sapient api-performance config retrieve --integration-id int_123
Example response:
{
  "models": ["claude-sonnet-4.5"],
  "targets": [],
  "endpoint_ids": ["endpoint_123"],
  "custom_eval_ids": ["custom_eval_123"],
  "env_vars": {},
  "env_profiles": [
    {
      "id": "prod",
      "name": "Production",
      "env_var_keys": ["API_KEY"]
    }
  ],
  "default_env_profile_id": "prod",
  "api_base_url": "https://api.example.com",
  "can_configure_per_model_schedules": true
}

Update models and eval selection

sapient api-performance config update \
  --models '["claude-sonnet-4.5"]' \
  --endpoint-ids '["endpoint_123"]' \
  --custom-eval-ids '["custom_eval_123"]'
Update custom eval selection:
sapient api-performance config update \
  --custom-eval-ids '["custom_eval_123","custom_eval_456"]'

Update scheduled targets

Use --targets for scheduled text or agent targets:
sapient api-performance config update \
  --targets '[{"target_type":"agent","execution_platform":"claude-code","model_id":"global.anthropic.claude-sonnet-4-6","frequency":"daily","enabled":true}]'
Target fields include target_type, execution_platform, model_id, frequency, enabled, next_run_at, and integration_id. For text model evals, use execution_platform set to openrouter and a text model ID from the target catalog.

Set base URL and environment variables

sapient api-performance config update \
  --api-base-url "https://api.example.com" \
  --env-vars '{"API_KEY":"sk_test_123","API_BASE_URL":"https://api.example.com"}'
Read responses include environment variable keys, not secret values. Update requests can send environment variables, but Sapient does not return stored secret values.

Configure environment profiles

Environment profiles let you store named sets of environment variables and choose which profiles a specific eval can use.
sapient api-performance config update \
  --env-profiles '[{"id":"prod","name":"Production","env_vars":{"API_KEY":"sk_live_123"}},{"id":"sandbox","name":"Sandbox","env_vars":{"API_KEY":"sk_test_123"}}]' \
  --default-env-profile-id prod
Read responses expose each profile’s id, name, and env_var_keys. Secret values are not returned.

Fields

FlagDescription
--modelsModel IDs to include as a JSON array.
--targetsScheduled target objects as a JSON array.
--endpoint-idsEndpoint or operation eval IDs to include as a JSON array.
--custom-eval-idsCustom eval IDs to include as a JSON array.
--env-varsEnvironment variable map as JSON.
--env-profilesEnvironment profile objects as a JSON array.
--default-env-profile-idDefault environment profile ID.
--integration-idSource ID for source-specific config.
--api-base-urlBase URL available to eval runs.