토큰 삭제
curl --request DELETE \
--url https://api.example.com/api/token/{id}import requests
url = "https://api.example.com/api/token/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/api/token/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/token/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/token/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/token/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/token/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_bodyAPI 키 & 콘솔 관리
토큰 삭제
지정한 API 토큰을 삭제합니다
DELETE
/
api
/
token
/
{id}
토큰 삭제
curl --request DELETE \
--url https://api.example.com/api/token/{id}import requests
url = "https://api.example.com/api/token/{id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.example.com/api/token/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/token/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/token/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/token/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/token/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body업데이트: 2026-07-20
인터페이스 설명
지정한 API 토큰을 영구적으로 삭제합니다. 삭제 후 해당 토큰의 API Key는 즉시 무효화됩니다.이
/api/token/* 인터페이스 그룹은 주로 Crazyrouter 콘솔의 API Key 관리 자동화에 사용됩니다. 사용자 access token과 New-Api-User 요청 헤더가 필요하며, 일반적인 sk-xxx 모델 호출 흐름에서 직접 사용하는 인터페이스가 아닙니다. 요청 기본 주소는 반드시 https://crazyrouter.com을 사용해야 합니다. https://api.crazyrouter.com은 모델 API 전용 진입점이며, 관리 경로를 호출하면 404 api_only_endpoint가 반환됩니다.인증 방식
사용자 측 인증을 사용하며, 요청 헤더에 다음을 포함해야 합니다.Authorization: Bearer your_access_token
New-Api-User: 1
경로 파라미터
integer
필수
삭제할 토큰 ID
응답 형식
{
"success": true,
"message": "토큰이 삭제되었습니다"
}
코드 예시
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())
curl -X DELETE https://crazyrouter.com/api/token/10 \
-H "Authorization: Bearer your_access_token" \
-H "New-Api-User: 1"
삭제 작업은 되돌릴 수 없습니다. 삭제 후 해당 Key를 사용하는 모든 애플리케이션은 즉시 API를 호출할 수 없게 됩니다.