Authentication
All API requests require an API key passed in the X-API-Key header.
Header format
X-API-Key: your_api_key_here
Example
import requests
headers = {
"X-API-Key": "your_api_key_here",
"Content-Type": "application/json"
}
resp = requests.post("https://embed.statode.com/health", headers=headers)
curl https://embed.statode.com/health \
-H "X-API-Key: your_api_key_here"
Error responses
Missing or invalid API key returns HTTP 401:
{
"detail": "Invalid or missing API key"
}
Credit-based billing
API usage is billed per credit. Different endpoints consume different amounts based on compute cost. Check your remaining balance with the /balance endpoint:
resp = requests.post("https://embed.statode.com/balance", headers=headers)
print(resp.json()["credits_remaining"])
Security notes
- Store your API key in environment variables, not in source code
- Rotate your key if it's ever exposed in logs, commits, or client-side code
- Each key is tied to one account. Do not share keys across teams or services