---
title: "Set or replace the workspace OpenRouter API key (validated, encrypted)"
method: PUT
path: "/v1/workspaces/active/llm-key"
tags: ["workspaces"]
---

# Set or replace the workspace OpenRouter API key (validated, encrypted)

`PUT /v1/workspaces/active/llm-key`

## Request

- Base URL: `https://api.tently.dev`
- URL: `https://api.tently.dev/v1/workspaces/active/llm-key`
- Auth: none declared

## Request body

- object
  - `apiKey` string, required

## Response `200`

Default Response

- object
  - `configured` boolean, required
  - `provider` 'openrouter', nullable, required
  - `lastFour` string, nullable, required
  - `updatedAt` string, date-time, nullable, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `502`: Default Response
- `503`: Default Response

---

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