For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList provider keys
      • POSTCreate a provider key
      • POSTDiscover models from endpoint
      • GETList provider keys by provider
      • DELDelete a provider key
      • PATCHUpdate a provider key
      • POSTDiscover models from existing key
      • POSTSync models for a provider key
Dashboard
LogoLogo
Runtype APIProvider Keys

Update a provider key

PATCH
/v1/provider-keys/:id
PATCH
/v1/provider-keys/:id
$curl -X PATCH https://api.runtype.com/v1/provider-keys/id \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "isActive": true,
> "isDefault": true,
> "name": "Updated Key Name"
>}'
1{
2 "providerKey": {
3 "createdAt": "string",
4 "id": "string",
5 "isActive": true,
6 "isDefault": true,
7 "keyPreview": "string",
8 "lastUsedAt": "string",
9 "name": "string",
10 "provider": "string",
11 "updatedAt": "string",
12 "usageCount": 1.1,
13 "settings": {}
14 }
15}
Updates an existing provider API key.
Was this page helpful?
Previous

Discover models from existing key

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Path parameters

idstringRequired
Provider key ID

Request

This endpoint expects an object.
apiKeystringOptional>=1 character
isActivebooleanOptional
isDefaultbooleanOptional
namestringOptional1-100 characters
settingsmap from strings to anyOptional

Response

Provider key updated
providerKeyobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error