LLM.kiwi LogoLLM.kiwi

Image Generation

Generate images from text descriptions using our high-quality image models.

Endpoint

POST/v1/images/generations

Parameters

ParameterTypeDescription
promptstringText description of the image to generate
modelstringModel to use. Default: flux
sizestring1024x1024, 1792x1024, 1024x1792
nintegerNumber of images to generate. Default: 1

Examples

curl https://api.llm.kiwi/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "flux",
    "prompt": "A futuristic city at sunset",
    "size": "1024x1024"
  }'

Response

{
  "created": 1703456789,
  "data": [
    {
      "url": "https://api.llm.kiwi/i/abc123.png",
      "revised_prompt": "A stunning futuristic city..."
    }
  ]
}