{"openapi":"3.1.0","info":{"title":"Quaternion API","version":"1.0.0","description":"3D rotation maths as an API: convert freely between quaternions, Euler angles, axis-angle and rotation matrices, compose rotations, rotate vectors, and interpolate. The convert endpoint takes any one representation — a quaternion {w,x,y,z}, Euler angles (roll, pitch, yaw), an axis and angle, or a 3×3 matrix — and returns all four forms at once, normalized. The multiply endpoint composes two quaternions (the Hamilton product) so you can chain rotations. The rotate endpoint applies a quaternion to a 3D vector. The slerp endpoint does spherical linear interpolation between two orientations along the shortest path — the standard way to animate smooth rotations. Euler angles use the aerospace Z-Y-X (yaw-pitch-roll) intrinsic convention in degrees; quaternions follow the Hamilton convention with order w,x,y,z; matrices are row-major right-handed. Everything is computed locally and deterministically, so it is instant and private. Ideal for game and graphics engines, robotics and drones, IMU and sensor fusion, aerospace and flight dynamics, VR/AR, and 3D content tooling. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is 3D rotation maths; for 2D geometry use a geometry API and for plain angle-unit conversion use an angle API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/quaternion-api","description":"oanor gateway"}],"tags":[{"name":"Quaternion"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Quaternion"],"summary":"Convert between rotation forms","description":"","parameters":[{"name":"from","in":"query","required":false,"description":"euler|quaternion|axis_angle|matrix","schema":{"type":"string"},"example":"euler"},{"name":"roll","in":"query","required":false,"description":"roll deg (euler)","schema":{"type":"string"},"example":"0"},{"name":"pitch","in":"query","required":false,"description":"pitch deg (euler)","schema":{"type":"string"},"example":"0"},{"name":"yaw","in":"query","required":false,"description":"yaw deg (euler)","schema":{"type":"string"},"example":"90"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"matrix":[[2.22044604925e-16,-1,0],[1,2.22044604925e-16,0],[0,0,1]],"axis_angle":{"axis":[0,0,1],"angle_deg":90},"quaternion":{"w":0.707106781187,"x":0,"y":0,"z":0.707106781187},"euler_zyx_deg":{"yaw_deg":90,"roll_deg":0,"pitch_deg":0}},"meta":{"timestamp":"2026-06-03T17:42:15.860Z","request_id":"dab0b7ef-1777-4a0f-95aa-50d4762d152e"},"status":"ok","message":"Convert rotation","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/multiply":{"get":{"operationId":"get_v1_multiply","tags":["Quaternion"],"summary":"Compose two quaternions","description":"","parameters":[{"name":"q1","in":"query","required":true,"description":"w,x,y,z","schema":{"type":"string"},"example":"0.7071,0,0,0.7071"},{"name":"q2","in":"query","required":true,"description":"w,x,y,z","schema":{"type":"string"},"example":"0.7071,0,0,0.7071"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"q1 ⊗ q2 (Hamilton product) — applies q2 then q1","matrix":[[-1,0,0],[0,-1,0],[0,0,1]],"axis_angle":{"axis":[0,0,1],"angle_deg":180},"quaternion":{"w":0,"x":0,"y":0,"z":1},"euler_zyx_deg":{"yaw_deg":180,"roll_deg":0,"pitch_deg":0}},"meta":{"timestamp":"2026-06-03T17:42:15.957Z","request_id":"88f7b8c3-369a-4937-8ca0-2e129bebc0f0"},"status":"ok","message":"Multiply quaternions","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/rotate":{"get":{"operationId":"get_v1_rotate","tags":["Quaternion"],"summary":"Rotate a 3D vector","description":"","parameters":[{"name":"q","in":"query","required":true,"description":"w,x,y,z","schema":{"type":"string"},"example":"0.7071,0,0,0.7071"},{"name":"vector","in":"query","required":true,"description":"x,y,z","schema":{"type":"string"},"example":"1,0,0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"input_vector":[1,0,0],"rotated_vector":[0,1,0]},"meta":{"timestamp":"2026-06-03T17:42:16.058Z","request_id":"89e1a5c1-faa8-444c-b2d5-891cdd838782"},"status":"ok","message":"Rotate vector","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/slerp":{"get":{"operationId":"get_v1_slerp","tags":["Quaternion"],"summary":"Spherical interpolation","description":"","parameters":[{"name":"q1","in":"query","required":true,"description":"w,x,y,z","schema":{"type":"string"},"example":"1,0,0,0"},{"name":"q2","in":"query","required":true,"description":"w,x,y,z","schema":{"type":"string"},"example":"0.7071,0,0,0.7071"},{"name":"t","in":"query","required":true,"description":"0..1","schema":{"type":"string"},"example":"0.5"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"t":0.5,"matrix":[[0.707106781187,-0.707106781187,0],[0.707106781187,0.707106781187,0],[0,0,1]],"axis_angle":{"axis":[0,0,1],"angle_deg":45},"quaternion":{"w":0.923879532511,"x":0,"y":0,"z":0.382683432365},"euler_zyx_deg":{"yaw_deg":45,"roll_deg":0,"pitch_deg":0}},"meta":{"timestamp":"2026-06-03T17:42:16.157Z","request_id":"6778bf06-b0cb-48c6-a65d-2cc41314a715"},"status":"ok","message":"Slerp","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Quaternion API","notes":"All quaternions are normalized to unit length on output. Euler extraction clamps at the ±90° pitch gimbal point. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/convert","params":{"from":"euler | quaternion | axis_angle | matrix (auto-detected)","matrix":"9 numbers row-major","w,x,y,z":"for quaternion","axis,angle":"for axis-angle","roll,pitch,yaw":"for euler (deg)"},"returns":"quaternion, euler, axis-angle and matrix"},{"path":"/v1/multiply","params":{"q1":"w,x,y,z","q2":"w,x,y,z"},"returns":"the composed rotation in all forms"},{"path":"/v1/rotate","params":{"q":"w,x,y,z (or w,x,y,z fields)","vector":"x,y,z"},"returns":"the rotated vector"},{"path":"/v1/slerp","params":{"t":"0..1","q1":"w,x,y,z","q2":"w,x,y,z"},"returns":"the interpolated orientation in all forms"},{"path":"/v1/meta","params":[],"returns":"this document"}],"conventions":{"euler":"aerospace Z-Y-X (yaw-pitch-roll) intrinsic, degrees","matrix":"row-major 3x3, right-handed","quaternion":"Hamilton, order w,x,y,z"},"description":"3D rotation maths as an API: convert freely between quaternions, Euler angles, axis-angle and rotation matrices, compose rotations, rotate vectors, and interpolate. The convert endpoint takes any one representation — a quaternion {w,x,y,z}, Euler angles (roll, pitch, yaw), an axis and angle, or a 3×3 matrix — and returns all four forms at once, normalized. The multiply endpoint composes two quaternions (the Hamilton product) so you can chain rotations. The rotate endpoint applies a quaternion to a 3D vector. The slerp endpoint does spherical linear interpolation between two orientations along the shortest path, the standard way to animate smooth rotations. Euler angles use the aerospace Z-Y-X (yaw-pitch-roll) intrinsic convention in degrees; quaternions follow the Hamilton convention. Everything is computed locally and deterministically, so it is instant and private. Ideal for game and graphics engines, robotics and drones, IMU and sensor fusion, aerospace, VR/AR, and 3D tooling. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is 3D rotation maths; for 2D geometry use a geometry API and for plain angle-unit conversion use an angle API."},"meta":{"timestamp":"2026-06-03T17:42:16.240Z","request_id":"09ecb821-8002-4ce8-b4b5-4bcf89e3a3df"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":5835,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":735,"monthly_call_quota":15350,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2725,"monthly_call_quota":204500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6525,"monthly_call_quota":1065000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/quaternion-api"}