---
title: "Creates or updates a LiteLLM integration API key"
method: PUT
path: "/v1/integrations/litellm/{id}/api-key"
tags: ["LiteLLM Integration"]
---

# Creates or updates a LiteLLM integration API key

`PUT /v1/integrations/litellm/{id}/api-key`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/integrations/litellm/{id}/api-key`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

## Path parameters

- `id` string, required

## Request body

- SecretApi: Secret wrapper for API responses
  - `secret` string, required: The secret value

## Response `204`

API key upserted successfully.

## Other responses

- `400`: Invalid API key.
- `401`: Unauthorized
- `404`: Integration not found.
- `503`: LiteLLM is rate-limiting or unavailable; retry later.

---

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