Skip to main content

Delete an AI provider

DELETE 

/api/v1/ai-providers/:ai_provider_id

Deletes an AI provider configuration.

Live references — chats, agents, and model routes whose targets name this provider — always block deletion with 409 AI_PROVIDER_HAS_DEPENDENTS; force does not override them, so delete or repoint those resources first. Soft dependents — price overrides and usage/generation records — also block with 409 unless force=true, which deletes the provider's price overrides and unlinks (nulls) its usage history, preserving those rows. The 409 body's error.meta reports the counts, a sample of offending IDs, and a forcible flag that is true when a force=true retry would succeed.

Request

Responses

AI provider deleted successfully