Skip to main content
DELETE
/
api
/
token
/
{id}
Delete Token
curl --request DELETE \
  --url https://api.example.com/api/token/{id}

Overview

Permanently delete a specified API token. The token’s API Key will be invalidated immediately after deletion.
The /api/token/* endpoints are mainly for Crazyrouter dashboard automation around API key management. They require a user access token plus the New-Api-User header, and are not the normal interface for sk-xxx model calls.

Authentication

Use user-side authentication with these headers:
Authorization: Bearer your_access_token
New-Api-User: 1

Path Parameters

id
integer
required
ID of the token to delete

Response Format

{
  "success": true,
  "message": "Token deleted successfully"
}

Code Examples

import requests

headers = {
    "Authorization": "Bearer your_access_token",
    "New-Api-User": "1",
    "User-Agent": "Mozilla/5.0"
}

token_id = 10
response = requests.delete(
    f"https://crazyrouter.com/api/token/{token_id}",
    headers=headers
)

print(response.json())
This operation is irreversible. All applications using this Key will immediately lose API access.