LatentKit

Images

POST /v1/image — generate images through the assigned route.

Request

curl https://ai.latentkit.com/v1/image \
  -H "Authorization: Bearer $LATENTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A clean product icon on a white background",
    "size": "1024x1024"
  }'

Fields

FieldDescription
promptImage description (required)
sizeOutput size when supported by the route model (e.g. 1024x1024)
qualityQuality tier when supported (e.g. standard, hd)
styleStyle hint when supported (e.g. vivid, natural)
nNumber of images when supported
response_formatOutput format hint when supported (e.g. url, b64_json)
response_profilefast, balanced, or deep when the route allows overrides

The route must include a model with the image_generation capability (for example DALL·E or Grok Imagine image models). Unsupported option values are ignored or rejected by the upstream model.

SDK

const image = await client.image.generate({
  prompt: 'A clean product icon on a white background',
  size: '1024x1024',
});
image = client.image.generate(
    prompt="A clean product icon on a white background",
    size="1024x1024",
)

Responses follow the unified runtime shape for your route's provider adapter. Inspect the returned payload for URLs or base64 content fields.

Billing

Platform Access image generation consumes workspace credits. BYOK image generation is charged by your provider account. Check current model pricing in the console.

Free plan note

Plain image generation requests may count toward a workspace managed onboarding allowance on Free plans. After limits or without credits, add credits or use BYOK routes.

On this page