Skip to main content

Endpoint

POST /api/v1/images/generations

Request body

FieldTypeDescription
modelstringImage model id, or auto
promptstringRequired text prompt
response_formatstringb64_json (default) or url
width / heightnumberOptional when supported
seednumberOptional
negative_promptstringOptional

Example

curl https://chat.icelake.io/api/v1/images/generations \
  -H "Authorization: Bearer $ICELAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "prompt": "A crystalline lake under aurora",
    "response_format": "b64_json"
  }'

Response

{
  "created": 1710000000,
  "data": [
    { "b64_json": "..." }
  ]
}
When response_format is url, each item uses a data URL string in url. Requires the images scope on the API key. Charges credits.