轮换 API Key
curl --request POST \
--url https://api.omnirelay.ai/v1/manage/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnirelay.ai/v1/manage/keys/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnirelay.ai/v1/manage/keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "example-key-id",
"key": "or-live-…"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}管理 API
轮换 API Key
轮换所有者的有效 Key,保留 ID、限制、到期时间和费用计数。旧密钥立即失效,新密钥仅返回一次。每人每小时最多轮换 10 次。
POST
/
v1
/
manage
/
keys
/
{id}
/
rotate
轮换 API Key
curl --request POST \
--url https://api.omnirelay.ai/v1/manage/keys/{id}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omnirelay.ai/v1/manage/keys/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omnirelay.ai/v1/manage/keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "example-key-id",
"key": "or-live-…"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}{
"error": {
"code": "model_unavailable",
"message": "The model does not exist or is disabled.",
"type": "not_found_error",
"param": "<string>"
},
"request_id": "<string>"
}