Social Image
About this tool
How to use it
- Choose this tool.
- Choose which platform the image is for.
- Type your Headline and, if you like, a smaller line.
- Choose where the text goes and its colour, and optionally describe the picture.
- Press Generate, then download the image.
What you get back
Try Social Image in the Studio
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/ai/generation/social" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-H "Content-Type: application/json" \
-d '{"on_unsupported":"error","platform":"instagram-square","text_position":"top"}'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.ai.generation.social({
"on_unsupported": "error",
"platform": "instagram-square",
"text_position": "top"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->ai()->generation()->social([
'on_unsupported' => 'error',
'platform' => 'instagram-square',
'text_position' => 'top',
]);
echo $result->requestId;