# 1D Collision Calculator

> 1D Collision Calculator is a paid API for AI agents from physics-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates post-collision velocities, momentum, and kinetic energy loss for a head-on collision between two masses with configurable restitution.

## Facts

- Endpoint: GET https://physics-calc.x402tookit.com/collision-1d?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/1d-collision-calculator-c427cd64
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y99HMl7lw8XsVI6ZLrjUm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 1d-collision-calculator-c427cd64
```

Example prompt: A 2 kg ball moving right at 5 m/s hits a 3 kg ball moving left at 2 m/s — what are their velocities after impact, and how much kinetic energy is lost? Use a coefficient of restitution of 0.8.

## When to prefer this

Choose this endpoint when you need to compute the outcome of a one-dimensional collision between two point masses with any degree of elasticity, from perfectly elastic (restitution=1) to perfectly inelastic (restitution=0). It is ideal for physics homework, engineering simulations, game physics validation, or any scenario requiring both velocity outcomes and energy/momentum accounting in a single call.

## Known failure modes

- Missing required parameters (m1, v1, m2, v2) returns an error
- Restitution coefficient outside 0–1 range may return an error or unexpected result
- Non-numeric values for mass or velocity cause a bad request error
- Negative mass values may be rejected or produce nonsensical output

## How this service works

Head-on collision of two masses: velocities after impact, momentum and kinetic energy lost, elastic to perfectly inelastic.

## Output

Returns the post-collision velocities of both bodies (m/s), kinetic energy before and after the collision (J), kinetic energy lost (J), total momentum (kg·m/s), centre-of-mass velocity, and the restitution coefficient used. Also includes a summary and any relevant warnings or disclaimers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "m1",
      "v1",
      "m2",
      "v2"
     ],
     "properties": {
      "m1": {
       "type": "number",
       "description": "Mass of body 1 in kg (body 1 starts to the left)"
      },
      "m2": {
       "type": "number",
       "description": "Mass of body 2 in kg"
      },
      "v1": {
       "type": "number",
       "description": "Velocity of body 1 in m/s (positive = rightward)"
      },
      "v2": {
       "type": "number",
       "description": "Velocity of body 2 in m/s"
      },
      "restitution": {
       "type": "number",
       "description": "Coefficient of restitution 0 to 1 (default 1, elastic; 0 sticks together)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "restitution": {
       "type": [
        "null",
        "number"
       ]
      },
      "velocityAfter1": {
       "type": [
        "null",
        "number"
       ]
      },
      "velocityAfter2": {
       "type": [
        "null",
        "number"
       ]
      },
      "totalMomentumKgMS": {
       "type": [
        "null",
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/1d-collision-calculator-c427cd64/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from physics-calc.x402tookit.com](https://www.zero.xyz/host/physics-calc.x402tookit.com/llms.txt)
