AIProviderKeyService
AI Provider Keys

Update an AI provider key

Updates an AI provider key's name or key value in the workspace

patch/v1/workspaces/{workspaceId}/ai_provider_keys/{id}

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q

The workspace the key belongs to.

idstring required
Example:aipk_01HXKD2E5NQM3T9AYWCFQ41VW3

The key to update.

Request body

workspaceIdstring

The workspace the key belongs to.

idstring

The key to update.

updateMaskstring field-mask

Fields to update.

Example request

{
  "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
  "id": "aipk_01HXKD2E5NQM3T9AYWCFQ41VW3"
}

Response

OK

Example response

{
  "metadata": {
    "accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
    "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
    "profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08"
  }
}

Changes

Changed in 6 of the 57 revisions of this API.82422

  • 3ecc1debabfa6106See the full diff
    • the spec/config/allOf[AIProviderConfig]/ request property type/format changed from object/ to /

      request-property-type-changed

    • the spec/credentials/allOf[AIProviderCredential]/ request property type/format changed from object/ to /

      request-property-type-changed

    • added AIProviderConfig_Openrouter AIProviderConfig_Openai AIProviderConfig_OpenaiCompatible to the spec/config/allOf[AIProviderConfig]/ response property oneOf list for the response status 200

      response-property-one-of-added

    • added AIProviderCredential_ApiKey AIProviderCredential_Headers to the spec/credentials/allOf[AIProviderCredential]/ response property oneOf list for the response status 200

      response-property-one-of-added

    • the spec/config/allOf[AIProviderConfig]/ response's property type/format changed from object/ to / for status 200

      response-property-type-changed

    • the spec/credentials/allOf[AIProviderCredential]/ response's property type/format changed from object/ to / for status 200

      response-property-type-changed

    • removed the request property spec/config/allOf[AIProviderConfig]/openai

      request-property-removed

    • removed the request property spec/config/allOf[AIProviderConfig]/openaiCompatible

      request-property-removed

    • removed the request property spec/config/allOf[AIProviderConfig]/openrouter

      request-property-removed

    • removed the request property spec/credentials/allOf[AIProviderCredential]/apiKey

      request-property-removed

    • removed the request property spec/credentials/allOf[AIProviderCredential]/headers

      request-property-removed

    • removed the optional property spec/config/allOf[AIProviderConfig]/openai from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/config/allOf[AIProviderConfig]/openaiCompatible from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/config/allOf[AIProviderConfig]/openrouter from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/credentials/allOf[AIProviderCredential]/apiKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/credentials/allOf[AIProviderCredential]/headers from the response with the 200 status

      response-optional-property-removed

    • added discriminator to spec/config/allOf[AIProviderConfig]/ request property

      request-property-discriminator-added

    • added discriminator to spec/credentials/allOf[AIProviderCredential]/ request property

      request-property-discriminator-added

    • added AIProviderConfig_Openrouter AIProviderConfig_Openai AIProviderConfig_OpenaiCompatible to the spec/config/allOf[AIProviderConfig]/ request property oneOf list

      request-property-one-of-added

    • added AIProviderCredential_ApiKey AIProviderCredential_Headers to the spec/credentials/allOf[AIProviderCredential]/ request property oneOf list

      request-property-one-of-added

    • added discriminator to spec/config/allOf[AIProviderConfig]/ response property for the response status 200

      response-property-discriminator-added

    • added discriminator to spec/credentials/allOf[AIProviderCredential]/ response property for the response status 200

      response-property-discriminator-added

  • 06e0e37c1499108See the full diff
    • removed the request property metadata/bundleKey

      request-property-removed

    • removed the request property spec/apiKey

      request-property-removed

    • removed the request property spec/openrouter

      request-property-removed

    • removed the optional property metadata/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/apiKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property spec/openrouter from the response with the 200 status

      response-optional-property-removed

    • added the new AI_PROVIDER_ANTHROPIC enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new AI_PROVIDER_GEMINI enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new AI_PROVIDER_OPENAI enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new AI_PROVIDER_OPENAI_COMPATIBLE enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property spec/config

      new-optional-request-property

    • added the new optional request property spec/credentials

      new-optional-request-property

    • added the new AI_PROVIDER_ANTHROPIC enum value to the request property spec/provider

      request-property-enum-value-added

    • added the new AI_PROVIDER_GEMINI enum value to the request property spec/provider

      request-property-enum-value-added

    • added the new AI_PROVIDER_OPENAI enum value to the request property spec/provider

      request-property-enum-value-added

    • added the new AI_PROVIDER_OPENAI_COMPATIBLE enum value to the request property spec/provider

      request-property-enum-value-added

    • added the optional property spec/config to the response with the 200 status

      response-optional-property-added

    • added the optional property spec/credentials to the response with the 200 status

      response-optional-property-added

    This revision also has 27 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property info/allOf[AIProviderKeyInfo]/isPromotional to the response with the 200 status

      response-optional-property-added

    • added the optional property metadata/updatedAt to the response with the 200 status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 873a704256d9245See the full diff
    • request property spec/provider was restricted to a list of enum values

      request-property-became-enum

    • the spec/provider request property type/format changed from string/ to string/enum

      request-property-type-changed

    • removed the request property spec/region

      request-property-removed

    • removed the optional property spec/region from the response with the 200 status

      response-optional-property-removed

    • added the new AI_PROVIDER_OPENROUTER enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new AI_PROVIDER_UNSPECIFIED enum value to the spec/provider response property for the response status 200

      response-property-enum-value-added

    • added the new optional request property spec/openrouter

      new-optional-request-property

    • added the new AI_PROVIDER_OPENROUTER enum value to the request property spec/provider

      request-property-enum-value-added

    • added the new AI_PROVIDER_UNSPECIFIED enum value to the request property spec/provider

      request-property-enum-value-added

    • added the optional property info to the response with the 200 status

      response-optional-property-added

    • added the optional property spec/openrouter to the response with the 200 status

      response-optional-property-added

    • endpoint added

      endpoint-added