Best practices
Short checklist for calling Heimdall APIs in production.
Keys
- Store
X-api-keyandX-usernamein environment variables or a secrets manager. Never commit them. - ML / Forecast / Loop keys are per model. Rotate by generating a new key on the model page.
- Read / Vision use the unstructured key under Account → API keys.
Calls
- Prefer HTTPS. Keep timeouts (for example 30s) and retry on
429/5xxwith backoff. - Validate request shape before send (required fields from the product API guide).
- Log status codes and response
errorbodies; check Usage for volume.
Limits to remember
- Lake uploads: 500 MB per file
- Unstructured zip: labeled
.jpg/.pngor.txtonly - Lab cells: 30s timeout, up to 6
lake()loads