API

Image generation

Generate images with the OpenAI Images format. Images are returned as base64 in data[0].b64_json.

OpenAI Images format

curl https://api.llm-hub.dev/v1/images/generations \
  -H "Authorization: Bearer $LLMHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image-preview",
    "prompt": "A banana astronaut, cinematic lighting"
  }'
FieldDescription
modelAn image model ID from Models. Required.
promptText description of the image. Required.
nNumber of images. Currently only 1 is supported.

Gemini-style requests

Text-only image prompts also work at POST /v1beta/models/{model}:generateContent. Authenticate with Authorization: Bearer or x-goog-api-key.

Last updated