LLM Gateway
Features

Image Generation

Generate images using AI models through the OpenAI-compatible images API or chat completions API

LLMGateway supports image generation through two APIs:

  1. /v1/images/generations — OpenAI-compatible images endpoint (recommended for simple image generation)
  2. /v1/images/edits — OpenAI-compatible image editing endpoint
  3. /v1/chat/completions — Chat completions with image generation models (for conversational image generation and editing)

For asynchronous video generation, see Video Generation.

Available Models

You can find all available image generation models on our models page.

OpenAI Images API

The /v1/images/generations endpoint provides a drop-in replacement for OpenAI's image generation API. It works with any OpenAI-compatible client library.

Parameters

ParameterTypeDefaultDescription
promptstringrequiredA text description of the desired image(s)
modelstring"auto"The model to use. auto resolves to gemini-3-pro-image
ninteger1Number of images to generate (1-10)
sizestringImage dimensions. Supported sizes depend on the model/provider — see Image Configuration
qualitystringImage quality. Supported values depend on the model/provider — see Image Configuration
moderationstring"auto"Content filtering strictness for models that support it: auto or low — see Moderation
response_formatstring"b64_json"Only b64_json is supported
stylestringImage style: vivid or natural

curl

curl -X POST "https://api.llmgateway.io/v1/images/generations" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image",
    "prompt": "A cute cat wearing a tiny top hat",
    "n": 1,
    "size": "1024x1024"
  }'

OpenAI SDK

Works with the standard OpenAI client library — just point the base URL to LLMGateway.

import OpenAI from "openai";
import { writeFileSync } from "fs";

const client = new OpenAI({
	baseURL: "https://api.llmgateway.io/v1",
	apiKey: process.env.LLM_GATEWAY_API_KEY,
});

const response = await client.images.generate({
	model: "gemini-3-pro-image",
	prompt: "A futuristic city skyline at sunset with flying cars",
	n: 1,
	size: "1024x1024",
});

response.data.forEach((image, i) => {
	if (image.b64_json) {
		const buf = Buffer.from(image.b64_json, "base64");
		writeFileSync(`image-${i}.png`, buf);
	}
});

Vercel AI SDK

Use the @llmgateway/ai-sdk-provider with generateImage.

import { createLLMGateway } from "@llmgateway/ai-sdk-provider";
import { generateImage } from "ai";
import { writeFileSync } from "fs";

const llmgateway = createLLMGateway({
	apiKey: process.env.LLM_GATEWAY_API_KEY,
});

const result = await generateImage({
	model: llmgateway.image("gemini-3-pro-image"),
	prompt:
		"A cozy cabin in a snowy mountain landscape at night with aurora borealis",
	size: "1024x1024",
	n: 1,
	// aspectRatio and quality are model-specific — only some providers honor them.
	// aspectRatio works on Gemini image models; OpenAI gpt-image-2 ignores it
	// (use a literal WxH `size` instead).
	aspectRatio: "16:9",
	// quality works on OpenAI gpt-image-2 ("low" | "medium" | "high" | "auto").
	// The AI SDK only forwards it through providerOptions.
	providerOptions: {
		llmgateway: { quality: "high" },
	},
});

result.images.forEach((image, i) => {
	const buf = Buffer.from(image.base64, "base64");
	writeFileSync(`image-${i}.png`, buf);
});

OpenAI Images Edit API

The /v1/images/edits endpoint is OpenAI-compatible and supports a focused subset of images.edit parameters.

Parameters

ParameterTypeRequiredDescription
imagesarray of { image_url }yesInput images. image_url supports HTTPS URLs and base64 data URLs
promptstringyesA text description of the desired image edit
modelstringnoImage editing model
backgroundenumnotransparent, opaque, or auto
input_fidelityenumnohigh or low
nintegernoNumber of edited images to generate
output_formatenumnopng, jpeg, or webp
output_compressionintegernoCompression level for jpeg/webp
qualityenumnolow, medium, high, or auto; GPT Image 2.5 also supports xhigh and max
moderationenumnoauto or low — see Moderation
sizestringnoOutput size. Examples: 1024x1024, 1536x1024, 1K, 2K, 4K
aspect_ratiostringnoAspect ratio override. Examples: 1:1, 16:9, 4:3, 5:4

mask is not supported yet on /v1/images/edits.

curl (HTTPS image URL)

curl -X POST "https://api.llmgateway.io/v1/images/edits" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      {
        "image_url": "https://example.com/source-image.png"
      }
    ],
    "prompt": "Add a watercolor effect to this image",
    "model": "gemini-3-pro-image",
    "aspect_ratio": "16:9",
    "quality": "high",
    "size": "4K"
  }'

