Skip to main content
POST
/
v1
/
images
/
generations
curl --request POST \
  --url https://gccai.heqingsong.uk/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "imagen-4.0-gccai",
    "prompt": "A corgi wearing an astronaut helmet, standing on the lunar surface, Earth in the background, cinematic lighting, 8k",
    "size": "16:9"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://gccai.heqingsong.uk/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url https://gccai.heqingsong.uk/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "imagen-4.0-gccai",
    "prompt": "A corgi wearing an astronaut helmet, standing on the lunar surface, Earth in the background, cinematic lighting, 8k",
    "size": "16:9"
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8AYYM6R03TGZ3Q2P0TZVNPX"
    }
  ]
}

Authorizations

Authorization
string
required
All APIs require Bearer Token authenticationGet API Key:Visit the API Key Management Page to obtain your API KeyAdd the following to your request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"imagen-4.0-gccai"
required
Image generation model nameFixed value: imagen-4.0-gccai
prompt
string
required
Text description for image generationBoth English and Chinese descriptions are supported
n
integer
default:"1"
Number of images to generateValue range: 1
size
string
default:"16:9"
Image generation ratioSupported formats:
  • 1:1 - Square
  • 4:3 - Landscape
  • 3:4 - Portrait
  • 16:9 - Landscape (default)
  • 9:16 - Portrait
Ratios not in the supported list (e.g. 21:9) will automatically fall back to the default 16:9 without raising an error.
Unsupported fields: image, image_urls, mask, quality, etc. will be ignored. If image_urls / image is passed, it will error directly: google_imagen4 currently supports text-to-image only.

Response

code
integer
Response status code
data
array
Response data array