Image generation
Generate images from text prompts using the OpenAI Images format.
POSThttps://api.outerlane.app/v1/images/generations
This endpoint follows the OpenAI Images format. POST /v1/images is an alias. Use the model catalog to find image generation models.
Example request
curl https://api.outerlane.app/v1/images/generations \
-H "Authorization: Bearer $OUTERLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-2",
"prompt": "An isometric illustration of a server rack on a white background",
"size": "1024x1024"
}'Request body
modelstringRequired
Image generation model ID, such as
openai/gpt-image-2promptstringRequired
Description of the image to generate
response_formatstring
Only
b64_json is supported. It is also the default.sizestring
Image dimensions, such as
1024x1024. Supported sizes vary by model.quality, background, output_format, output_compression, moderation, style, seed, aspect_ratio, resolution, and user are passed through. Supported options vary by model.
Each request generates one image. Only n: 1 is supported. Streaming, image editing, and reference image inputs are unavailable.
Response
{
"created": 1790640000,
"data": [{ "b64_json": "...", "revised_prompt": "...", "media_type": "image/png" }],
"x_outerlane": {
"request_id": "req_a1b2c3d4e5f6a1b2c3d4e5f6",
"input": 0,
"cached": 0,
"output": 0,
"costUsd": 0.0265,
"chargedUsd": 0.0265
}
}data[0].b64_jsoncontains the base64-encoded image.revised_promptandmedia_typeappear only if the model returns them.- Successful image generation requests are charged at the model's per-request rate. Token counts in
x_outerlaneare always0.