/api/external/v1/image-generationGenerate Image
Synchronously generates an aerial image based on provided specifications. Returns the generated image as a JPEG binary.
Request URL
https://api.genaerial.com/api/external/v1/image-generationRequest Body
application/jsonImage generation parameters.1{2 "coordinates": {3 "lat": 40.6892,4 "lng": -74.04455 },6 "resolution": "FHD",7 "zoom": "Medium",8 "bearing": "North",9 "angle": "Medium",10 "weather": "Sunny",11 "daytime": "Day",12 "aspectRatio": "Landscape",13 "epoch": "Nowadays",14 "includeContext": true,15 "includeSurroundings": true,16 "improveOutput": true,17 "saveImage": true,18 "tags": ["new-york", "statue-of-liberty"],19 "prompt": "Emphasize the Statue of Liberty"20}Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
coordinates(required) | object | Required | Geographic coordinates with lat and lng properties. |
resolution(required) | string | Required | Output image resolution. HDFHDUHD |
zoom(required) | string | Required | Zoom level for the aerial view. ExtraLowLowMediumHighExtraHigh |
bearing(required) | string | Required | Compass direction the camera is facing. NorthNorthEastEastSouthEastSouthSouthWestWestNorthWest |
angle(required) | string | Required | Camera angle from the ground. LowMediumHighTop |
weather(required) | string | Required | Weather conditions in the generated image. SunnyRainyCloudyGoldenHourSnow |
daytime(required) | string | Required | Time of day for lighting conditions. DuskDayDawnNight |
aspectRatio(required) | string | Required | Aspect ratio of the output image. SquareLandscapePortraitStandard |
epoch(required) | string | Required | Historical period for the scene. NowadaysHistoricalAncient |
includeContext(optional) | boolean | Optional | Enable landmark-specific enhancement for recognized locations. |
includeSurroundings(optional) | boolean | Optional | Include surrounding area in the generated image. Default: |
improveOutput(optional) | boolean | Optional | Apply quality enhancement to the output. |
saveImage(optional) | boolean | Optional | Persist the generated image in your history. Default: |
tags(required) | array | Required | Descriptive tags for the image (maximum 10). |
prompt(optional) | string | Optional | Custom enhancement instructions for the generation. |
Responses
image/jpegGenerated image as JPEG binary.
Invalid request parameters.
{
"status": 400,
"error": "ValidationFailed",
"message": "Invalid coordinates: latitude must be between -90 and 90"
}Insufficient credits.
{
"status": 402,
"error": "InsufficientCredits",
"message": "Your account has insufficient credits for this operation"
}Image generation failed.
{
"status": 500,
"error": "ErrorGeneratingImage",
"message": "An error occurred while generating the image"
}Code Examples
curl -X POST "https://api.genaerial.com/api/external/v1/image-generation" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"coordinates": { "lat": 40.6892, "lng": -74.0445 },
"resolution": "FHD",
"zoom": "Medium",
"bearing": "North",
"angle": "Medium",
"weather": "Sunny",
"daytime": "Day",
"aspectRatio": "Landscape",
"epoch": "Nowadays",
"tags": []
}' \
--output statue-of-liberty.jpg