Getting Started
Authentication
How to authenticate your API requests with API keys.
All API requests require an API key passed as a Bearer token in the Authorization header.
Getting a Key
- Sign up at app.deepsafe.fyi
- Go to API Keys in the dashboard
- Click Create Key and give it a name
- Copy the key immediately — it is shown only once
Using Your Key
Include it in every request:
curl -H "Authorization: Bearer ds_live_your_key_here" \
https://api.deepsafe.fyi/v1/usageimport requests
response = requests.post(
"https://api.deepsafe.fyi/v1/detect",
headers={"Authorization": "Bearer ds_live_your_key_here"},
files={"file": open("photo.jpg", "rb")},
)
print(response.json())const form = new FormData();
form.append('file', fs.createReadStream('photo.jpg'));
const response = await fetch('https://api.deepsafe.fyi/v1/detect', {
method: 'POST',
headers: { 'Authorization': 'Bearer ds_live_your_key_here' },
body: form,
});
const result = await response.json();Key Management
- Create multiple keys for different environments (dev, staging, prod)
- Revoke compromised keys instantly from the dashboard
- Revoked keys return
401 Unauthorizedimmediately
Security Best Practices
- Keys are hashed (SHA-256) before storage — we never store your key in plaintext
- Use environment variables to store keys, never hardcode them
- Rotate keys periodically
- Use separate keys for development and production