GenAerial LogoGenAerial
POST/api/external/v1/image-generation

Generate Image

Synchronously generates an aerial image based on provided specifications. Returns the generated image as a JPEG binary.

Request URL

plaintext
https://api.genaerial.com/api/external/v1/image-generation

Request Body

application/jsonImage generation parameters.
json
1{
2 "coordinates": {
3 "lat": 40.6892,
4 "lng": -74.0445
5 },
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

ParameterTypeDescription
coordinates(required)object

Geographic coordinates with lat and lng properties.

resolution(required)string

Output image resolution.

HDFHDUHD
zoom(required)string

Zoom level for the aerial view.

ExtraLowLowMediumHighExtraHigh
bearing(required)string

Compass direction the camera is facing.

NorthNorthEastEastSouthEastSouthSouthWestWestNorthWest
angle(required)string

Camera angle from the ground.

LowMediumHighTop
weather(required)string

Weather conditions in the generated image.

SunnyRainyCloudyGoldenHourSnow
daytime(required)string

Time of day for lighting conditions.

DuskDayDawnNight
aspectRatio(required)string

Aspect ratio of the output image.

SquareLandscapePortraitStandard
epoch(required)string

Historical period for the scene.

NowadaysHistoricalAncient
includeContext(optional)boolean

Enable landmark-specific enhancement for recognized locations.

includeSurroundings(optional)boolean

Include surrounding area in the generated image.

Default: true

improveOutput(optional)boolean

Apply quality enhancement to the output.

saveImage(optional)boolean

Persist the generated image in your history.

Default: true

tags(required)array

Descriptive tags for the image (maximum 10).

prompt(optional)string

Custom enhancement instructions for the generation.

Responses

200OKimage/jpeg

Generated image as JPEG binary.

400Bad Request

Invalid request parameters.

json
{
  "status": 400,
  "error": "ValidationFailed",
  "message": "Invalid coordinates: latitude must be between -90 and 90"
}
402Payment Required

Insufficient credits.

json
{
  "status": 402,
  "error": "InsufficientCredits",
  "message": "Your account has insufficient credits for this operation"
}
500Internal Server Error

Image generation failed.

json
{
  "status": 500,
  "error": "ErrorGeneratingImage",
  "message": "An error occurred while generating the image"
}

Code Examples

bash
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