English
  • English
  • 简体中文
  1. OpenAI
English
  • English
  • 简体中文
  • Introduction (Must Read)
  • OpenAI official library usage tutorial
  • Obtain Base URL and API Key
  • OpenAI
    • Chat
      POST
    • Chat (o1,o3,o4 series model)
      POST
    • dall--e-3
      POST
    • gpt-image-1
      POST
    • Image edit
      POST
    • Analyze image
      POST
    • Analyze PDF
      POST
    • o3-pro
      POST
  • Gemini
    • gemini
      POST
  1. OpenAI

gpt-image-1

Developing
POST
{{base_url}}/v1/images/generations
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{base_url}}/v1/images/generations' \
--header 'Authorization: sk-shdahd【You ApiKey】' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-image-1",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }'
Response Response Example
{}

Request

Header Params

Body Params text/plain
Examples

Responses

🟢200成功
application/json
Body

Modified at 2025-06-04 09:33:09
Previous
dall--e-3
Next
Image edit
Built with