Generate an image
Generate images from a text prompt with the OpenAI-compatible Yelu Images API.
POST
Generates one or more images from a text prompt. Supported fields, sizes, output formats, and quality controls depend on the selected image model.
Endpoint
Headers
API key using the format
Bearer $YELU_API_KEY.Must be
application/json.Request body
An image-capable model ID available to your account.
Description of the image to create. Prompt length limits are model-specific.
Number of images to generate when supported. Validate this value to control cost.
Requested dimensions such as
1024x1024. Accepted values depend on the model.Model-specific quality setting such as
standard or hd, when supported.Model-specific style control, when supported.
url or b64_json, subject to model support. URLs can expire; download them promptly.Stable, non-sensitive end-user identifier for abuse monitoring and attribution.
Response
Unix timestamp for generation.
Generated image objects. Each object contains
url or b64_json, and can include revised_prompt.Error codes
The response URL above uses the reserved
.invalid domain to illustrate the response shape. Real successful responses contain a provider or Yelu delivery URL, or base64 image data when requested and supported.Last modified on July 13, 2026