Rails app, upload via api, test via curl

How can i make my photo rails app to receive images (and handling them with paperclip) through the built in API using paperclip plugin. My app working fine on the web app side..How can i test the API with curl command? How can specify the end-point url?

thanks.