Generate Image

Generate images from text prompts using AI image generation models.

Endpoint

POST
/api/v1/jobs

Create a generate_image job

Supported Models

ModelCreditsNotes
gemini-image5Fast, high-quality generation
grok-imagine8Creative and imaginative output

Input Parameters

Request Body

NameTypeDescription
workflowrequiredstring"generate_image"
input.promptrequiredstringText description of the image to generate
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://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": 5,
  "createdAt": "2026-01-26T12:00:00.000Z",
  "_links": {
    "self": "https://vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001",
    "status": "https://vydra.ai/api/v1/jobs/660e8400-e29b-41d4-a716-446655440001"
  }
}