Base URL:
https://platform.runblob.ioPOST /v1/chatgpt-images/generate
Creates an image generation task from text description using ChatGPT Image 1.5 model.Text description of the image (1-4000 characters)
Image aspect ratio. Options:
1:1 (square), 4:3 (landscape), 3:4 (portrait)Optional — if not provided, model automatically chooses the best ratio for your prompt.Array of up to 4 images for reference-based generation. Each element can be:
- HTTP/HTTPS URL (e.g.,
"https://example.com/image.jpg") - Base64 with MIME type (e.g.,
"data:image/jpeg;base64,/9j/4AAQSkZJRg...") - Base64 without prefix (decoded as JPEG by default)
Webhook URL for completion notifications
Aspect Ratio: Optional parameter. If omitted, model automatically selects the best ratio for your prompt.
Response
UUID of the generation task for status checking
Initial status, always
"pending"Amount charged in USD
Image generation typically takes 1-3 minutes. Use the
task_uuid to check status or set up webhooks for notifications.Check status: GET /v1/chatgpt-images/generations/{task_uuid}Generation Modes
The API supports 2 generation modes:1. Text-to-Image
Generate image from text prompt only (no reference images).2. Reference-Based Generation
Generate image using up to 4 reference images.- Max images: 4 per request
- Formats: JPEG, PNG, WEBP
- Image sources:
- HTTP/HTTPS URLs (server saves as link)
- Base64 with MIME type:
data:image/jpeg;base64,... - Base64 without prefix (decoded as JPEG)
Image Format Options
URL Format
URL Format
HTTP/HTTPS URLs:
- Server saves as link (doesn’t download)
- Must be publicly accessible
- Example:
"https://example.com/image.jpg"
Base64 with MIME
Base64 with MIME
Full Base64 string:
- Includes MIME type prefix
- Example:
"data:image/jpeg;base64,/9j/4AAQSkZJRg..." - Example:
"data:image/png;base64,iVBORw0KGgoAAAANS..."
Base64 without Prefix
Base64 without Prefix
Plain Base64:
- No prefix, decoded as JPEG by default
- Example:
"/9j/4AAQSkZJRg..." - Automatically uploaded to S3