Skip to main content
PATCH
/
provider-keys
/
{id}
Update an AI Gateway provider key
curl --request PATCH \
  --url https://api.ngrok.ai/provider-keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "metadata": "<string>"
}
'
{
  "id": "<string>",
  "uri": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "providerId": "<string>",
  "name": "<string>",
  "keyRedacted": "<string>",
  "createdBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "lastUpdatedBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "description": "<string>",
  "metadata": "<string>",
  "lastUsed": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier for an AI Gateway provider key.

Body

application/json
name
string | null

User-defined label for this provider key.

Maximum string length: 255
description
string | null

Human-readable description of this provider key.

Maximum string length: 255
metadata
string | null

Arbitrary user-defined metadata for this provider key.

Maximum string length: 4096

Response

The updated AI Gateway provider key.

id
string
required

Unique identifier for this provider key.

uri
string
required

URI of this AI Gateway Provider Key API resource.

createdAt
string<date-time>
required

Timestamp when the provider key was created.

updatedAt
string<date-time>
required

Timestamp when the provider key was last updated.

providerId
string
required

Which AI provider this key is for, for example openai or anthropic.

name
string
required

User-defined label for this provider key.

keyRedacted
string
required

Redacted display form of the key value.

createdBy
object
required
lastUpdatedBy
object
required
description
string

Human-readable description of this provider key.

metadata
string

Arbitrary user-defined metadata for this provider key.

lastUsed
string<date-time> | null

Timestamp when the provider key was last used.