Skip to content
Last updated

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}

Path parameters

organization_id string required

Organization ID (org_ prefixed string).

provider_name string required

Provider name (e.g., "openai", "anthropic", "google").

Request body

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.

Returns

Success response with message.

Bash
# 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"
}