API and examples

Add the API and examples