API predictions require the
allow_api_predict plan feature. Free plans don’t include API access. Upgrade to Pro or higher to enable it.Endpoints
Both endpoints live under the deployment URL:
The full URL appears on the Integration tab of the deployment detail page.
Authentication
All requests need an API key in theAuthorization header:
JSON endpoint
Use this when you can pre-parse spectra into arrays of numbers (e.g., from your own data pipeline).Request
Response (200 OK)
value is the predicted category as a string.
File endpoint
Use this when you have raw files exported by your spectrometer and don’t want to parse them yourself.Request
Response
Identical to the JSON endpoint.Code samples
The Integration tab on the deployment detail page generates ready-to-use snippets. Examples:Python
JavaScript
cURL (JSON)
cURL (file upload)
Limits
For very large batches, split your spectra across multiple requests.
Errors
Example 400 errors
Example 429 error
Logging and usage
Every API prediction is:- Recorded in PredictionLog with the API key, sample count, and timestamp (90-day retention)
- Aggregated daily in PredictionUsage for quick quota lookups (kept permanently)