curl -X POST 'https://app.memorylake.ai/openapi/memorylake/router/openai/v1/images/generations' \ -H 'Authorization: Bearer sk_xxxxxx' \ -H 'Content-Type: application/json' \ -d '{ "model": "gpt-image-1-mini", "prompt": "A small red circle on a white background", "quality": "low", "size": "1024x1024" }'
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/router/openai/v1/images/generations' \ -H 'Authorization: Bearer sk_xxxxxx' \ -H 'Content-Type: application/json' \ -d '{ "model": "gpt-image-1-mini", "prompt": "A small red circle on a white background", "quality": "low", "size": "1024x1024" }'
POST /openapi/memorylake/router/openai/v1/images/generations
OpenAI Images. Generates images from a text prompt with an image model such as gpt-image-1. Parameters not listed below are passed to the model unchanged.
Headers
string
Your MemoryLake API key, when you call the model with your own provider key. The provider key then goes in the provider’s usual key header. Your provider key is forwarded to the provider and never stored.
string
W3C trace context. When present, the request joins your trace and the same trace id comes back in X-Trace-ID.
Request Body
string
required
Image model name
string
required
Text description of the image
string
Background of the image. One of: transparent, opaque, auto.
integer
Number of images to generate
string
Image file format. One of: png, jpeg, webp.
string
Rendering quality. One of: low, medium, high, auto.
string
Image size, such as 1024x1024
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/router/openai/v1/images/generations' \ -H 'Authorization: Bearer sk_xxxxxx' \ -H 'Content-Type: application/json' \ -d '{ "model": "gpt-image-1-mini", "prompt": "A small red circle on a white background", "quality": "low", "size": "1024x1024" }'
Response
integer
Creation time, Unix seconds
array
One entry per image
Show Data object
string
The image, base64-encoded
string
Prompt the model actually used, when it rewrote yours