マーケットサポート← アプリに戻る

Google

Google モデルは統一された非同期ジョブ API で呼び出します。POST /api/generate でタスクを開始し、完了するまで GET /api/generate/{taskId} をポーリングします。このファミリーは 9 個のエンドポイントを提供します。

概要

すべてのエンドポイントは同じ外枠を共有し、変わるのは modelinput フィールドだけです。モデルマーケットの playground から任意に実行できます。

認証

/api-keys で API キーを作成し、Bearer トークンとして送信します。ログイン中のブラウザからのリクエストはセッション cookie 経由でも動作します。

Authorization: Bearer <YOUR_API_KEY>

タスクの作成

POST
POST https://api.lithovas.com/api/generate

ボディ:{ "model": "<slug>", "input": { … } }

レスポンス:{ "taskId": "<id>", "state": "waiting" }

結果の照会

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

レスポンス:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

非同期
タスク作成の 200 は、タスクが受理されたことを意味するだけで、完了ではありません。statesuccess または fail になるまでこのエンドポイントをポーリングしてください。失敗したタスクは課金されません。

エンドポイント

モデルタスクmodel 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 フィールド
promptstring必須

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

negative_promptstring任意

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

aspect_ratioenum<string>任意

The aspect ratio of the generated image

seedinteger任意

Random seed for reproducible generation

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 フィールド
promptstring必須

Text description of desired image (max 5000 chars)

negative_promptstring任意

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

aspect_ratioenum<string>任意

Output image aspect ratio

seedstring任意

Random seed for reproducible results (max 500 chars)

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 フィールド
promptstring必須

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

negative_promptstring任意

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

aspect_ratioenum<string>任意

The aspect ratio of the generated image

seedstring任意

Random seed for reproducible generation (max 500 characters)

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 フィールド
promptstring必須

The prompt for image editing (max 5000 characters)

image_urlsarray<string>必須

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

output_formatenum<string>任意

Output format for the generated images

aspect_ratioenum<string>任意

Aspect ratio for the generated image

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 フィールド
promptstring必須

The prompt for image generation (max 5000 characters)

output_formatenum<string>任意

Output format for the images

aspect_ratioenum<string>任意

Image aspect ratio configuration

image_sizeenum<string>任意

Deprecated parameter; use aspect_ratio instead

nsfw_checkerboolean任意

Disables content filtering when false

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 フィールド
promptstring必須

Text description of image to generate (max 10000 characters)

image_inputarray<string>任意

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

aspect_ratioenum<string>任意

Aspect ratio of generated image

resolutionenum<string>任意

Resolution of generated image

output_formatenum<string>任意

Format of output image

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 フィールド
promptstring必須

Text description of image to generate (max 20000 chars)

image_inputarray<string>任意

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

aspect_ratiostring任意

Aspect ratio of generated image

resolutionstring任意

Output image resolution

output_formatstring任意

Output image file format

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 フィールド
image_urlsarray<string>任意

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

promptstring必須

Text prompt for image generation; max 20000 characters

aspect_ratioenum<string>必須

Output image aspect ratio

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 フィールド
promptstring必須

Text prompt describing the desired output.

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