Create API key
curl --request POST \
--url https://api.omnirelay.ai/v1/manage/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme production"
}
'import requests
url = "https://api.omnirelay.ai/v1/manage/keys"
payload = { "name": "Acme production" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme production'})
};
fetch('https://api.omnirelay.ai/v1/manage/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "example-key-id",
"key": "or-live-…",
"expiresAt": null
}{
"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>"
}Management
Create API key
Creates an API key for the owner after verified workspace activation. Otherwise returns 403 activation_required without creating a key. The key is returned once. Maximum 20 active API keys per owner. Amounts are integer micro-USD.
POST
/
v1
/
manage
/
keys
Create API key
curl --request POST \
--url https://api.omnirelay.ai/v1/manage/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme production"
}
'import requests
url = "https://api.omnirelay.ai/v1/manage/keys"
payload = { "name": "Acme production" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme production'})
};
fetch('https://api.omnirelay.ai/v1/manage/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "example-key-id",
"key": "or-live-…",
"expiresAt": null
}{
"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>"
}Authorizations
Management key created in the console. read scope reads; write scope also changes API keys. Inference API keys are not accepted.
Body
application/json
Required string length:
1 - 60Maximum string length:
80Maximum string length:
200Future Unix timestamp in milliseconds; null clears expiry.
Exact model IDs or provider/* rules; null allows all enabled workspace models. An empty array is invalid.
Required array length:
1 - 50 elementsRequired range:
0 <= x <= 1000000000000Required range:
0 <= x <= 1000000000000Available options:
none, daily, weekly, monthly