PUT
/
providers
/
{slug}
from portkey_ai import Portkey

# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)

# Update a specific provider
updated_provider = portkey.providers.update(
slug="PROVIDER_SLUG",
name="updated-name",
note="updated-note",
workspace_id=""
)

print(updated_provider)
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slug": "<string>"
}

Authorizations

x-portkey-api-key
string
header
required

Path Parameters

slug
string
required

Provider slug

Query Parameters

workspace_id
string

optional, needed when using organisation admin keys

Body

application/json
name
string
note
string
usage_limits
object
Example:
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
rate_limits
object
expires_at
string<date-time> | null
reset_usage
boolean

Response

200 - application/json

Successful response

id
string<UUID>
slug
string