AI Providers

Delete an AI provider

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 its usage history, preserving those rows: each usage event keeps the provider's id as its ai_provider_id. 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.

delete/v1/projects/{project_id}/ai-providers/{ai_provider_id}

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/ai-providers/{ai_provider_id}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Path parameters

ai_provider_idstring required

AI Provider ID

Query parameters

forceboolean

When true, delete the provider's price overrides and unlink its usage history so a provider with only soft dependents can be removed. Has no effect on live references (chats, agents, model routes), which always block deletion.

Response

AI provider deleted successfully

Changes

No recorded changes to this operation across all 1 revision of this API.