> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete custom provider

Delete a specific custom provider from your organization.

<Note>
  **Important**:

  * This action is permanent and cannot be undone
  * Managed providers (`is_managed: true`) cannot be deleted as they are managed by Keywords AI
  * Deleting a provider may affect models that reference it
</Note>

## Path parameters

<ParamField path="pk" type="integer" required>
  The provider's primary key ID to delete.

  <Accordion title="Example">
    ```
    123
    ```
  </Accordion>
</ParamField>

## Response

Returns no content on successful deletion.

<ResponseExample>
  ```text 204 No Content theme={"system"}
  ```

  ```json 403 Forbidden theme={"system"}
  {
    "error": "Cannot delete managed provider. This provider is managed by Keywords AI and cannot be deleted."
  }
  ```

  ```json 404 Not Found theme={"system"}
  {
    "detail": "Not found."
  }
  ```

  ```json 401 Unauthorized theme={"system"}
  {
    "detail": "Authentication credentials were not provided."
  }
  ```
</ResponseExample>

<RequestExample>
  ```python Python theme={"system"}
  import requests

  provider_pk = 123
  url = f"https://api.keywordsai.co/api/providers/{provider_pk}/"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY"
  }

  response = requests.delete(url, headers=headers)
  print(f"Status code: {response.status_code}")
  ```

  ```typescript TypeScript theme={"system"}
  const providerPk = 123;
  const url = `https://api.keywordsai.co/api/providers/${providerPk}/`;
  const headers = {
      'Authorization': 'Bearer YOUR_API_KEY'
  };

  const response = await fetch(url, {
      method: 'DELETE',
      headers: headers
  });

  console.log(`Status code: ${response.status}`);
  ```

  ```bash cURL theme={"system"}
  curl -X DELETE "https://api.keywordsai.co/api/providers/123/" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>
