# Creates or updates a Gemini integration API key

**PUT** `/v1/integrations/gemini/{id}/api-key`

**Operation ID**: `upsertApiKey_1`
**Summary**: Creates or updates a Gemini integration API key
Creates an API key for a Gemini integration if it doesn't exist and updates it otherwise. If the key is updated while the integration is being used by a pipeline, the new key will be picked at pipeline restart, rescaling or an update.

## Tags
- Gemini Integration
## Parameters

- **id** (required) - path
  - Type: string

## Request Body

**Content-Type**: `application/json`

**Schema**: `SecretApi`

## Responses

### 204

API key upserted successfully.

### 400

Invalid API key.

### 401

Unauthorized

### 404

Integration not found.

### 503

Gemini API is rate-limiting or unavailable; retry later.