curl (base64 data URL)

curl -X POST "https://api.llmgateway.io/v1/images/edits" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      {
        "image_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
      }
    ],
    "prompt": "Turn this into a pixel-art style image"
  }'

Chat Completions API

Image generation also works through the /v1/chat/completions endpoint, which is useful for conversational image generation, image editing with vision, and multi-turn interactions.

Making Requests

Simply use an image generation model and provide a text prompt describing the image you want to create.

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a cute golden retriever puppy playing in a sunny meadow"
      }
    ]
  }'

Response Format

Image generation models return responses in the standard chat completions format, with generated images included in the images array within the assistant message:

{
	"id": "chatcmpl-1756234109285",
	"object": "chat.completion",
	"created": 1756234109,
	"model": "gemini-3-pro-image",
	"choices": [
		{
			"index": 0,
			"message": {
				"role": "assistant",
				"content": "Here's an image of a cute dog for you: ",
				"images": [
					{
						"type": "image_url",
						"image_url": {
							"url": "data:image/png;base64,<base64_encoded_image_data>"
						}
					}
				]
			},
			"finish_reason": "stop"
		}
	],
	"usage": {
		"prompt_tokens": 8,
		"completion_tokens": 1303,
		"total_tokens": 1311
	}
}

A request stopped by the gateway content filter returns finish_reason: "content_filter" on the Chat Completions API and an empty data array on the Images API.

Vision support

You can edit or modify images by combining image generation with vision models by including the image in the messages array.

Response Structure

Images Array

The images array contains one or more generated images with the following structure:

  • type: Always "image_url" for generated images
  • image_url.url: A data URL containing the base64-encoded image data (format: data:image/png;base64,<data>)

Content Field

The content field may contain descriptive text about the generated image, depending on the model's behavior.

AI SDK (Chat Completions)

You can use the AI SDK to generate images with your existing generateText or streamText calls using the LLMGateway provider.

Example

/api/chat/route.ts
import { streamText, type UIMessage, convertToModelMessages } from "ai";
import { createLLMGateway } from "@llmgateway/ai-sdk-provider";

interface ChatRequestBody {
	messages: UIMessage[];
}

export async function POST(req: Request) {
	const body = await req.json();

	const { messages }: ChatRequestBody = body;

	const llmgateway = createLLMGateway({
		apiKey: "llmgateway_api_key",
		baseUrl: "https://api.llmgateway.io/v1",
	});

	try {
		const result = streamText({
			model: llmgateway.chat("gemini-3-pro-image"),
			messages: convertToModelMessages(messages),
		});

		return result.toUIMessageStreamResponse();
	} catch {
		return new Response(
			JSON.stringify({ error: "LLM Gateway request failed" }),
			{
				status: 500,
			},
		);
	}
}

Then you can render the image in your frontend using the Image component from the ai-elements.

Here is a full example of how to use the AI SDK to generate images in your frontend:

/app/page.tsx
"use client";

import { useState, useRef } from "react";
import { useChat } from "@ai-sdk/react";
import { parseImagePartToDataUrl } from "@/lib/image-utils";
import {
	PromptInput,
	PromptInputBody,
	PromptInputButton,
	PromptInputSubmit,
	PromptInputTextarea,
	PromptInputToolbar,
} from "@/components/ai-elements/prompt-input";
import {
	Conversation,
	ConversationContent,
} from "@/components/ai-elements/conversation";
import { Image } from "@/components/ai-elements/image";
import { Loader } from "@/components/ai-elements/loader";
import { Message, MessageContent } from "@/components/ai-elements/message";
import { Response } from "@/components/ai-elements/response";

