Deployments.ai Docs
Models

Remove a model provider key; its metadata stays for audit

DELETE /v1/organizations/{id}/model-credentials/{provider} · SDK deleteModelCredential · CLI deployments model-credential remove

DELETE
/v1/organizations/{id}/model-credentials/{provider}

Requires models:write. A suspended organization can still call it.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
provider*string

Model provider whose key this is.

Value in"openai""openrouter"

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Response Body

ModelCredentialResponse

application/json
  1. response
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
credentialId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
keyVersion*integer
Range1 <= value
label?string
Match^\S[\s\S]*\S$|^\S$|^$
Length1 <= length <= 100
lastFour*string

The last four characters of the stored key. The key itself is never returned.

provider*string
Value in"openai""openrouter"
revokedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
revokedBy?string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
setAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
setBy*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
status*string
Value in"active""revoked"
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range1 <= value
curl -X DELETE "https://example.com/v1/organizations/string/model-credentials/openai" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string"
{  "createdAt": "2019-08-24T14:15:22Z",  "credentialId": "string",  "keyVersion": 1,  "label": "string",  "lastFour": "string",  "provider": "openai",  "revokedAt": "2019-08-24T14:15:22Z",  "revokedBy": "string",  "setAt": "2019-08-24T14:15:22Z",  "setBy": "string",  "status": "active",  "updatedAt": "2019-08-24T14:15:22Z",  "version": 1}