Text to image
chatular-image-apiSend your words and get a new picture back.
- Address
POST /api/image/text-to-image- Input
- Text
- Output
- Picture
curl https://api.chatular.ai/api/image/text-to-image \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":"A perfume poster, Velvet Night, new scent","shape":"tall"}'The answer, with your picture
{
"pictures": [
{
"id": "k3J9…",
"prompt": "A perfume poster, Velvet Night, new scent",
"shape": "tall",
"width": 576,
"height": 1024,
"createdAt": 1793491200000,
"file": "/api/image/k3J9…/file"
}
],
"failed": 0
}What you send
| Field | Type | What it is |
|---|---|---|
prompt | string | What to create, in any language, up to 2,500 characters. Required. |
shape | string | square, portrait, tall or wide. Leave it out and the words decide, else square. |
count | number | How many pictures, 1 to 4. The default is 1. |