export const ChatUI = () => {
	const textareaRef = useRef<HTMLTextAreaElement | null>(null);
	const [text, setText] = useState("");
	const { messages, status, stop, regenerate, sendMessage } = useChat();

	return (
		<>
			<div className="flex-1 overflow-y-auto px-4 pb-24">
				<Conversation>
					<ConversationContent>
						{messages.length === 0 ? (
							<div className="mb-6 text-center">
								<h2 className="text-3xl font-semibold tracking-tight">
									How can I help you?
								</h2>
							</div>
						) : (
							messages.map((m, messageIndex) => {
								const isLastMessage = messageIndex === messages.length - 1;

								if (m.role === "assistant") {
									const textContent = m.parts
										.filter((p) => p.type === "text")
										.map((p) => p.text)
										.join("");
									// Combine all image parts (both image_url and file types)
									const imageParts = m.parts.filter(
										(p) =>
											p.type === "file" && p.mediaType?.startsWith("image/"),
									);

									return (
										<div key={m.id}>
											{textContent ? <Response>{textContent}</Response> : null}
											{imageParts.length > 0 ? (
												<div className="mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2">
													{imageParts.map((part, idx: number) => {
														const { base64Only, mediaType } =
															parseImagePartToDataUrl(part);

														if (!base64Only) {
															return null;
														}

														return (
															<Image
																key={idx}
																base64={base64Only}
																mediaType={mediaType}
																alt={part.name || "Generated image"}
															/>
														);
													})}
												</div>
											) : null}
											{isLastMessage &&
												(status === "submitted" || status === "streaming") && (
													<Loader />
												)}
										</div>
									);
								} else {
									return (
										<Message key={m.id} from={m.role}>
											<MessageContent variant="flat">
												{m.parts.map((p, i) => {
													if (p.type === "text") {
														return <div key={i}>{p.text}</div>;
													}
													return null;
												})}
											</MessageContent>
											{isLastMessage &&
												(status === "submitted" || status === "streaming") && (
													<Loader />
												)}
										</Message>
									);
								}
							})
						)}
					</ConversationContent>
				</Conversation>
			</div>
			<div className="sticky bottom-0 left-0 right-0 px-4 pb-[max(env(safe-area-inset-bottom),1rem)] pt-2 bg-gradient-to-t from-background via-background/95 to-transparent backdrop-blur supports-[backdrop-filter]:bg-background/60">
				<PromptInput
					aria-disabled={status === "streaming"}
					onSubmit={async (message) => {
						if (status === "streaming") {
							return;
						}

						try {
							const textContent = message.text ?? "";
							if (!textContent.trim()) {
								return;
							}

							setText(""); // Clear input immediately

							const parts = [{ type: "text", text: textContent }];

							// Call sendMessage which will handle adding the user message and API request
							sendMessage({
								role: "user",
								parts,
							});
						} catch (error) {
							// Throw error here
						}
					}}
				>
					<PromptInputBody>
						<PromptInputTextarea
							ref={textareaRef}
							value={text}
							onChange={(e) => setText(e.currentTarget.value)}
							placeholder="Message"
						/>
					</PromptInputBody>
					<PromptInputToolbar>
						<div className="flex items-center gap-2">
							{status === "streaming" ? (
								<PromptInputButton onClick={() => stop()} variant="ghost">
									Stop
								</PromptInputButton>
							) : null}
							<PromptInputSubmit
								status={status === "streaming" ? "streaming" : "ready"}
							/>
						</div>
					</PromptInputToolbar>
				</PromptInput>
			</div>
		</>
	);
};
/lib/image-utils.ts
/**
 * Parses a file object containing image data and returns a properly formatted data URL
 * and normalized media type.
 *
 * Handles:
 * - Normalizing mediaType from various property names (mediaType, mime_type)
 * - Detecting existing data: URLs
 * - Detecting base64-looking content
 * - Stripping whitespace from base64 content
 * - Building proper data:...;base64,... URLs
 */
export function parseImageFile(file: {
	url?: string;
	mediaType?: string;
	mime_type?: string;
}): { dataUrl: string; mediaType: string } {
	const mediaType = file.mediaType || file.mime_type || "image/png";
	let url = String(file.url || "");

	const isDataUrl = url.startsWith("data:");
	const looksLikeBase64 =
		!isDataUrl && /^[A-Za-z0-9+/=\s]+$/.test(url.slice(0, 200));

	if (looksLikeBase64) {
		url = url.replace(/\s+/g, "");
	}

	const dataUrl = isDataUrl
		? url
		: looksLikeBase64
			? `data:${mediaType};base64,${url}`
			: url;

	return { dataUrl, mediaType };
}

/**
 * Extracts base64-only content from a data URL.
 * Returns empty string if the input is not a valid data URL.
 */
export function extractBase64FromDataUrl(dataUrl: string): string {
	if (!dataUrl.startsWith("data:")) {
		return "";
	}

	const comma = dataUrl.indexOf(",");
	return comma >= 0 ? dataUrl.slice(comma + 1) : "";
}

/**
 * Parses an image part (either image_url or file type) and returns
 * dataUrl, base64Only, and mediaType ready for rendering.
 *
 * Handles error cases gracefully by returning empty base64Only string
 * when parsing fails, allowing the renderer to skip invalid images.
 */
