Skip to main content
DELETE
/
api
/
credentials
/
{id}
/
models
/
{modelName}
curl --request DELETE \
  --url http://localhost:3000/api/v1/credentials/cred_123abc/models/llama2 \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "Model removed successfully"
}

Path Parameters

id
string
required
Credential ID
modelName
string
required
Model name to remove

Response

success
boolean
Indicates if the model was removed successfully
message
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>'
{
  "success": true,
  "message": "Model removed successfully"
}

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

  1. If the credential has multiple models, the specified model is removed
  2. If the credential has only one model (the one being deleted), the entire credential is deleted
  3. The response message indicates which action was taken