Newapi provides a unified image API that routes requests to DALL-E 2, DALL-E 3, GPT Image 1, and other supported image models including Gemini and Qwen variants. All endpoints are compatible with the OpenAI images API format.Documentation Index
Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt
Use this file to discover all available pages before exploring further.
Generate images
Request parameters
A text description of the image you want to generate. Maximum length: 32,000 characters for
gpt-image-1, 4,000 characters for dall-e-3, and 1,000 characters for dall-e-2.The image model to use. Supported values include
dall-e-2, dall-e-3, and gpt-image-1. Gemini and Qwen image models are also available when configured by your admin.Number of images to generate. Must be between
1 and 10. For dall-e-3, only n=1 is supported.Dimensions of the generated image.
gpt-image-1:1024x1024,1536x1024(landscape),1024x1536(portrait), orautodall-e-3:1024x1024,1792x1024, or1024x1792dall-e-2:256x256,512x512, or1024x1024
The quality level of the generated image. For
dall-e-3 and gpt-image-1, you can pass "standard" or "hd". Higher quality increases latency and cost.For
dall-e-3 only. Controls image style: "vivid" (dramatic, hyper-real) or "natural" (more realistic, less stylized).For
gpt-image-1 only. Set background transparency: "transparent", "opaque", or "auto". When using "transparent", set response_format to "png" or "webp".For
gpt-image-1 only. Controls content filtering level: "auto" (default) or "low" for less restrictive filtering.The format of the returned image.
"url" returns a temporary URL to the image. "b64_json" returns the image as a base64-encoded string embedded in the JSON response.An optional end-user identifier for abuse monitoring.
Response fields
Unix timestamp when the images were created.
Token usage for models that report it (for example
gpt-image-1).Examples
Edit images
multipart/form-data. You can optionally supply a mask image to specify which region to edit.
Request parameters
The source image to edit. Must be a valid PNG file smaller than 4 MB and square. If no mask is provided, the image must have an alpha channel (transparency) to indicate the region to edit.
A text description of how you want to modify the image. Maximum 1,000 characters.
An additional PNG image of the same size as
image. Fully transparent pixels (alpha = 0) indicate areas that should be edited. The rest of the image is preserved.The model to use for editing. Defaults to
dall-e-2.Number of edited images to generate. Must be between
1 and 10.Size of the output image. Supported values:
256x256, 512x512, 1024x1024.Return format:
"url" or "b64_json".An optional end-user identifier for abuse monitoring.
Example
cURL
Gemini and Qwen image generation models are also available through this API when your admin has configured the appropriate channels. Use the model ID provided by your admin in the
model parameter — the request and response format remain the same.