Command for creating an object of custom size
Yes, you can use radius

bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0), radius=2)


See the documentation for more details.

radius in this case is the half of the cubes edge length, so

bpy.ops.mesh.primitive_cube_add(location=(0.0, 0.0, 0.0), radius=edgelen/2)


would build a cube with edge length of edgelen.

Answer uses the Python API of Blender 2.72