# Sprayer Calibration API
> Agricultural sprayer maths as an API, computed locally and deterministically — the calibration, coverage and tank-mix numbers a farmer, agronomist or custom applicator dials a boom sprayer in with. The calibration endpoint gives the broadcast application rate GPA = 5940 × the per-nozzle flow (GPM) ÷ (ground speed in mph × nozzle spacing in inches), the 5940 converting the units for a full-coverage boom — so a 0.4 GPM nozzle at 5 mph on 20-inch spacing lays down about 24 gallons per acre, and driving faster or spacing nozzles wider drops the rate. The coverage endpoint gives the acres a tank covers (tank ÷ GPA) and, for a field size, the total spray volume and the number of tank-loads, with the partial last fill called out so it can be mixed to the leftover acres. The product endpoint gives the pesticide or nutrient to add per tank = the acres a tank covers × the label rate per acre (in whatever unit the rate uses — ounces, pints, pounds), plus the total product for the field. Everything is computed locally and deterministically, so it is instant and private. Ideal for precision-ag and farm-management tools, sprayer-calibration and tank-mix apps, and ag-retail utilities. Pure local computation — no key, no third-party service, instant. Always follow the product label and calibrate with a real catch test. 3 compute endpoints. For fertiliser rates use a fertilizer API; for sprinkler/irrigation design an irrigation API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/spray-api/..."
```

## Pricing
- **Free** (Free) — 7,300 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 76,000 calls/Mo, 6 req/s
- **Pro** ($30/Mo) — 322,000 calls/Mo, 15 req/s
- **Mega** ($91/Mo) — 1,505,000 calls/Mo, 40 req/s

## Endpoints

### Spray

#### `GET /v1/calibration` — Application rate (GPA)

**Parameters:**
- `nozzle_flow_gpm` (query, required, string) — Per-nozzle flow (GPM) Example: `0.4`
- `speed_mph` (query, required, string) — Ground speed (mph) Example: `5`
- `nozzle_spacing_in` (query, required, string) — Nozzle spacing (inches) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/spray-api/v1/calibration?nozzle_flow_gpm=0.4&speed_mph=5&nozzle_spacing_in=20"
```

**Response:**
```json
{
    "data": {
        "note": "Broadcast application rate GPA = 5940 × the per-nozzle flow (GPM) ÷ (ground speed in mph × nozzle spacing in inches); 5940 converts the units for a full-coverage boom. So a 0.4 GPM nozzle at 5 mph on 20-inch spacing lays down about 24 gallons per acre. Drive faster or space the nozzles wider and the rate drops — recheck the real nozzle flow with a catch test, since worn tips over-apply.",
        "inputs": {
            "speed_mph": 5,
            "nozzle_flow_gpm": 0.4,
            "nozzle_spacing_in": 20
        },
        "application_rate_gpa": 23.76
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.110Z",
        "request_id": "f156d588-c543-42ad-9445-dc83b75fb3dd"
    },
    "status": "ok",
    "message": "Calibration",
    "success": true
}
```

#### `GET /v1/coverage` — Acres per tank and tank-loads

**Parameters:**
- `tank_volume_gal` (query, required, string) — Tank volume (gallons) Example: `300`
- `application_rate_gpa` (query, required, string) — Application rate (GPA) Example: `20`
- `field_acres` (query, optional, string) — Field size (acres) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/spray-api/v1/coverage?tank_volume_gal=300&application_rate_gpa=20&field_acres=50"
```

**Response:**
```json
{
    "data": {
        "note": "Acres covered per tank = tank volume ÷ the application rate (GPA). Give the field size and it also returns the total spray volume (acres × GPA) and how many tank-loads that is — the fractional part is the last partial fill, so mix that one to the leftover acres to avoid wasting product. Plan refills and product so the boom is never run dry mid-pass, which leaves skips.",
        "inputs": {
            "field_acres": 50,
            "tank_volume_gal": 300,
            "application_rate_gpa": 20
        },
        "full_tanks": 3,
        "tanks_needed": 3.33,
        "acres_per_tank": 15,
        "total_spray_gallons": 1000
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.186Z",
        "request_id": "fca5fdc4-6e8e-48d1-b3df-2c2ef575e952"
    },
    "status": "ok",
    "message": "Coverage",
    "success": true
}
```

#### `GET /v1/product` — Product to add per tank

**Parameters:**
- `application_rate_gpa` (query, required, string) — Application rate (GPA) Example: `20`
- `tank_volume_gal` (query, required, string) — Tank volume (gallons) Example: `300`
- `product_rate_per_acre` (query, required, string) — Label rate per acre Example: `1.5`
- `field_acres` (query, optional, string) — Field size (acres) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/spray-api/v1/product?application_rate_gpa=20&tank_volume_gal=300&product_rate_per_acre=1.5&field_acres=50"
```

**Response:**
```json
{
    "data": {
        "note": "Product per tank = the acres a tank covers × the label rate per acre (keep the rate's units — oz, pints, lb — and the answer comes back in them). Add that amount of pesticide or nutrient to each full tank and mix the partial tank to its acres. Always follow the product label for the legal rate, mixing order and any adjuvant, and agitate to keep the mix uniform.",
        "inputs": {
            "field_acres": 50,
            "tank_volume_gal": 300,
            "application_rate_gpa": 20,
            "product_rate_per_acre": 1.5
        },
        "total_product": 75,
        "acres_per_tank": 15,
        "product_per_tank": 22.5
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.283Z",
        "request_id": "c62a7607-f1d0-4eef-81bb-ef6c610035d9"
    },
    "status": "ok",
    "message": "Product per tank",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/spray-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "US units (GPM, mph, in, gal, acres). GPA = 5940·GPM/(mph·spacing); acres/tank = tank/GPA; product/tank = acres/tank × rate. Calibrate with a real catch test. For fertiliser rates use a fertilizer API; for sprinkler/irrigation design an irrigation API.",
        "service": "spray-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/product": "Product to add per tank for a label rate.",
            "GET /v1/coverage": "Acres per tank and tank-loads for a field.",
            "GET /v1/calibration": "Application rate GPA from nozzle flow, speed and spacing."
        },
        "description": "Agricultural sprayer maths: application rate (GPA) from calibration, field coverage and tank fills, and product per tank."
    },
    "meta": {
        "timestamp": "2026-06-07T08:18:00.380Z",
        "request_id": "ba34d208-0e46-49c1-9344-50cd2d43a586"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/spray-api
OpenAPI spec: https://www.oanor.com/api/spray-api/openapi.json
