Generate Image

Generate images from text prompts using AI image generation models.

Image generation may return a running job. Poll until completed and read output.imageUrl, or use a completion webhook. Nano Banana Pro accepts input.execution_mode = "batch" when enabled for queued work with up to 24-hour target turnaround. Standard is the default; credits currently match in both modes. See batch examples.

Endpoint

POST
/api/v1/jobs

Create a generate_image job

Supported Models

ModelCreditsNotes
gemini-image20Fast, high-quality generation
grok-imagine8Creative and imaginative output
nano-banana20Original Nano Banana
nano-banana-2-lite20Efficient 1K image generation
nano-banana-235 / 45 / 651K / 2K / 4K
nano-banana-pro75 / 75 / 110Premium 1K / 2K / 4K generation
gpt-image-230Detailed compositions, medium quality; 1:1, 3:2, 2:3
gpt-image-2.5-sunburst15Precise compositions, typography and reference editing; 1:1, 3:2, 2:3
gpt-image-2.5-flare15Fast image generation and reference editing; 1:1, 3:2, 2:3

Input Parameters

Request Body

NameTypeDescription
workflowrequiredstring"generate_image"
input.promptrequiredstringText description of the image to generate
input.resolutionstringDefault: 1KNano Banana Pro/2: 1K, 2K, 4K. Original/Lite: 1K only. Text-to-image only for the new Nano Banana variants.
input.modelstringDefault: gemini-imageModel to use
input.aspect_ratiostringDefault: 1:1Aspect ratio (e.g., '16:9', '9:16', '1:1')
webhookUrlstringURL to receive completion notification

Example Request

Create Image Job

curl -X POST https://www.vydra.ai/api/v1/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "generate_image",
    "input": {
      "prompt": "A cyberpunk cityscape at night with neon lights",
      "model": "gemini-image",
      "aspect_ratio": "16:9"
    }
  }'

Example Response

Response (201 Created)json
{
  "id": "660e8400-e29b-41d4-a716-446655440001",
  "status": "running",
  "workflow": "generate_image",
  "creditsCharged": 20,
  "createdAt": "2026-01-26T12:00:00.000Z",
  "_links": {
    "self": "https://www.vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001",
    "status": "https://www.vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001"
  }
}