Geometry
Bezier point/tangent/length API
Evaluate a quadratic or cubic Bezier curve at parameter t with the tangent direction and an arc-length estimate via adaptive sampling. Answers 'what point and tangent lie at t on this Bezier?', 'how long is the curve?'.
Price$0.03per request
MethodPOST
Route/v1/geometry/bezier
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
beziercurvetangentarc-lengthde-casteljaucubicquadratic
API URL
Integration docshttps://x402.hexl.dev/v1/geometry/bezierExample request
{
"controlPoints": [
[
0,
0
],
[
1,
2
],
[
3,
2
],
[
4,
0
]
],
"t": 0.5
}Example response
{
"point": [
2,
1.5
],
"tangent": [
4.5,
0
],
"unitTangent": [
1,
0
],
"degree": 3,
"arcLength": 5.268259404,
"t": 0.5
}Input schema
{
"type": "object",
"required": [
"controlPoints",
"t"
],
"properties": {
"controlPoints": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "3 (quadratic) or 4 (cubic) 2D/3D points",
"examples": [
[
[
0,
0
],
[
1,
2
],
[
3,
2
],
[
4,
0
]
]
]
},
"t": {
"type": "number",
"examples": [
0.5
]
},
"lengthSamples": {
"type": "integer",
"examples": [
100
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}