Generate image

Generate a new image from a text prompt. Unsupported fields are rejected.

post/images/generations

Request

  • Base URL
    https://api.llm7.io/v1
  • URL
    https://api.llm7.io/v1/images/generations
  • Auth
    HTTP bearer

Request body

modelstring required

Image model ID.

promptstring required

Text instruction for the image.

sizestring

Requested output size. Support depends on the selected model.

n1

Number of images to generate. Only 1 is supported.

Example request

{
  "model": "gpt-image-2",
  "size": "1024x1024"
}

Response

Generated image response

Example response

{
  "usage": {
    "cost_usd": "0.01200000"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.