---
title: "Delete a custom provider"
description: ""
---

<a id="playground-button:docs/apis/models/delete-custom-provider"></a>

**DELETE** `https://api.respan.ai/api/providers/{provider_id}/`

## Servers

`https://api.respan.ai` — Respan API Server

<a id="request.auth"></a>

## Authentication

<a id="request.auth.Authorization"></a>

### RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer &lt;RESPAN_API_KEY&gt;. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -&gt; Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: `bearer`; format: `Respan API key`.


```http
Authorization: Bearer $RESPAN_API_KEY
```


**Or:**

### DashboardJwt

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

HTTP scheme: `bearer`; format: `Dashboard JWT`.


```http
Authorization: Bearer $RESPAN_DASHBOARD_JWT
```


<a id="request.path"></a>

## Path parameters


| Parameter | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| <a id="request.path.provider_id"></a>`provider_id` | `string` | Required | Custom provider string ID returned as `id` and `provider_id` in provider responses. |


## Responses

### 204

Deleted.

<a id="response.error"></a>

### 403

The API key is missing, invalid or expired, or it doesn't have permission for this action.

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | — |
| `detail` | `string` | Required in parent | — |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
```


### 404

Not Found

#### application/json


| Field | Type | Requirement | Description and constraints |
| --- | --- | --- | --- |
| `$` | `object` | Body | — |
| `detail` | `string` | Optional | — |
| `error` | `string` | Optional | — |


<details class="api-schema-source">
<summary>OpenAPI response schema</summary>


```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
```

</details>

##### Example


```json
{
  "error": "Not found"
}
```


## OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

<!-- openapi-operation:start -->
<details class="api-schema-source">
<summary>OpenAPI operation</summary>


```json
{
  "summary": "Delete a custom provider",
  "operationId": "deleteCustomProvider",
  "tags": [
    "Models"
  ],
  "parameters": [
    {
      "name": "provider_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "Custom provider string ID returned as `id` and `provider_id` in provider responses."
    }
  ],
  "responses": {
    "204": {
      "description": "Deleted."
    },
    "403": {
      "description": "The API key is missing, invalid or expired, or it doesn't have permission for this action.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    },
    "404": {
      "description": "Not Found",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "detail": {
                "type": "string"
              },
              "error": {
                "type": "string"
              }
            }
          },
          "example": {
            "error": "Not found"
          }
        }
      }
    }
  },
  "security": [
    {
      "RespanApiKey": []
    },
    {
      "DashboardJwt": []
    }
  ]
}
```

</details>
<!-- openapi-operation:end -->

<!-- openapi-path-item:start -->
<details class="api-schema-source">
<summary>OpenAPI path metadata</summary>


```json
{}
```

</details>
<!-- openapi-path-item:end -->

<!-- openapi-components:start -->
<details class="api-schema-source">
<summary>Referenced OpenAPI components</summary>


```json
{
  "securitySchemes": {
    "DashboardJwt": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Dashboard JWT",
      "description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
      "x-fern-bearer": {
        "name": "dashboardJwt",
        "env": "RESPAN_DASHBOARD_JWT"
      }
    },
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}
```

</details>
<!-- openapi-components:end -->
