Endpoint
Authentication
This endpoint requires authentication. Include your API key in theX-API-Key header.
See Authentication for details.
Request Parameters
Environmental Parameters
Ambient temperature in degrees Celsius.
- Range: -50 to 60
- Example:
25.5
Relative humidity percentage.
- Range: 0 to 100
- Example:
65
Atmospheric pressure in hectopascals (hPa).
- Range: 900 to 1100
- Default: 1013.25 (sea level standard)
- Example:
1015.3
Wind speed in kilometers per hour.
- Range: 0 to 200
- Default: 0
- Example:
12.5
Pollutant Parameters
Particulate Matter 2.5 concentration in micrograms per cubic meter (µg/m³).
- Range: 0 to 500
- Example:
35.2
Particulate Matter 10 concentration in micrograms per cubic meter (µg/m³).
- Range: 0 to 600
- Example:
48.7
Nitrogen Dioxide concentration in parts per billion (ppb).
- Range: 0 to 500
- Example:
25.3
Ozone concentration in parts per billion (ppb).
- Range: 0 to 400
- Example:
45.1
Carbon Monoxide concentration in parts per million (ppm).
- Range: 0 to 50
- Example:
0.8
Optional Parameters
Geographic location information for the prediction.
ISO 8601 timestamp for the measurement. Defaults to current time.
- Example:
2026-03-05T14:30:00Z
Include detailed pollutant-level AQI breakdown in response.
- Default:
false
Response Fields
Indicates if the prediction was successful.
Contains the prediction results.
Predicted Air Quality Index value (0-500).
AQI category:
good, moderate, unhealthy_sensitive, unhealthy, very_unhealthy, or hazardous.Primary pollutant contributing to the AQI value.
Model confidence score (0-1). Higher values indicate greater confidence.
General health advice based on the predicted AQI level.
Individual AQI values for each pollutant (only if
include_breakdown is true).ISO 8601 timestamp of the prediction.
Example Request
Example Response
200 Success
Error Responses
400 Bad Request - Missing Parameters
400 Bad Request - Missing Parameters
400 Bad Request - Invalid Parameter Value
400 Bad Request - Invalid Parameter Value
401 Unauthorized
401 Unauthorized
429 Rate Limit Exceeded
429 Rate Limit Exceeded
500 Internal Server Error
500 Internal Server Error
AQI Categories
The response includes one of the following categories:| Category | AQI Range | Description |
|---|---|---|
good | 0-50 | Air quality is satisfactory, and air pollution poses little or no risk. |
moderate | 51-100 | Air quality is acceptable. However, there may be a risk for some people, particularly those who are unusually sensitive to air pollution. |
unhealthy_sensitive | 101-150 | Members of sensitive groups may experience health effects. The general public is less likely to be affected. |
unhealthy | 151-200 | Some members of the general public may experience health effects; members of sensitive groups may experience more serious health effects. |
very_unhealthy | 201-300 | Health alert: The risk of health effects is increased for everyone. |
hazardous | 301-500 | Health warning of emergency conditions: everyone is more likely to be affected. |
Best Practices
Follow these recommendations for optimal prediction accuracy.
Measurement Quality
- Use calibrated sensors for pollutant measurements
- Ensure measurements are from the same time window (within 15 minutes)
- Verify sensor readings are within realistic ranges before submission
- Account for local conditions that may affect sensor accuracy
Request Optimization
- Cache predictions for up to 10 minutes to reduce API calls
- Only request
include_breakdownwhen you need detailed pollutant analysis - Include location data when available for better context
- Batch multiple predictions using the Batch Predict endpoint
Handling Confidence Scores
- Confidence > 0.85: High reliability, safe for critical decisions
- Confidence 0.70-0.85: Good reliability, suitable for most use cases
- Confidence < 0.70: Lower reliability, consider requesting fresh measurements