Skip to content
GET /v1/collision

1D two-body collision

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/momentum-api

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

Get an API key

Code snippets

curl "https://api.oanor.com/momentum-api/v1/collision" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/momentum-api/v1/collision", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/momentum-api/v1/collision");
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/momentum-api/v1/collision",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

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

{
    "data": {
        "formula": "momentum is conserved; v' from restitution e (1 elastic, 0 inelastic).",
        "mass1_kg": 2,
        "mass2_kg": 1,
        "restitution": 1,
        "collision_type": "perfectly elastic",
        "velocity1_final_ms": 0.333333,
        "velocity2_final_ms": 4.333333,
        "total_momentum_kg_ms": 5,
        "velocity1_initial_ms": 3,
        "velocity2_initial_ms": -1,
        "kinetic_energy_lost_j": 0,
        "kinetic_energy_after_j": 9.5,
        "kinetic_energy_before_j": 9.5
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:44.907Z",
        "request_id": "2a2c600b-a66d-4cc6-960e-664797f615d7"
    },
    "status": "ok",
    "message": "1D two-body collision",
    "success": true
}