About this Cloud Hub Solution:
Image generator for social networks such as
- YouTube
- Tumblr
What this API does?
The API resizes and creates optimized social network images for a specified service and returns the URL of the resized image.You can pass the orientation parameter for each service to determine the desired image format.For images that are not in the correct size, the API will crop the image from the center point.
Valid / Supported Orientation Values
Instagram Default value is set to: square
square: 1080x1080
landscape: 1080x566
portrait: 1080x1350
profile: 110x110
story: 1080x1920
Twitter Default value is set to: profile
profile: 400x400
header: 1500x500
image: 1024x512
card: 1200x628
ad: 800x428
Facebook Default value is set to: profile
profile: 180x180
cover: 820x462l
ink: 1200x630
image: 1200x630
event: 1920x1080
ad: 1200x628
story ad: 1080x1920
group cover: 1640x922
messenger ad: 1200x628
Linkedin Default value is set to: profile
profile: 400x400
background: 1584x396
post desktop: 1200x1200
postmobile: 1200x628
post: 1200x628
company logo: 300x300
company cover: 1536x768
company sponsored content: 1200x627
company hero: 1128x376
company banner: 646x220
YouTubeDefault value is set to :channel cover desktop
channelcoverdesktop: 2560x1440
channelcoverphone: 1546x423
displayad: 300x250
overlayad: 480x60
companion: 300x250
Pinterest Default value is set to: profile
profile: 165x165
board: 222x150
pin: 1000x1500
Tumblr Default value is set to: profile
profile: 128x128
post: 500x750
Upload/Post
Example
curl --location --request POST \ -i 'https://api.apilayer.com/social_asset/instagram/upload' \ --data-binary '@/path/to/file/image.jpg' \ --header 'Content-Type: octet/stream' \ --header 'apikey: YOUR API KEY'Response:HTTP/1.0 201 CREATEDContent-Type: application/jsonContent-Length: 146::{ "orientation": "square", "service": "instagram", "width": 1080, "height": 1080, "url": "https://assets.apilayer.com/social_asset/instagram-square-1080x1080.jpg"}URL/Get Example$ curl --location --request GET \ -i 'https://api.apilayer.com/social_asset/tumblr/url?url=https%3A%2F%2Fexample.com%2Fimages%2Ftest.jpg%26orientation%3Dpost' \ --header 'Content-Type: octet/stream' \ --header 'apikey: YOUR API KEY'Response:HTTP/1.0 201 CREATEDContent-Type: application/jsonContent-Length: 146::{ "orientation": "post", "service": "tumblr", "width": 1080, "height": 1080, "url": "https://assets.apilayer.com/social_asset/tumblr-post-500x750-1f1299c0-e9b2-11ea-9741-acde48001122.jpg"}