Skip to content
GET /v1/ratio

Split a volume by a mixing ratio

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/paint-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/paint-api/v1/ratio" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/paint-api/v1/ratio", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/paint-api/v1/ratio");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/paint-api/v1/ratio",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "ratio": "4:1",
        "formula": "each component = total · part / sum(parts).",
        "ratio_sum": 5,
        "components": [
            {
                "index": 0,
                "label": "base",
                "ratio": 4,
                "amount": 4,
                "percent": 80
            },
            {
                "index": 1,
                "label": "hardener",
                "ratio": 1,
                "amount": 1,
                "percent": 20
            }
        ],
        "total_volume": 5
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:51.761Z",
        "request_id": "e970a496-bc21-469b-b587-36fd7aba509a"
    },
    "status": "ok",
    "message": "Split a volume by a mixing ratio",
    "success": true
}