export function parseImagePartToDataUrl(part: any): {
	dataUrl: string;
	base64Only: string;
	mediaType: string;
} {
	try {
		// Handle image_url parts
		if (part.type === "image_url" && part.image_url?.url) {
			const url = part.image_url.url;
			const mediaType = "image/png"; // Default for image_url parts

			if (url.startsWith("data:")) {
				// Extract media type from data URL if present
				const match = url.match(/data:([^;]+)/);
				const extractedMediaType = match?.[1] || mediaType;
				return {
					dataUrl: url,
					base64Only: extractBase64FromDataUrl(url),
					mediaType: extractedMediaType,
				};
			}

			return {
				dataUrl: url,
				base64Only: "",
				mediaType,
			};
		}

		// Handle file parts (AI SDK format)
		if (part.type === "file") {
			const { dataUrl, mediaType } = parseImageFile(part);
			return {
				dataUrl,
				base64Only: extractBase64FromDataUrl(dataUrl),
				mediaType,
			};
		}

		return {
			dataUrl: "",
			base64Only: "",
			mediaType: "image/png",
		};
	} catch {
		return {
			dataUrl: "",
			base64Only: "",
			mediaType: "image/png",
		};
	}
}

Image Configuration

You can customize the generated image using the optional image_config parameter (for chat completions) or size/quality/style parameters (for the images API). The supported parameters vary by provider.

Google Models

Available Google models:

ModelDescription
gemini-3-pro-imageGemini 3 Pro with native image generation. Supports aspect ratios and 1K–4K sizes.
gemini-3.1-flash-imageGemini 3.1 Flash with native image generation. Supports 0.5K–4K sizes (default 1K).

gemini-3-pro-image

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a mountain landscape at sunset"
      }
    ],
    "image_config": {
      "aspect_ratio": "16:9",
      "image_size": "4K"
    }
  }'
ParameterTypeDescription
aspect_ratiostringThe aspect ratio of the generated image. Options: "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"
image_sizestringThe resolution of the generated image. Options: "1K" (1024x1024), "2K" (2048x2048), "4K" (4096x4096)

gemini-3.1-flash-image

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a mountain landscape at sunset"
      }
    ],
    "image_config": {
      "image_size": "1K"
    }
  }'
ParameterTypeDescription
aspect_ratiostringThe aspect ratio of the generated image. Options: "1:1", "1:4", "1:8", "2:3", "3:2", "3:4", "4:1", "4:3", "4:5", "5:4", "8:1", "9:16", "16:9", "21:9"
image_sizestringThe resolution of the generated image. Options: "0.5K" (512x512), "1K" (1024x1024, default), "2K" (2048x2048), "4K" (4096x4096)

gemini-3.1-flash-image uniquely supports "0.5K" resolution, which is not available on other Google image models.

Meta Models

Muse Image uses Meta's Responses API for generation and editing. It reasons before rendering and can use reference images across refinement turns.

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta/muse-image-1.0",
    "messages": [
      {
        "role": "user",
        "content": "Create a product photo on a warm studio background"
      }
    ],
    "image_config": {
      "image_size": "1024x1536"
    }
  }'
ParameterTypeDescription
image_sizestringOne of "1024x1024", "1024x1536", or "1536x1024". Defaults to square.

Muse Image does not expose a quality setting. Use image_size to choose square, portrait, or landscape output.

Alibaba Models

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/qwen-image-plus",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a mountain landscape at sunset"
      }
    ],
    "image_config": {
      "image_size": "1024x1536",
      "n": 1,
      "seed": 42
    }
  }'
ParameterTypeDescription
image_sizestringImage dimensions in WIDTHxHEIGHT format. Examples: "1024x1024", "1024x1536", "1536x1024"
nintegerNumber of images to generate (1-4)
seedintegerRandom seed for reproducible generation

Available Alibaba models (see the models page for current pricing):

ModelDescription
alibaba/qwen-imageStandard quality image generation
alibaba/qwen-image-plusGood balance of quality and cost
alibaba/qwen-image-maxHighest quality image generation
alibaba/qwen-image-3.0Third-generation image generation and editing
alibaba/qwen-image-3.0-proHighest quality third-generation generation and editing. Priced per output size tier

Alibaba models use explicit pixel dimensions (e.g., "1024x1536") instead of aspect ratios. For portrait orientation use "1024x1536", for landscape use "1536x1024".

Z.AI Models

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai/cogview-4",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a futuristic city skyline"
      }
    ],
    "image_config": {
      "image_size": "1024x1024"
    }
  }'
