You don't need this function from some API. Why do you think that someone will develop function for all partial cases from elementary geometry. I would not make any sense.
I answered to the question on this topic here:
C++ how make an Array of recursive Objects like 8-branches tree?[
^].
No, this is not just one point and the size. Look thoroughly. Imagine you have a cube in your hand. Isn't it simple enough?
I tried to explain that defining the cube by defining 8 3D point of it was wrong. If your input is those 8 points, the resulting body may or may not be a cube, but if this is a cube, this data is redundant. The situation is even more complex. The 3D points are specified as 3 floating-point numbers, which are approximate. This way, there is no definitive yes-no answer to the question "are those 8 points a vertices of an exact cube". With what accuracy? You don't want to solve related problems, you need to avoid them. But, importantly, arbitrary 8 points mean 23 degrees of freedom. Apparently, this data is redundant to define a cube.
It is apparent that any solid body has exactly 6 degrees of freedom on 3D space. These 6 parameters would define the location of it without redundancy. Another degree of freedom is the size of the cube, as you don't consider it fixed. Take one point and fix it. It takes 3 degrees of freedom, say 3 Cartesian coordinates of it. Where is one of the neighboring vertices? Choose the size of the cube as the length of it rib. Then the second vertex will be anywhere on the sphere centered at the point of the first vertex. To fix the second vertex would take two more degrees of freedom, two angles in whatever system. When you fixed two vertices, you got a solid body freely rotating around the axis. Fix an angle on this axis. This is the 6th degree of freedom. And then, use elementary mathematics to calculate coordinates of 8 vertices, if you still need all of them. (Not sure why. It depends on your problem.) One delicate moment is this: you can consider the vertices/ribs/sides of a cube non-distinguishable. If you perform symmetric operation, say, rotate to 90° the way one face takes the place of another face, you got the same cube.
Anyway, you are the one who wants to do these calculations.
—SA