API generation example