PUT
/
v1
/
llm-provider
/
{provider}
{
  "provider": "openai",
  "enabled": true,
  "credentials": {}
}
Update an existing LLM provider configuration.

Path Parameters

ParameterTypeRequiredDescription
providerstringyesThe provider to update configuration for (e.g., openai, anthropic)

Request Body

You can update either or both of these fields:
{
  "enabled": true,
  "credentials": {
    "api_key": "sk-new-api-key"
  }
}

Response Examples

Success Response

{
  "provider": "openai",
  "enabled": true,
  "credentials": {
    "api_key": "sk-***"
  }
}

Provider Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "No configuration found for provider: openai"
  }
}

Usage Examples

Enable/Disable a Provider

curl -X PUT "https://api.psci.ai/api/v1/llm-provider/openai" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

Update Credentials

curl -X PUT "https://api.psci.ai/api/v1/llm-provider/openai" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "api_key": "sk-new-api-key",
      "organization": "org-new-org-id"
    }
  }'

Authorizations

Authorization
string
header
required

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

Path Parameters

provider
enum<string>
required

The LLM provider to update configuration for

Available options:
openai,
anthropic,
google,
google-vertex,
azure,
amazon-bedrock,
xai

Body

application/json

Response

200
application/json

OK

The response is of type object.