Images

Generates one standard image as base64.

Changed on

Generates one standard-resolution image with a Completion API key. Returns b64_json only. Does not support n other than 1, URL output, HD, or image edits. A detected safety refusal returns 400 with a stable content filter message.

post/openai/{region}/v1/images/generations

Request

  • Base URL
    https://api.langdock.com
  • URL
    https://api.langdock.com/openai/{region}/v1/images/generations
  • Auth
    HTTP bearer

Path parameters

region'eu' | 'us' required

The region of the API to use. Must be eu or us.

Request body

modelstring required

Image generation model ID from your workspace. GET /openai/{region}/v1/models lists chat models, not image models.

promptstring required

The image description.

n1

Number of images. Only 1 is supported.

size'auto' | '1024x1024' | '1536x1024' | '1024x1536'

Output size. auto and 1024x1024 map to square, 1536x1024 to landscape, and 1024x1536 to portrait.

quality'auto' | 'low' | 'medium' | 'high'

Quality hint forwarded to the image model. Not every image model uses it.

response_format'b64_json'

Response format. Only b64_json is supported.

userstring

Optional end-user identifier. Accepted for OpenAI compatibility.

Response

OK

createdinteger required

Unix timestamp in seconds.

Changes