Gradient API

See the following link for full details: