MarketSupport← Back to app

Google

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
POST https://api.lithovas.com/api/generate

Body: { "model": "<slug>", "input": { … } }

Response: { "taskId": "<id>", "state": "waiting" }

Query Result

GET
GET https://api.lithovas.com/api/generate/<taskId>

Response: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

Asynchronous
A 200 from Create Task only means the task was accepted — not finished. Poll this endpoint until state becomes success or fail. Failed tasks are not billed.

Endpoints

ModelTaskmodel slug
Imagen 4 FastText to Imagegoogle/imagen4-fast
Imagen 4 UltraText to Imagegoogle/imagen4-ultra
Imagen 4Text to Imagegoogle/imagen4
Nano Banana EditImage to Imagegoogle/nano-banana-edit
Nano BananaText to Imagegoogle/nano-banana
ProImage to Imagegoogle/pro-image-to-image
Nano Banana 2Text to Imagegoogle/nanobanana2
Nano Banana 2 LiteText to Imagegoogle/nano-banana-2-lite
Gemini 3.1 Flash TTSText to Speechgoogle/gemini-3-1-flash-tts

Imagen 4 Fast · Text to Image

POSTText to Imagegoogle/imagen4-fast
input fields
promptstringrequired

Text prompt describing what you want to see (max 5000 characters)

negative_promptstringoptional

Description of what to discourage in generated images (max 5000 chars)

aspect_ratioenum<string>optional

The aspect ratio of the generated image

seedintegeroptional

Random seed for reproducible generation

Example
cURL
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

POSTText to Imagegoogle/imagen4-ultra
input fields
promptstringrequired

Text description of desired image (max 5000 chars)

negative_promptstringoptional

Description of elements to exclude from generation (max 5000 chars)

aspect_ratioenum<string>optional

Output image aspect ratio

seedstringoptional

Random seed for reproducible results (max 500 chars)

Example
cURL
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

POSTText to Imagegoogle/imagen4
input fields
promptstringrequired

The text prompt describing what you want to see (max 5000 characters)

negative_promptstringoptional

A description of what to discourage in the generated images (max 5000 chars)

aspect_ratioenum<string>optional

The aspect ratio of the generated image

seedstringoptional

Random seed for reproducible generation (max 500 characters)

Example
cURL
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

POSTImage to Imagegoogle/nano-banana-edit
input fields
promptstringrequired

The prompt for image editing (max 5000 characters)

image_urlsarray<string>required

List of URLs of input images for editing, up to 10 images

output_formatenum<string>optional

Output format for the generated images

aspect_ratioenum<string>optional

Aspect ratio for the generated image

Example
cURL
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

POSTText to Imagegoogle/nano-banana
input fields
promptstringrequired

The prompt for image generation (max 5000 characters)

output_formatenum<string>optional

Output format for the images

aspect_ratioenum<string>optional

Image aspect ratio configuration

image_sizeenum<string>optional

Deprecated parameter; use aspect_ratio instead

nsfw_checkerbooleanoptional

Disables content filtering when false

Example
cURL
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

POSTImage to Imagegoogle/pro-image-to-image
input fields
promptstringrequired

Text description of image to generate (max 10000 characters)

image_inputarray<string>optional

Input images as file URLs for transformation/reference (max 8 images, 30MB each)

aspect_ratioenum<string>optional

Aspect ratio of generated image

resolutionenum<string>optional

Resolution of generated image

output_formatenum<string>optional

Format of output image

Example
cURL
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

POSTText to Imagegoogle/nanobanana2
input fields
promptstringrequired

Text description of image to generate (max 20000 chars)

image_inputarray<string>optional

Input images as file URLs for transformation (max 14, up to 30MB)

aspect_ratiostringoptional

Aspect ratio of generated image

resolutionstringoptional

Output image resolution

output_formatstringoptional

Output image file format

Example
cURL
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

POSTText to Imagegoogle/nano-banana-2-lite
input fields
image_urlsarray<string>optional

Input image URL array for visual references; supports up to 10 images

promptstringrequired

Text prompt for image generation; max 20000 characters

aspect_ratioenum<string>required

Output image aspect ratio

Example
cURL
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

POSTText to Speechgoogle/gemini-3-1-flash-tts
input fields
promptstringrequired

Text prompt describing the desired output.

Example
cURL
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"
  }
}'