Gpt Image 1
OpenAI's latest image generation and editing model: gpt-1-image.
Header parameters
AuthorizationstringRequiredExample:
sk-Qp03mnjjNqXKxpnw5qQ4IqVABNfad5YOk1axUhp7pJbokFmuBody
modelstringRequiredExample:
model is the model name
gpt-image-1-text-to-imagepromptstringRequiredExample:
prompt is the prompt.
A cute baby sea otter.sizestring · enumOptionalDefault:
The size of the image to generate. Default value: "auto"
Possible enum values: auto, 1024x1024, 1536x1024, 1024x1536
autoExample: autoPossible values: qualitystring · enumOptionalDefault:
The quality of the image to generate. Default value: "auto"
Possible enum values: auto, low, medium, high
autoExample: autoPossible values: backgroundstring · enumOptionalDefault:
The background of the image to generate. Default value: "auto"
Possible enum values: auto, transparent, opaque
autoExample: autoPossible values: moderationstring · enumOptionalDefault:
autoExample: autoPossible values: nintegerOptionalDefault:
n is the number of images to generate, default value is 1.
1Example: 1output_formatstring · enumOptionalDefault:
output_format indicate the output format, default value is url.
urlExample: urlPossible values: Responses
200Success
application/json
post
/v1/images/generationsPOST /v1/images/generations HTTP/1.1
Host: image.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"model": "gpt-image-1-text-to-image",
"prompt": "A cute baby sea otter.",
"size": "auto",
"quality": "auto",
"background": "auto",
"moderation": "auto",
"n": 1,
"output_format": "url"
}200Success
{
"data": [
{
"url": "https://resource.onerouter.pro/image/generated%2Fonerouter_c0f827fd-09fb-40e3-8a66-3b377cd67920.png",
"b64_json": "",
"revised_prompt": ""
}
],
"created": 1760510251
}