Test API connection and image upload with command line
You can use the command line cURL utility to make your first upload. Copy the code below, change the parameter values (in square brackets) and execute the command in your terminal.
curl -X POST \ https://api2.smartframe.io/v1/images \ -H 'x-api-key: [API_key]' \ -F id=[image_id] \ -F file=@[/path/to/localfile.jpg]
The SmartFrame API will respond with JSON similar to this:
{ "id": "my-image-id", "thumbnailUrl": "...", "metadata": { "_id": "my-image-id" }, "added": 0, "updated": 0, "fileName": "yourfile.jpeg", "fileSize": 0, "width": 512, "height": 512 }
Integrating SmartFrame API into your website
REST API allows for full CRUD (Create Read Update Delete) management of images. You can find the API methods, error codes and a test tool in the REST API reference.
Once you’re ready with the integration, please proceed to the installation of SmartFrame on your webpages.
API reference
Need further help?
Contact us