# Screen Printing API
> Screen-printing maths as an API, computed locally and deterministically — the ink-usage and cost numbers an apparel printer or print shop quotes a job by. It all turns on “ink mileage”, the printed area a unit of ink covers — in² per pound, with plastisol commonly 12,000–18,000 depending on mesh and deposit. The ink endpoint sizes a run: ink = (print area × prints) ÷ mileage, so a 100 in² design printed 150 times at 15,000 in²/lb takes exactly one pound (454 g, about 3 g a print); pass the design as area or as width × height. The prints endpoint runs it in reverse — how many shirts a tub of ink will do: prints = (ink weight × mileage) ÷ print area, so a pound of plastisol covers 15,000 in², roughly 150 prints of that design before waste, and it takes pounds, kilograms or grams. The cost endpoint puts a price on it: ink pounds × price per pound gives the run’s ink cost and the per-print figure, usually just a few cents — ink only, before screens, garments and labour. Everything is computed locally and deterministically, so it is instant and private. Ideal for screen-printing, apparel-decoration, print-shop and merch app developers, quoting and job-costing tools, and production-planning software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Ink only; add screens, garments and labour for a full quote.

## 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/screenprint-api/..."
```

## Pricing
- **Free** (Free) — 6,650 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 53,800 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 221,500 calls/Mo, 15 req/s
- **Mega** ($39/Mo) — 1,318,000 calls/Mo, 40 req/s

## Endpoints

### ScreenPrint

#### `GET /v1/cost` — Ink cost per print + run

**Parameters:**
- `prints` (query, required, string) — Number of prints Example: `150`
- `ink_price_per_lb` (query, required, string) — Ink price per pound Example: `25`
- `area_in2` (query, optional, string) — Print area (in²) Example: `100`
- `width_in` (query, optional, string) — Print width (in)
- `height_in` (query, optional, string) — Print height (in)
- `mileage_in2_per_lb` (query, optional, string) — Ink mileage (default 15000) Example: `15000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/screenprint-api/v1/cost?prints=150&ink_price_per_lb=25&area_in2=100&mileage_in2_per_lb=15000"
```

**Response:**
```json
{
    "data": {
        "note": "Ink cost = pounds used × price per pound. This is INK only — add screens, emulsion, garments, labour and flash/cure energy for a full job cost. Per-print ink cost is usually a few cents.",
        "inputs": {
            "prints": 150,
            "area_in2": 100,
            "ink_price_per_lb": 25,
            "mileage_in2_per_lb": 15000
        },
        "ink_pounds": 1,
        "total_ink_cost": 25,
        "ink_cost_per_print": 0.1667
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:01.112Z",
        "request_id": "7001bda9-a3b7-4050-b89f-43622c0c7ff7"
    },
    "status": "ok",
    "message": "Ink cost",
    "success": true
}
```

#### `GET /v1/ink` — Ink needed for a run

**Parameters:**
- `prints` (query, required, string) — Number of prints Example: `150`
- `area_in2` (query, optional, string) — Print area (in²) Example: `100`
- `width_in` (query, optional, string) — Print width (in)
- `height_in` (query, optional, string) — Print height (in)
- `mileage_in2_per_lb` (query, optional, string) — Ink mileage (default 15000) Example: `15000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/screenprint-api/v1/ink?prints=150&area_in2=100&mileage_in2_per_lb=15000"
```

**Response:**
```json
{
    "data": {
        "note": "Ink = (print area × prints) ÷ ink mileage. Mileage is in² covered per pound — plastisol runs ~12,000–18,000 in²/lb (lower for heavy underbase/low mesh, higher for thin prints on fine mesh). Buy ~15–20 % extra for the screen, flooding and waste.",
        "inputs": {
            "prints": 150,
            "area_in2": 100,
            "mileage_in2_per_lb": 15000
        },
        "ink_grams": 453.6,
        "ink_pounds": 1,
        "grams_per_print": 3.02,
        "total_print_area_in2": 15000
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:01.206Z",
        "request_id": "27a404af-3af3-4f66-9f37-4782f3786741"
    },
    "status": "ok",
    "message": "Ink needed",
    "success": true
}
```

#### `GET /v1/prints` — Prints from a quantity of ink

**Parameters:**
- `ink_amount` (query, required, string) — Amount of ink Example: `1`
- `ink_unit` (query, optional, string) — lb, kg or g (default lb) Example: `lb`
- `area_in2` (query, optional, string) — Print area (in²) Example: `100`
- `width_in` (query, optional, string) — Print width (in)
- `height_in` (query, optional, string) — Print height (in)
- `mileage_in2_per_lb` (query, optional, string) — Ink mileage (default 15000) Example: `15000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/screenprint-api/v1/prints?ink_amount=1&ink_unit=lb&area_in2=100&mileage_in2_per_lb=15000"
```

**Response:**
```json
{
    "data": {
        "note": "Prints = (ink weight × mileage) ÷ print area, rounded down. A pound of plastisol at 15,000 in²/lb covers 15,000 in² — about 150 prints of a 100 in² design before waste.",
        "inputs": {
            "area_in2": 100,
            "ink_unit": "lb",
            "ink_amount": 1,
            "mileage_in2_per_lb": 15000
        },
        "prints": 150,
        "ink_pounds": 1,
        "coverable_area_in2": 15000
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:01.306Z",
        "request_id": "11d09277-bef7-4017-813a-4461f3e35520"
    },
    "status": "ok",
    "message": "Prints from ink",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Print area in in² (or width_in × height_in). Ink mileage in in²/lb (default 15,000 for plastisol). These cover INK only — screens, emulsion, garments and labour are separate. For garment-quantity pricing add your shop rates.",
        "service": "screenprint-api",
        "endpoints": {
            "GET /v1/ink": "Ink (pounds/grams) needed to print a run from the design area and ink mileage.",
            "GET /v1/cost": "Ink cost per print and for the run from a price per pound.",
            "GET /v1/meta": "This document.",
            "GET /v1/prints": "How many prints a given quantity of ink yields."
        },
        "description": "Screen-printing maths: ink usage from ink mileage, prints obtainable from a quantity of ink, and ink cost per print."
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:01.409Z",
        "request_id": "9845fe16-0fd0-496a-bb6f-6eb3044e18c3"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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