curl --request DELETE \
--url http://localhost:3000/api/v1/credentials/cred_123abc/models/llama2 \
--header 'Authorization: Bearer <token>'
const credentialId = 'cred_123abc';
const modelName = 'llama2';
const response = await fetch(
`http://localhost:3000/api/v1/credentials/${credentialId}/models/${modelName}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
credential_id = "cred_123abc"
model_name = "llama2"
url = f"http://localhost:3000/api/v1/credentials/{credential_id}/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Model removed successfully"
}
{
"success": true,
"message": "Credential deleted (no models remaining)"
}
{
"success": false,
"message": "This operation is only for Ollama credentials"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Credential not found"
}
Credentials
Delete Model from Credential
Removes a specific model from an Ollama credential. Deletes the credential if no models remain.
DELETE
/
api
/
credentials
/
{id}
/
models
/
{modelName}
curl --request DELETE \
--url http://localhost:3000/api/v1/credentials/cred_123abc/models/llama2 \
--header 'Authorization: Bearer <token>'
const credentialId = 'cred_123abc';
const modelName = 'llama2';
const response = await fetch(
`http://localhost:3000/api/v1/credentials/${credentialId}/models/${modelName}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
credential_id = "cred_123abc"
model_name = "llama2"
url = f"http://localhost:3000/api/v1/credentials/{credential_id}/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Model removed successfully"
}
{
"success": true,
"message": "Credential deleted (no models remaining)"
}
{
"success": false,
"message": "This operation is only for Ollama credentials"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Credential not found"
}
Path Parameters
string
required
Credential ID
string
required
Model name to remove
Response
boolean
Indicates if the model was removed successfully
string
Success or error message. Can be either:
- “Model removed successfully”
- “Credential deleted (no models remaining)“
curl --request DELETE \
--url http://localhost:3000/api/v1/credentials/cred_123abc/models/llama2 \
--header 'Authorization: Bearer <token>'
const credentialId = 'cred_123abc';
const modelName = 'llama2';
const response = await fetch(
`http://localhost:3000/api/v1/credentials/${credentialId}/models/${modelName}`,
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer <token>'
}
}
);
const data = await response.json();
import requests
credential_id = "cred_123abc"
model_name = "llama2"
url = f"http://localhost:3000/api/v1/credentials/{credential_id}/models/{model_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
data = response.json()
{
"success": true,
"message": "Model removed successfully"
}
{
"success": true,
"message": "Credential deleted (no models remaining)"
}
{
"success": false,
"message": "This operation is only for Ollama credentials"
}
{
"success": false,
"message": "Unauthorized"
}
{
"success": false,
"message": "Credential not found"
}
Notes
This endpoint is specifically for Ollama credentials that manage multiple models.
- When the last model is removed, the entire credential is automatically deleted
- This operation is only valid for Ollama provider credentials
- Attempting to use this on non-Ollama credentials will return a 400 error
- Model names must match exactly (case-sensitive)
Behavior
- If the credential has multiple models, the specified model is removed
- If the credential has only one model (the one being deleted), the entire credential is deleted
- The response message indicates which action was taken

