Dim Weight API
Dimensional weight (DIM) from shipment dimensions. Returns dim weight, actual weight, and the billable weight (the larger of the two). Defaults to the US ground dim factor of 139. JSON in, JSON out. CORS open. Free for 60 requests per hour without a key.
30-second start
POST your inputs. Get back the answer in JSON. No signup. No key required for the first 60 calls per hour per IP.
curl
curl -X POST https://www.wearewarp.com/api/v1/tools/dim-weight \
-H "Content-Type: application/json" \
-d '{"length":24,"width":18,"height":12,"weight":8}'Or use GET with query params for one-liners:
curl GET
curl "https://www.wearewarp.com/api/v1/tools/dim-weight?length=24&width=18&height=12&weight=8"
Request
POST /api/v1/tools/dim-weight
Air dim factor example (166):
curl
curl -X POST https://www.wearewarp.com/api/v1/tools/dim-weight \
-H "Content-Type: application/json" \
-d '{"length":24,"width":18,"height":12,"weight":8,"dim_factor":166}'Response
Every response has a data envelope (the computed result) and a meta envelope (rate limits, docs, upgrade path, attribution).
200 OK
{
"data": {
"actual_weight_lb": 8,
"dim_weight_lb": 37.29,
"billable_weight_lb": 37.29,
"billed_by": "dim",
"dim_factor": 139
},
"meta": {
"request_id": "req_lzgk2zo_a1b2c3d4",
"tier": "anon",
"rate_limit": { "limit": 60, "remaining": 59, "reset_at": "2026-05-15T19:00:00.000Z" },
"docs": "https://www.wearewarp.com/developers/tools-api/dim-weight",
"attribution": "Powered by Warp — https://www.wearewarp.com"
}
}Code samples
JavaScript (fetch)
const res = await fetch('https://www.wearewarp.com/api/v1/tools/dim-weight', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"length":24,"width":18,"height":12,"weight":8}),
});
const { data, meta } = await res.json();
console.log(data.length);Python (requests)
import requests
res = requests.post(
"https://www.wearewarp.com/api/v1/tools/dim-weight",
json={"length":24,"width":18,"height":12,"weight":8},
)
data = res.json()["data"]
print(data["length"])curl with sandbox key
curl -X POST https://www.wearewarp.com/api/v1/tools/dim-weight \
-H "Content-Type: application/json" \
-H "Authorization: Bearer wak_test_YOUR_KEY" \
-d '{"length":24,"width":18,"height":12,"weight":8}'Rate limits and tiers
No tier blocks access. Hit the limit and the response includes an upgradeURL with the next tier's signup flow.
Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. The meta.rate_limit object mirrors the same values in JSON.
Rate-limited response:
429 Too Many Requests
{
"error": "Anonymous rate limit reached (60/hr). Get a free sandbox key for 1000/hr at https://www.wearewarp.com/agents/account.",
"code": "RATE_LIMITED",
"meta": { "tier": "anon", "rate_limit": { "limit": 60, "remaining": 0 }, "upgrade": "..." }
}Errors
Bad input example:
400 Bad Request
{
"error": "dim_factor must be a positive number (default 139 for US ground).",
"code": "BAD_INPUT",
"meta": { "request_id": "req_...", "docs": "https://www.wearewarp.com/developers/tools-api/dim-weight" }
}Attribution
The free tier carries an attribution request: link back to wearewarp.com from any surface that displays results from this API. A “Powered by Warp” link in your footer is enough. Live keys remove the attribution request.
Every API response includes meta.attribution so you can render the link programmatically.
How dim weight is calculated
- Cubic inches. length × width × height.
- Dim weight (lb). cubic inches ÷ dim_factor. Defaults to 139 for US ground.
- Billable weight. max(actual_weight, dim_weight). Carriers bill whichever is larger.
Common dim factors: 139 (UPS / FedEx Ground domestic), 166 (UPS / FedEx Air, USPS, international), 250 (metric cm³/kg). Warp LTL prices by pallet, so dim weight never determines your rate — only relevant for parcel and small-pack carriers.
Related
Get a free sandbox key
Sandbox keys take 30 seconds. No card. 1,000 calls per hour across every Warp tool API.