Update an AI provider

Update the details of an existing AI provider.

Request

PATCH https://superinterface.ai/api/cloud/providers/{providerId}

Authentication

Include your private API key in the request headers:
Authorization: Bearer YOUR_PRIVATE_API_KEY

Path Parameters

ParameterTypeDescription
providerIdstringThe ID of an existing AI provider to update

Request Body

ParameterTypeRequiredDescription
typeProviderTypeNoNew ProviderType (e.g., OPENAI)
apiKeystringNoNew API key for the provider
namestringNoNew display name for the provider
endpointstringNoNew endpoint URL for the provider
apiVersionstringNoNew API version for the provider

Example request

curl -X PATCH "https://superinterface.ai/api/cloud/providers/30cfe680-fee5-49b9-b386-6a7097eb8497" \ -H "Authorization: Bearer YOUR_PRIVATE_API_KEY" \ -H "Content-Type: application/json" -d '{ "apiKey": "sk-proj-NEW-12345", "name": "" }'

Response

ParameterTypeDescription
providerProviderUpdated Provider

Example response

{ "provider": { "id": "30cfe680-fee5-49b9-b386-6a7097eb8497", "type": "OPENAI", "name": "", "apiKey": "sk-proj-NEW-12345", "apiVersion": null, "endpoint": null, "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-16T12:00:00Z" } }

Errors

The endpoint may return the following errors:

401 Unauthorized

This error occurs if the API key is invalid or missing.
{ "error": "Unauthorized", "message": "Invalid or missing API key" }