API Keys
Create API key
POST
Create a gateway API key
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://litellm-rust.onrender.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "alice"
}
'import requests
url = "https://litellm-rust.onrender.com/api/keys"
payload = { "label": "alice" }
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({label: 'alice'})
};
fetch('https://litellm-rust.onrender.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"label": "<string>",
"key": "<string>"
}curl --request POST \
--url https://litellm-rust.onrender.com/api/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "alice"
}
'import requests
url = "https://litellm-rust.onrender.com/api/keys"
payload = { "label": "alice" }
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({label: 'alice'})
};
fetch('https://litellm-rust.onrender.com/api/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"label": "<string>",
"key": "<string>"
}