API serialization