Update provider configuration including enabling/disabling and updating credentials (BYOK - Bring Your Own Key).
PATCHhttps://api.aitronos.com/v1/organizations/{organization_id}/providers/{provider_name}
organization_id string required
Organization ID (org_ prefixed string).
provider_name string required
Provider name (e.g., "openai", "anthropic", "google").
is_active boolean optional
Enable or disable the provider.
api_key string optional
Provider API key for BYOK (Bring Your Own Key).
org_id string optional
Provider organization ID.
project_id string optional
Provider project ID.
Success response with message.
Bash
- Bash
- Python
- JavaScript
# Enable a provider
curl -X PATCH "https://api.aitronos.com/v1/organizations/org_abc123/providers/openai" \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"is_active": true
}'
# Update provider credentials (BYOK)
curl -X PATCH "https://api.aitronos.com/v1/organizations/org_abc123/providers/openai" \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-proj-...",
"org_id": "org-xyz",
"project_id": "proj-abc"
}'Response:
{
"success": true,
"message": "Provider openai updated"
}