🔑 Authentication
Every e-z.host API endpoint requires an API key. This page shows how to get one and how to send it.
Base URL
All requests go to https://api.e-z.gg.
Get your API key
Your API key is available in your e-z.host account settings.
Treat it like a password — anyone with your key can upload and delete content on your behalf.
Sending the key
Pass your key in the key request header on every request:
| Header | Type | Description |
|---|---|---|
| key* | String | Your API key |
Example authenticated request
- cURL
- JavaScript
- Python
curl -X POST "https://api.e-z.gg/shortener" \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com"
}'
const res = await fetch("https://api.e-z.gg/shortener", {
method: "POST",
headers: {
"key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com"
})
});
const data = await res.json();
console.log(data);
import requests
res = requests.post(
"https://api.e-z.gg/shortener",
headers={"key": "YOUR_API_KEY"},
json={
"url": "https://example.com"
},
)
print(res.json())
warning
Keep your key private Never commit your API key to a public repository or share it in screenshots. If it leaks, reset it from your account settings right away.
Next steps
Start with Files uploading, or browse the other endpoints in the sidebar.