ParameterTypeDescription
image_sizestringImage dimensions in WIDTHxHEIGHT format. Examples: "1024x1024", "2048x1024", "1024x2048"
nintegerNumber of images to generate

Available Z.AI models (see the models page for current pricing):

ModelDescription
zai/cogview-4CogView-4 with bilingual support and excellent text rendering
zai/glm-imageGLM-Image with hybrid auto-regressive architecture, excellent for text-rendering and knowledge-intensive generation

CogView-4 supports both Chinese and English prompts and excels at generating images with embedded text.

OpenAI Models

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "messages": [
      {
        "role": "user",
        "content": "Generate a photo-real cinematic landscape at golden hour"
      }
    ],
    "image_config": {
      "image_size": "3072x2160",
      "image_quality": "low"
    }
  }'
ParameterTypeDescription
image_sizestringImage dimensions in WIDTHxHEIGHT format, or "auto" to let the model choose.
image_qualitystring"low", "medium", "high", or "auto"; GPT Image 2.5 also supports "xhigh" and "max". Defaults to "auto" when omitted.
moderationstring"auto" or "low" — see Moderation. Defaults to "auto" when omitted.

OpenAI image models do not accept aspect_ratio. Always specify image_size as WIDTHxHEIGHT (e.g. "1024x1024", "3072x2160"). OpenAI requires both width and height to be divisible by 16, the longest edge to be ≤ 3840, and the total pixel count to fit within the model's pixel budget; requests outside these bounds are rejected with HTTP 400.

Available OpenAI image models:

ModelDescription
openai/gpt-image-2OpenAI's next-generation image model with improved quality and prompt adherence, supporting text and vision.
openai/gpt-image-2.5-sunburstImage generation and precise editing with text and image inputs; adds xhigh and max quality.
openai/gpt-image-2.5-flareFast everyday image generation and editing with text and image inputs; adds xhigh and max quality.

GPT Image 2.5 supports 1024x1024, 1536x1024, 1024x1536, auto, and custom sizes within the limits above. Its aspect ratio must stay between 1:3 and 3:1, with 655,360–8,294,400 total pixels. Resolutions above 2560x1440 are experimental.

Both variants use the same per-token rates as GPT Image 2. Actual image token usage varies by model, size, quality, and input; billing uses the provider's reported usage. See the models page for current pricing.

ByteDance Models

curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bytedance/seedream-4-5",
    "messages": [
      {
        "role": "user",
        "content": "Generate an image of a futuristic cyberpunk city at night"
      }
    ],
    "image_config": {
      "image_size": "2048x2048"
    }
  }'
ParameterTypeDescription
image_sizestringImage dimensions in WIDTHxHEIGHT format. Examples: "1024x1024", "2048x2048", "4096x4096"

Available ByteDance models (see the models page for current pricing):

ModelDescription
bytedance/seedream-4-0High-quality text-to-image generation with 2K default output
bytedance/seedream-4-5Enhanced quality and consistency with improved prompt adherence
bytedance/seedream-5-0-proPrecise generation and reference-image editing at 1K or 2K

Seedream models support up to 2-10 reference images for multi-image fusion and generation. The default output resolution is 2048×2048 (2K), with support up to 4096×4096 (4K).

Moderation

GPT Image models expose a moderation parameter that controls how strict the provider's content filtering is:

  • auto (default) — standard filtering, which limits certain categories of potentially age-inappropriate content.
  • low — less restrictive filtering. OpenAI's content policy still applies.

Send it as a top-level parameter on /v1/images/generations and /v1/images/edits, or inside image_config on /v1/chat/completions:

curl -X POST "https://api.llmgateway.io/v1/images/generations" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5-flare",
    "prompt": "A cute cat wearing a tiny top hat",
    "moderation": "low"
  }'
curl -X POST "https://api.llmgateway.io/v1/chat/completions" \
  -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2.5-flare",
    "messages": [{ "role": "user", "content": "A cute cat wearing a tiny top hat" }],
    "image_config": { "moderation": "low" }
  }'

Models without a moderation control ignore the parameter.

Usage Notes

Image generation models typically have higher token costs compared to text-only models due to the computational requirements of image synthesis.

Generated images are returned as base64-encoded data URLs, which can be large. Consider the payload size when integrating image generation into your applications.

How is this guide?

Last updated on

On this page

Ready for production?

Ship to production with SSO, audit logs, spend controls, and guardrails your security team will approve.

Explore Enterprise