---
title: "Replace Evaluation Key"
method: POST
path: "/gateway/upstreams/{upstream_id}/evaluation-key"
tags: ["gateway"]
---

# Replace Evaluation Key

`POST /gateway/upstreams/{upstream_id}/evaluation-key`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/gateway/upstreams/{upstream_id}/evaluation-key`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

A new evaluation key for the upstream (a running LLM endpoint's or a vendor's), which
OS3 runs your evaluations on that upstream with. It replaces the live one; the key itself
is never shown.

## Path parameters

- `upstream_id` string, uuid, required

## Request body

- EvaluationKeyIn: How the answers OS3's evaluations get with the new key are traced.
  - `trace_policy` 'metadata' | 'none' | 'full'

## Response `201`

Successful Response

- GatewayKey
  - `id` string, uuid, required
  - `name` string, required
  - `prefix` string, required
  - `workspace_id` string, uuid, nullable, required
  - `upstream_id` string, uuid, nullable, required
  - `os3_models` boolean, required
  - `routing_mode` 'legacy' | 'auto', required
  - `scopes` string[], required
  - `trace_policy` string, required
  - `purpose` string, required
  - `vault_secret` string, nullable, required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
