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"
}'| Field | Description |
|---|---|
model | An image model ID from Models. Required. |
prompt | Text description of the image. Required. |
n | Number 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
