/v1/images/generationshttps://api.linkinfra.aiAuthorization
Bearer TokenAuthorizationBearer <token>Authenticate requests with your API key in the request header:
Authorization: Bearer sk-your-api-keyNeed a key? Create one in the console
Image generation can take longer than text. Set a sufficient client timeout. Base64 data is omitted in this example.
Request body
application/jsonmodelstringrequiredModel ID from the model catalog. Availability depends on your account group and configured channels.
promptstringrequiredA text description of the desired image.
nintegerNumber of images, subject to model limits.
sizestringImage size, such as 1024x1024, subject to model support.
qualitystringImage quality. Accepted values vary by model.
response_formatstringSome models accept url or b64_json. The gpt-image family generally returns Base64.
Response
application/json200Successful responsecreatedintegerCreation time as a Unix timestamp in seconds.
dataarray<object>Image results containing url or b64_json.