Google models are called through one unified, asynchronous job API. Start a task with POST /api/generate, then poll GET /api/generate/{taskId} until it finishes. This family exposes 9 endpoints.
Overview
Every endpoint shares the same envelope — only model and the input fields change. Run any from the Models Market playground.
Authentication
Create an API key at /api-keys, then send it as a Bearer token. Requests from the browser while logged in also work via the session cookie.
Authorization: Bearer <YOUR_API_KEY>Create Task
POST https://api.lithovas.com/api/generateBody: { "model": "<slug>", "input": { … } }
Response: { "taskId": "<id>", "state": "waiting" }
Query Result
GET https://api.lithovas.com/api/generate/<taskId>Response: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state becomes success or fail. Failed tasks are not billed.Endpoints
| Model | Task | model slug |
|---|---|---|
| Imagen 4 Fast | Text to Image | google/imagen4-fast |
| Imagen 4 Ultra | Text to Image | google/imagen4-ultra |
| Imagen 4 | Text to Image | google/imagen4 |
| Nano Banana Edit | Image to Image | google/nano-banana-edit |
| Nano Banana | Text to Image | google/nano-banana |
| Pro | Image to Image | google/pro-image-to-image |
| Nano Banana 2 | Text to Image | google/nanobanana2 |
| Nano Banana 2 Lite | Text to Image | google/nano-banana-2-lite |
| Gemini 3.1 Flash TTS | Text to Speech | google/gemini-3-1-flash-tts |
Imagen 4 Fast · Text to Image
google/imagen4-fastpromptstringrequiredText prompt describing what you want to see (max 5000 characters)
negative_promptstringoptionalDescription of what to discourage in generated images (max 5000 chars)
aspect_ratioenum<string>optionalThe aspect ratio of the generated image
seedintegeroptionalRandom seed for reproducible generation
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/imagen4-fast",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"negative_prompt": "example",
"aspect_ratio": "16:9",
"seed": 42
}
}'Imagen 4 Ultra · Text to Image
google/imagen4-ultrapromptstringrequiredText description of desired image (max 5000 chars)
negative_promptstringoptionalDescription of elements to exclude from generation (max 5000 chars)
aspect_ratioenum<string>optionalOutput image aspect ratio
seedstringoptionalRandom seed for reproducible results (max 500 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/imagen4-ultra",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"negative_prompt": "example",
"aspect_ratio": "1:1",
"seed": 42
}
}'Imagen 4 · Text to Image
google/imagen4promptstringrequiredThe text prompt describing what you want to see (max 5000 characters)
negative_promptstringoptionalA description of what to discourage in the generated images (max 5000 chars)
aspect_ratioenum<string>optionalThe aspect ratio of the generated image
seedstringoptionalRandom seed for reproducible generation (max 500 characters)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/imagen4",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"negative_prompt": "example",
"aspect_ratio": "1:1",
"seed": 42
}
}'Nano Banana Edit · Image to Image
google/nano-banana-editpromptstringrequiredThe prompt for image editing (max 5000 characters)
image_urlsarray<string>requiredList of URLs of input images for editing, up to 10 images
output_formatenum<string>optionalOutput format for the generated images
aspect_ratioenum<string>optionalAspect ratio for the generated image
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-edit",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_urls": [
"https://example.com/input.jpg"
],
"output_format": "png",
"aspect_ratio": "1:1"
}
}'Nano Banana · Text to Image
google/nano-bananapromptstringrequiredThe prompt for image generation (max 5000 characters)
output_formatenum<string>optionalOutput format for the images
aspect_ratioenum<string>optionalImage aspect ratio configuration
image_sizeenum<string>optionalDeprecated parameter; use aspect_ratio instead
nsfw_checkerbooleanoptionalDisables content filtering when false
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"output_format": "png",
"aspect_ratio": "1:1",
"image_size": "1:1",
"nsfw_checker": false
}
}'Pro · Image to Image
google/pro-image-to-imagepromptstringrequiredText description of image to generate (max 10000 characters)
image_inputarray<string>optionalInput images as file URLs for transformation/reference (max 8 images, 30MB each)
aspect_ratioenum<string>optionalAspect ratio of generated image
resolutionenum<string>optionalResolution of generated image
output_formatenum<string>optionalFormat of output image
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/pro-image-to-image",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_input": [
"https://example.com/input.jpg"
],
"aspect_ratio": "1:1",
"resolution": "1K",
"output_format": "png"
}
}'Nano Banana 2 · Text to Image
google/nanobanana2promptstringrequiredText description of image to generate (max 20000 chars)
image_inputarray<string>optionalInput images as file URLs for transformation (max 14, up to 30MB)
aspect_ratiostringoptionalAspect ratio of generated image
resolutionstringoptionalOutput image resolution
output_formatstringoptionalOutput image file format
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nanobanana2",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"image_input": [
"https://example.com/input.jpg"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "jpg"
}
}'Nano Banana 2 Lite · Text to Image
google/nano-banana-2-liteimage_urlsarray<string>optionalInput image URL array for visual references; supports up to 10 images
promptstringrequiredText prompt for image generation; max 20000 characters
aspect_ratioenum<string>requiredOutput image aspect ratio
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-2-lite",
"input": {
"image_urls": [
"https://example.com/input.jpg"
],
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"aspect_ratio": "auto"
}
}'Gemini 3.1 Flash TTS · Text to Speech
google/gemini-3-1-flash-ttspromptstringrequiredText prompt describing the desired output.
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3-1-flash-tts",
"input": {
"prompt": "a red panda surfing"
}
}'