Skip to main content
PUT
/
v1
/
llm-provider
/
{provider}
Update LLM provider configuration
curl --request PUT \
  --url https://api.example.com/v1/llm-provider/{provider} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": true,
  "credentials": {}
}
'
{
  "provider": "openai",
  "enabled": true,
  "credentials": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.re-factor.ai/llms.txt

Use this file to discover all available pages before exploring further.

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 The provider to use for LLM access

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

Body

application/json
enabled
boolean

Whether the provider is enabled

credentials
object

The credentials for the provider

Response

OK

provider
enum<string>

The provider to use for LLM access

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

Whether the provider is enabled

credentials
object

The credentials for the provider